Portal Home > Knowledgebase > Articles Database > would improper mysql cause this?

would improper mysql cause this?

Posted by JJH35, 05-29-2007, 12:08 AM
i was wondering if mysql was configured incorrectly and it was not properly closing the connections as it should would it cause 500 internal server errors for some users?

Posted by mwatkins, 05-29-2007, 12:18 AM
A 500 error might be caused by a MySQL issue but unless you have other hints (log info, etc), that would be a guess. All a 500 error means is that the software did something unexpected and a page could not be returned to the client (browser). http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html Rather than guessing, check your web server's error log; if you haven't already - force the error to happen (some page presumably returns this reliably so you can check) and then check the log - there should be some indication what's going on.

Posted by Patrick, 05-29-2007, 12:19 AM
It's possible, but I would be looking more at Apache... especially the error log for any clues.

Posted by JJH35, 05-29-2007, 12:21 AM
well its using vbulletin forum, but for some reason its not happening to all users it happens when i try to create a post, or send a PM with a few diff user accounts, but other accounts also work i thought maybe my full backup i had to load was the issue, but i also have a diff site on his server non related to forums, its a myspace resource site and its now giving me errors when i try to add a layout on it the logs outside of the public_html would be good enough to check?

Posted by Patrick, 05-29-2007, 12:22 AM
If you have root access: tail -f /usr/local/apache/logs/error_log Then try and recreate the 500 internal error and see what you can find.

Posted by JJH35, 05-29-2007, 12:27 AM
i can ask him, but i currently don't have access, is there anything in cpanel to check it?

Posted by Patrick, 05-29-2007, 12:30 AM
Depending on how your admin has the logs setup, you could click on "Error Log" from within cPanel. Your best bet would be to look at the logs, make note of the timestamp on the last entry, THEN try and cause the 500 internal error for less confusion.

Posted by JJH35, 05-29-2007, 12:35 AM
most logs on there show at like 21:00 which isnt very current, so i cant really tell i guess right now

Posted by Patrick, 05-29-2007, 12:36 AM
Are you looking at the top or bottom? I was just confused by looking at that, but the logs do update in real time... ... latest entries will be at the top.

Posted by JJH35, 05-29-2007, 12:38 AM
nope i looked at top and bottom to be sure i wasnt blind

Posted by Patrick, 05-29-2007, 12:40 AM
Maybe there hasn't been any internal errors since? Ignoring any 'file does not exist' errors, what else do you see there?

Posted by JJH35, 05-29-2007, 12:43 AM
nothing other than the file doesnt exist, and i just went and made sure it errored out like 3 times but logs are sitting at [Mon May 28 21:41:08 2007] [error] for time

Posted by Patrick, 05-29-2007, 12:47 AM
Ah ok, you'll probably have to wait for your admin to look at the Apache error_logs for further analysis. It's hard to say exactly, but I highly doubt MySQL would be causing internal server errors. If the Apache logs are not that helpful, I'd suggest that you provide us with a phpinfo() link to see what modules / extensions are being used.

Posted by JJH35, 05-29-2007, 12:50 AM
he just answered me and ran that cmd that was given and his logs showed the same old *** time, im just gonna back my stuff up and move else

Posted by mwatkins, 05-29-2007, 10:24 AM
You are basically shooting your gun off in the dark until you locate the relevant error log. A 500 error means the software came across something it couldn't handle, which with PHP, the way many PHP applications are coded, could be almost anything. It could indeed be database *related* in that if a query expects to retrieve a record, but finds nothing, and the code around it isn't such that it can handle that null return, an exception (error) could be raised and the application (page) bombs out with an error 500. But as to what it is ... could be anything from file permissions to database. Stop guessing and find your error log. That is always STEP ONE when debugging an application problem.

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Site5 (Views: 419)
Cloudlinux (Views: 414)