Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Saturday, May 18 2013 @ 10:54 PM EDT


 Forum Index > Support > General Geeklog Support New Topic Post Reply
 New Error "MySQL server has gone away "
   
kingsley
 11/12/07 09:48AM (Read 1166 times)  
++---
Junior

Status: offline


Registered: 03/17/05
Posts: 29
I have made no changes to my site in several weeks. This morning when I try and log in I get an SQL error and the follwoing appears in my Error Log...

PHP Formatted Code
Mon Nov 12 09:23:05 2007 - 2006: MySQL server has gone away. SQL in question: SELECT pi_name FROM gl_plugins WHERE pi_enabled = 1


Any ideas, I did a search and only found one reference from 2004 that was of little help. I am dead in the water until I can fix this so any help would be very appretiated.

The site is...

http://www.nelug.org/

The home page is fine but I cannot log in.

-Eric

 
Profile Email
 Quote
Dirk
 11/12/07 02:26PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Your MySQL server crashed or was restarted in the middle of that request. Sounds like it's running again now or you wouldn't even see your homepage. That you can't log in must be due to something else then.

If you see more of those "has gone away" messages in your error.log you should contact your hosting service.

bye, Dirk

 
Profile Email Website
 Quote
kingsley
 11/12/07 02:51PM  
++---
Junior

Status: offline


Registered: 03/17/05
Posts: 29
Quote by: Dirk

Your MySQL server crashed or was restarted in the middle of that request. Sounds like it's running again now or you wouldn't even see your homepage. That you can't log in must be due to something else then.

If you see more of those "has gone away" messages in your error.log you should contact your hosting service.

bye, Dirk



Dirk,

Mark Evans worked tierlessly with me on this. He just found that it was in issue with the BadBehaviour plugin. I think he will be posting the resolution soon as I don't really understand what happened. Basically the issue was slowing down just about every site that used BadBehavior but for some reason it was causing my site to throw errors. Anyway it seems to be resolved now.

Thanks,


-Eric

 
Profile Email
 Quote
mevans
 11/12/07 02:53PM  
+++++
Full Member

Status: offline


Registered: 02/08/04
Posts: 393
Eric contacted me and I help debug the issue. It turned out that it didn't have anything to do with MySQL. I'm still not exactly sure how it manifested itself into SQL errors.

Here is what I found:

The site was working fine, it was only when you either tried to login, send an email, post a comments, etc. that it would ultimately die. The common thread was, anytime something generated an HTTP POST, it died.

Eric is running the Bad Behavior2 plugin and it has a feature where on any POST, the IP is run through a series of Internet blacklists. It appears that either dnsbl.ioerror.us is down or was unreachable by Eric's host, so the request was timing out. Actually, it looks like PHP was timing out first and for some reason that manifested itself in a MySQL connection gone away error.

I've seen this happen before where POSTs on my site became very, very slow because of the blacklist checks. Generally it clears up on its own, but you can also disable these checks which immediately corrects the problem.

I ended up editing blackhole.inc.php in the public_html/bad_behavior2/bad-behavior/ directory and commenting the blacklist sites, the problem immediately whent away. Uncomment them, the problem immediately reappeared.

I still don't understand why it manifested into a MySQL error, but it sure did speed things up and solve the problem whent he checks were disabled.

I notice that my posts here are also very, very slow, might be worth a try here to see if it speeds things up a bit.

Thanks!
Mark

 
Profile Email
 Quote
Dirk
 11/12/07 03:12PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Quote by: mevans

I notice that my posts here are also very, very slow, might be worth a try here to see if it speeds things up a bit.


Good catch! I was wondering myself why the site was so slow as I couldn't see anything out of the ordinary in the logfiles.

I've disabled the ioerror.us blacklist now - hope it helps. Thanks!

bye, Dirk

P.S. And no, I don't understand either how all that could make the MySQL server die ...

 
Profile Email Website
 Quote
kingsley
 11/12/07 03:16PM  
++---
Junior

Status: offline


Registered: 03/17/05
Posts: 29
Quick update.

I had 2 other sites with this problem that I have now resolved with the same fix. I have 3 other sites hosted at a different host that where not failing but where seeing significant performance issues. This has also made those sites run faster.


-Eric

 
Profile Email
 Quote
mevans
 11/12/07 03:23PM  
+++++
Full Member

Status: offline


Registered: 02/08/04
Posts: 393
Well, let's see if that sped up the posting here....

Thanks!
Mark

Edit

Oh yea, much, much faster!

 
Profile Email
 Quote
Content generated in: 4.72 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content