Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 06:41 am EDT

Geeklog Forums

New Error "MySQL server has gone away "


Status: offline

kingsley

Forum User
Junior
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...

Text 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
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 Quote

Status: offline

kingsley

Forum User
Junior
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
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
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
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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 ...
 Quote

Status: offline

kingsley

Forum User
Junior
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
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Well, let's see if that sped up the posting here....

Thanks!
Mark

Edit

Oh yea, much, much faster!
 Quote

All times are EDT. The time is now 06:41 am.

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