News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Random 500 internal server errors

Started by plusev, September 18, 2009, 04:18:51 PM

Previous topic - Next topic

plusev

I get the following error when logged in as admin randomly and site wide for weeks and it's getting worst daily - about once every 20 clicks as of late:
_______________________
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

______________________

Guests and members get it much less frequently. There is nothing in the error log and my hosting company says there is nothing in the server error log. So for now my forum is DOA.

Please Advise, Thx

Yigal

Can we have a link to your forum please?
Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods


Yigal

Are there any pages specifically you are getting the 500 error?  I can get in your site just fine as well.
Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods

Arantor

It looks like it's up at the moment. I would wonder if the errors are due to server being busy - which can and does cause this.

If it occurs on specific pages - especially repeatably - please let us know.

plusev

Thats the problem, it happens on any page at any time - completely random. I can't point to 1 page and replicate the error. Sometimes it happens on index but not that often. Just anywhere. I must have gotten 100+ in the past few hours. The host says everything is fine - not that I believe them 100% but I have over 20 accounts with them so I don't think they'd BS me.

SoLoGHoST

Generally 500 Internal server errors occur due to misconfiguration in PHP, Apache, htaccess or any other settings. To find the root cause of such an error, a file may have been created in your site root, called, something like log, or error, or something like this.  Look for this file and open it and you should see something in here that relates to this problem and should hopefully point to the cause.  Also, you can try checking your Apache error log.  Reading up on this problem, by others, states that they fixed this by recompiling Apache, and/or changing the php5 handler to cgi.

plusev

Quote from: SoLoGHoST on September 19, 2009, 12:44:34 AM
Generally 500 Internal server errors occur due to misconfiguration in PHP, Apache, htaccess or any other settings. To find the root cause of such an error, a file may have been created in your site root, called, something like log, or error, or something like this.  Look for this file and open it and you should see something in here that relates to this problem and should hopefully point to the cause.  Also, you can try checking your Apache error log.  Reading up on this problem, by others, states that they fixed this by recompiling Apache, and/or changing the php5 handler to cgi.

Sounds like server side issues? Unfortunately my hosting co is telling me everything is fine. Shared hosting so I'm not sure how much access I have. Also - the dreaded "outsourced" tech and customer support. I'll call them now and make mention of these thing.

Thx, Sologhost

SoLoGHoST

#8
Also, a 500 Internal Server Error will occur if users have exceeded the memory limit set for your php.  If you have access to your php.ini file, you can increase your memory_limit by adding this line, if not already in there:

memory_limit = 48M

You choose the limit here.  16M should be enough, however, if you have some serious heavy users on your site perhaps up it to 48M.  If the php.ini file does not exist in your servers root directory, you can try to create a php.ini file and than store this code above in it on it's own separate line.

If you don't have access to your php.ini file, or creating the php.ini file, with the above code, within your server root, didn't work, than you can try it with an .htaccess file, within your server root and/or in your SMF forum root, and just add the following to the .htaccess file:
php_value memory_limit 48M

Let me know how this works for you.

P.S. ->  While you are at it with your hosting server, try to find out how much your memory limit is set at and see if you can get a graph for how much has been used recently.  Could be that you have IP Addresses that are grabbing way too much memory/bandwidth from your site and perhaps you should consider banning these users (if they are even users).  But you can still ban the IP Addresses.

Cheers :)

plusev

I have access to my php.ini. I added the line. Not sure if that's the issue. I only have 4 members (still in developement stage) and 3 of them are me.

Thx

SoLoGHoST

Hey, I believe the problem is fixed bro.  I've been clicking links at your site now for about 10 minutes and no more Internal Server Errors.  And I have really been clicking away at all kinds of links.

Well, let me know how this goes on your end, k?

P.S. -> If your problem is solved, please mark Topic Solved!  Thank You!

SoLoGHoST

Also, just read at another site, which recommends 96MB memory limit for a site with built-in image processing using ImageAPI GD.  So, perhaps you should up it to 96M as SMF uses the ImageAPI from the GD Library for attachment thumbnails.  And you have a Gallery at your site too, so probably a good thing to set the memory_limit, in your php.ini file, from 48M to 96M, just to be sure.

plusev

I'll bump it up to 96 right now. I'll start doing more work on the site now - you know me - midnight oil needs burning. I'll report back a bit later.

Thx my Man

SoLoGHoST

You're Welcome, let me know either way.

Cheers :)

Pandos

Look for +followSymlinks in .htaccess or either in your apache conf. files. If this option is enabled you'll get this errors.

Regards
Sven

plusev

I've compiled all the suggestions into an email for the host's engineers who claim they will follow up. I'll post back with results. Thx all.

Arantor

Pandos: I have +FollowSymLinks on in my virtual host; it doesn't cause this error.

Fundamentally there is something not right. I'd be asking for the server error log.

plusev

Unfortunately I'm still getting the errors. Support is still claiming that there are no server errors. I'm getting the feeling they are full of cr#p. I put in a call to tier 3 and am awaiting a call back.

Tyrsson

PM at your own risk, some I answer, if they are interesting, some I ignore.

plusev

Unfortunately not. The hosting company claims all is well on thier end even though the errors are getting more and more frequent. I've been uninstalling mods and such to get to the root of the issue to no avail so far. Thx

Advertisement: