DEVTRENCH.COM

Web Development blows, just another day in the trenches...

Man, I had a rough debugging day. A client of mine called with a site down and my day pretty much sucked from there. I posted this on the MODx forums, but the problem is more MySQL related so I'll repost it here too:

"I got a call from my client saying that their website was down and that she'd called the host and they said they upgraded things. I called the host and they said they just upgraded their web server with the latest version of php (5.2.3) and latest version of MySQL (5.0.27).

So with this information I logged into my client's plesk control panel and found this error message in the error log:

[Thu Jul 12 10:59:18 2007] [error] [client 1.1.1.1] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7527027 bytes) in /var/www/vhosts/.../httpdocs/manager/includes/document.parser.class.inc.php on line 1287

I immediately searched the forums for this error message and found others have had similar problems and were able to solve it with an upgrade to 0.9.6. I upgraded with no success on the front end (still just showed a blank page - php errors are off, and logged to the error_log), but I could access the manager. In the manager I kept getting 'Duplicate key 0 for 1', and "Error updating error log" messages. So when looking at the modx_error_log table in the database I noticed that the 'id' field didn't have auto_increment on. Then I looked at the other tables in the database, and NONE of them had auto_increment turned on for the 'id' fields!! I couldn't believe it. Going back and looking at the backup I made before I upgraded confirmed that this was messed up before the upgrade to 0.9.6. So somehow, auto_increment got removed from all fields where it was set when the host upgraded MySQL (at least that's what I think happened). "

I hate days like this, but at least the site is back up: only took 8 hours of work :(. Any one else have a story like this? I'd like to hear it. The End