Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: marsd on June 21, 2008, 01:24:57 AM

Title: Internal Server Errors
Post by: marsd on June 21, 2008, 01:24:57 AM
Hi,

I've been receiving internal server errors very often recently on my dev/semi-production site, which go away suddenly as quickly as they come. I've looked through the status.php and nothing seemed out of place. I just can't pinpoint the reason so I have no way of trying to correct it... My hosting is a shared one on GoDaddy.

What's most peculiar is that the 500 ISE only occurs when accessing the main forum index. No errors occur when I'm already browsing around within. No errors occur when I access direct links either.

Mods installed:
1.     vBulletin Style Meta Tags     1.1     
2.    More Spiders    1.1    
3.    Top 10 Posters Today And This Week Stats    1.1    
4.    Advanced Reputation System    1.4.1    
5.    Internal Links Use Same Window    1.2    
6.    Grouped Who's Online    1.0    
7.    Pretty URLs - Base    0.8.3    
8.    SMF Sitemap    1.3.0    
9.    Hide Tag    2.2.1    
10.    Ad Managment    2.3.3    
11.    Auto Embed Video Clips    2.2    

Some mods are outdated, but I stopped installing/updating any mods after the errors occurred. I use a custom, though very rough .htaccess that's modified from Pretty URLs' auto generated one.

main index: http://playingmonkey.com
status.php: http://playingmonkey.com/status.php
custom htaccess: http://playingmonkey.com/htaccess.txt
error_log as of this post: http://playingmonkey.com/error_log.txt
a core dump file: http://playingmonkey.com/core.17254

Also, I'm unable to analyse the core dump on windows... Anyone knows a way to do it?
Title: Re: Internal Server Errors
Post by: SlammedDime on June 21, 2008, 04:30:15 AM
The error_log shows the problems.  Now just to figure out why.  Can you post your Subs-Db-mysql.php?
Title: Re: Internal Server Errors
Post by: marsd on June 21, 2008, 06:32:25 AM
here it is: http://playingmonkey.com/Subs-Db-mysql.phps
Title: Re: Internal Server Errors
Post by: H on June 21, 2008, 08:02:21 AM
I believe you can use GDB on windows or Linux to analysis coredumps but it isn't particularly easy and isn't something I've ever tried :).

No script should cause a coredump to be generated so I suggest you contact Godaddy about this problem.
Title: Re: Internal Server Errors
Post by: marsd on June 21, 2008, 03:03:37 PM
I've gotten a reply from HostGator:

QuoteHello,
This is happening because you are reaching the maximum concurrent process limit of 25. Once this happens the web server will not accept any more connections to your site. This is usually caused by bad php code that does not terminate properly.

Any ideas?
Title: Re: Internal Server Errors
Post by: SlammedDime on June 21, 2008, 03:12:39 PM
I'm not too versed in shared hosting limits, but a process limit of 25 processes seems low to me.  Typical shared hosting response though... " its a problem with the script".

Depending on how busy your site is, it may be time for an upgrade, either in hosting plans, or a switch to a VPS.
Title: Re: Internal Server Errors
Post by: marsd on June 21, 2008, 03:29:50 PM
Uh it's got a total of 20 members, and only 3-5 online at anyone point usually so I'm not very sure if that's the case.
Title: Re: Internal Server Errors
Post by: 青山 素子 on June 23, 2008, 07:20:55 PM
Quote from: marsd on June 21, 2008, 03:03:37 PM
I've gotten a reply from HostGator:

Is the site with HostGator or GoDaddy? You mentioned both in this topic.

It would be somewhat easy to build up 25 processes if there are problems with the site. Imagine you visit the site and the page takes a while to load, so you hit refresh. Now you have two processes. It still takes a while, so you hit refresh again. That's three (since the first two are hung on the server until they time out). Multiply by a few users doing similar and you can hit such a low limit very fast.

The big issue is the database connection taking so long, and also the site hitting memory limits (which seem to be somewhat low).  The stats mod and possibly also the advertisement mod will add load to the database and the server, so try disabling them for now.