Advertisement:

Author Topic: Random 500 internal server errors  (Read 8998 times)

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Random 500 internal server errors
« on: September 18, 2009, 04:18:51 PM »
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
« Last Edit: September 18, 2009, 10:31:32 PM by plusev »

Offline Yigal

  • SMF Hero
  • ******
  • Posts: 2,703
  • Gender: Male
  • Om Nom Nom?
Re: Random 500 internal serer errors
« Reply #1 on: September 18, 2009, 05:18:41 PM »
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

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal serer errors
« Reply #2 on: September 18, 2009, 05:35:17 PM »

Offline Yigal

  • SMF Hero
  • ******
  • Posts: 2,703
  • Gender: Male
  • Om Nom Nom?
Re: Random 500 internal serer errors
« Reply #3 on: September 18, 2009, 07:24:44 PM »
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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,968
    • StoryBB/StoryBB on GitHub
Re: Random 500 internal serer errors
« Reply #4 on: September 18, 2009, 09:10:32 PM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #5 on: September 18, 2009, 10:31:09 PM »
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.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Random 500 internal server errors
« Reply #6 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.

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #7 on: September 19, 2009, 01:06:51 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

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Random 500 internal server errors
« Reply #8 on: September 19, 2009, 01:11:52 AM »
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:

Code: [Select]
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:
Code: [Select]
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 :)
« Last Edit: September 19, 2009, 01:19:26 AM by SoLoGHoST »

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #9 on: September 19, 2009, 01:18:27 AM »
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

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Random 500 internal server errors
« Reply #10 on: September 19, 2009, 01:23:37 AM »
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!

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Random 500 internal server errors
« Reply #11 on: September 19, 2009, 01:59:38 AM »
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.

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #12 on: September 19, 2009, 02:26:19 AM »
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

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Random 500 internal server errors
« Reply #13 on: September 19, 2009, 02:33:11 AM »
You're Welcome, let me know either way.

Cheers :)

Offline Pandos

  • Jr. Member
  • **
  • Posts: 151
  • Gender: Male
Re: Random 500 internal server errors
« Reply #14 on: September 19, 2009, 12:41:28 PM »
Look for +followSymlinks in .htaccess or either in your apache conf. files. If this option is enabled you'll get this errors.

Regards
Sven

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #15 on: September 19, 2009, 01:32:04 PM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,968
    • StoryBB/StoryBB on GitHub
Re: Random 500 internal server errors
« Reply #16 on: September 19, 2009, 07:04:11 PM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #17 on: September 19, 2009, 08:54:17 PM »
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.

Offline Joey Smith™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,356
  • Gender: Male
Re: Random 500 internal server errors
« Reply #18 on: October 01, 2009, 12:53:07 AM »
Any update on this?

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #19 on: October 01, 2009, 01:18:34 AM »
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

Offline Joey Smith™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,356
  • Gender: Male
Re: Random 500 internal server errors
« Reply #20 on: October 01, 2009, 01:36:11 AM »
Are you aware that your site is set to show debug information?

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Random 500 internal server errors
« Reply #21 on: October 23, 2009, 01:20:54 AM »
plusev, just ran into this topic here at SMF => Twenty-two things you can do to make SMF go faster, perhaps this can be of some help?

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #22 on: October 26, 2009, 12:51:18 AM »
I tried quite a few of those tips but none seemed to have any effect. I also did a fresh install of 2 1.2 with no mods and still got the same search errors. The hosting co gave up on working on it and I've almost thrown in the towel myself.

Thx, +EV

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Random 500 internal server errors
« Reply #23 on: October 26, 2009, 09:42:32 AM »
Oh, Sorry to hear that.  Well, perhaps changing to a different host would resolve the problem then.

Well, Good Luck bro!

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #24 on: October 31, 2009, 06:14:35 PM »
Does this mean anything to anyone? Enabled error logging for php and got the following error which coincided with a 500 error:

PHP Fatal error: Call to undefined function phptrinfo() in //web/error.php on line 2

Thx

Offline Tristan Perry

  • SMF Hero
  • ******
  • Posts: 2,498
  • Gender: Male
    • Tristan Perry
Re: Random 500 internal server errors
« Reply #25 on: October 31, 2009, 06:42:23 PM »
Where did you get that error.php file from? It contains a typo - it should say "phpinfo()" and not "phptrinfo()" as it currently does.

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #26 on: October 31, 2009, 11:28:41 PM »
The error.php is from the hosting co. The .info was mine and the name is correct. I noticed that too - makes no sense

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #27 on: November 03, 2009, 12:21:38 PM »
anyone?

thx

Offline Joey Smith™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,356
  • Gender: Male
Re: Random 500 internal server errors
« Reply #28 on: December 26, 2009, 04:51:09 AM »
Do you still need help with this issue or has it been resolved?

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Random 500 internal server errors
« Reply #29 on: December 30, 2009, 03:21:21 PM »
Turns out it was a misconfig of PHP on the server from when I had them upgrade to the latest version. Only took them 3 months to correct. Thanks for the follow up.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Random 500 internal server errors
« Reply #30 on: December 30, 2009, 03:49:54 PM »
Well, that's good to know that you got it fixed afterall.  Shame it took them 3 months to figure this out though.

Offline Joey Smith™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,356
  • Gender: Male
Re: Random 500 internal server errors
« Reply #31 on: December 31, 2009, 04:03:33 AM »
Thanks for letting us know.