503 Service Temporarily Unavailable Intermittent Issue - Site hangs

aae55555

Active Member
Apr 5, 2012
44
0
56
cPanel Access Level
Root Administrator
Hi guys

I was wondering if you can help me troubleshoot an intermittent "503 Service Temporarily Unavailable". I think it may be related to my fcgid configuration.

My site has vBulletin and has been working great for months now. I installed wordpress yesterday in a seperate directory

Problem: My site will be running fine, and then every 10-15 minutes or so (although sometimes quicker or slower than this), all of a sudden it wont respond to any requests, just sits there loading, but only for about 3-4 minutes, then I'm presented with the "503 Service Temporarily Unavailable". Then when I refresh, it's back to normal in about 5 minutes.

Happens on my vBulletin page, as well as Wordpress page. I can access my cPanel however, I think this is because cPanel isn't served by Apache yes?

Nonetheless here are the server specs/config:

WHM 11.32.5 (build 11)
CENTOS 5.8 x86_64 vmware

Apache 2.2.22
PHP 5.3.10
MySQL 5.x

CPU: 2 vCPUs
RAM: 4 GB

php -v

PHP 5.3.10 (cli) (built: May 6 2012 00:04:19)
/usr/local/cpanel/bin/rebuild_phpconf --current
Available handlers: suphp dso fcgi cgi none
DEFAULT PHP: 5
PHP4 SAPI: none
PHP5 SAPI: fcgi
SUEXEC: enabled
RUID2: not installed
Apache >> Include Editor >> Pre Virtual Host Include (from WHM)
(contains some fcgid config)

<IfModule mod_fcgid.c>
FcgidMaxRequestsPerProcess 1000
FcgidMaxProcesses 50
FcgidProcessLifeTime 3600
FcgidIOTimeout 120
FcgidIdleTimeout 600
FcgidIdleScanInterval 90
FcgidBusyTimeout 300
FcgidBusyScanInterval 80
FcgidErrorScanInterval 3
FcgidZombieScanInterval 3
FcgidMinProcessesPerClass 0
FcgidMaxProcessesPerClass 4
FcgidMaxRequestLen 20468982
</IfModule>
Is the above fcgid config the issue?

Extra Info:
At the time of the hang, memory and swap usage, as well as CPU usage seems to be fine. However I may be checking the wrong thing so I will gladly take any advice!



Would appreciate any advice, thank you!
 
Last edited:

aae55555

Active Member
Apr 5, 2012
44
0
56
cPanel Access Level
Root Administrator
Ok i've looked in the Apache error_log and this is what I see during/near the time the site is freezing up:

About 20 or so of these:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
And lots of these too:
mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
This is followed by an apache restart which would explain the downtime:
[notice] Graceful restart requested, doing restart
Any ideas? :)
 

aae55555

Active Member
Apr 5, 2012
44
0
56
cPanel Access Level
Root Administrator
It just happened again, but only after an hour or so.

I altered
FcgidMaxProcessesPerClass to 20 (it was 4 before)
and
FcgidIdleTimeout to 60 (it was 600 before)
and it seemed to improve after that. But still hung.

So if this is the correct setting i'm fiddling with, what's the ideal value for " FcgidMaxProcessesPerClass" and FcgidIdleTimeout ?

Many thanks
 
Last edited:

aae55555

Active Member
Apr 5, 2012
44
0
56
cPanel Access Level
Root Administrator
Hi guys. Didn't get any of these until just now, got one 503 error:

/http://saved.im/mtg4oti5yjd0/503servicetempunavailerror.png

What does one do to try and troubleshoot such an error (site is fine now by the way, but I want to know what is causing this).

Many thanks
 

grayloon

Well-Known Member
Oct 31, 2007
117
4
68
Evansville, IN
cPanel Access Level
Root Administrator
Twitter
I'm running Varnish in front of of Apache 2.2.23, and I'm getting the 503 errors as well. In my case, they're reported by Varnish. I don't have anything in my error_log. Varnishlog shows the following for these failed requests:

17 FetchError c http first read error: -1 0 (Success)
17 VCL_call c error deliver
17 VCL_call c deliver deliver
17 TxProtocol c HTTP/1.1
17 TxStatus c 503
17 TxResponse c Service Unavailable
17 TxHeader c Server: Varnish
 

Infopro

Well-Known Member
May 20, 2003
17,113
511
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
My site has vBulletin and has been working great for months now. I installed wordpress yesterday in a seperate directory
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
If this is a fresh installation of wordpress, meaning there are no posts, users etc. remove it. For testing purposes of course. Kill it.

Server still acting up when you do?