The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Geek Advertising Banner System (http://www.thevbgeek.com/forumdisplay.php?f=28)
-   -   Getting mysql error (http://www.thevbgeek.com/showthread.php?t=4515)

truCido 08-07-2008 10:50 PM

Getting mysql error
 
Hi, I've used GAB in the past and recently bought a new license and installed it again however I am having a few problems. since I installed the script my host has restricted my hosting and said that my site is causing the server to fall over.

I'm getting hundreds of emails with the below error:

Code:


Invalid SQL:
SELECT id,img,views,url,type,trackviews,trackhits,html,frequency,title,height,width,catid,templatetype
                      FROM GAB_ads
                      WHERE isactive = 1 AND (scripts = '||' OR scripts = '' OR scripts LIKE '%|showthread|%')
                        AND (forums LIKE '%|7|%' OR forums = '' OR forums = '||')  AND (startdate<9000 || startdate<1218144914) AND (enddate<9000 || enddate>1218144914);

MySQL Error  : MySQL server has gone away
Error Number  : 2006
Request Date  : Thursday, August 7th 2008 @ 05:35:14 PM
Error Date    : Thursday, August 7th 2008 @ 05:37:15 PM
Script        : http://www.vag******.co.uk/forums/showthread.php?t=7423
Referrer      :
IP Address    : **.**.**.**
Username      : Unregistered
Classname    : vb_database
MySQL Version :


Morgan 08-08-2008 05:02 AM

Seems like a server issue, especially so as your host restricted your hosting. There is nothing wrong with that query assuming you don't have a billion ads. Maybe your host will tell you what about your site is bothering the server, but if not and you remain restricted, chances are that you will get more "MySQL server has gone away" messages on other queries, not just those related to GAB. Here are some links that might help you:

truCido 08-08-2008 11:07 AM

Thanks Morgan, but only when I activate GABS do I get any errors.

I would assume its something to do with the query being quite large and it closing the connection (although the query does actually complete)

Morgan 08-08-2008 02:53 PM

Run the following query and copy-paste the output here. Also check the links in the previous post:
Code:

EXPLAIN SELECT id,img,views,url,type,trackviews,trackhits,html,frequency,title,height,width,catid,templatetype
FROM GAB_ads
WHERE isactive = 1 AND (scripts = '||' OR scripts = '' OR scripts LIKE '%|showthread|%')
AND (forums LIKE '%|7|%' OR forums = '' OR forums = '||')  AND (startdate<9000 || startdate<1218144914) AND (enddate<9000 || enddate>1218144914);


truCido 08-08-2008 07:47 PM

Yeah because I dont have control of the server really theres not much I can do, so I've changed my host! Will keep you updated on how it goes...

Code:

id        select_type        table        type        possible_keys        key        key_len        ref        rows        Extra
1        SIMPLE        GAB_ads        ALL        NULL        NULL        NULL        NULL        2        Using where


Morgan 08-09-2008 04:26 PM

It looks like there are only two rows in the table being queried, so I cannot see how that would cause a "MySQL server has gone away" message. Hopefully things work out with your new host.

truCido 08-11-2008 09:27 AM

Quote:

Originally Posted by Morgan (Post 25687)
It looks like there are only two rows in the table being queried, so I cannot see how that would cause a "MySQL server has gone away" message. Hopefully things work out with your new host.

Yeah its absolutely fine on my new host, very strange must of been the timeout settings on the old server. Thanks for your help :)


All times are GMT. The time now is 02:03 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.