PHP running too slow, always showing "504 Gateway Time-out"
Posted
by
komase
on Server Fault
See other posts from Server Fault
or by komase
Published on 2010-09-14T01:40:20Z
Indexed on
2011/06/23
0:24 UTC
Read the original article
Hit count: 539
PHP running too slow, always showing "504 Gateway Time-out"
My server spec:
Dual core ATOM 330 CPU
2GB RAM
Use nginx with PHP in fastcgi
use eaccelerator
CPU 74.3%id
RAM used: 350MB of 2GB
I have lots of sites in my server, with cron running every minutes all time, even on some minutes, double or triple cron running at same time.
All my sites cron is heavy, usually the cron running more than one minutes.
my nginx.conf has become too big until nginx refuse to start because too many sites in it. it has been solved by increasing server_names_hash_max_size
. Im planning to add more sites in my server
Now, opening my website always showing 504 Gateway Time-out
. I have tested many eaccelerator and PHP setting, but this 504 Gateway Time-out
still happen.
the 504 Gateway Time-out
will dissappeared when cron is disabled
I have no idea: is this because not enough processor power?
And what should I do? upgrade my processor?
--------added
this is top
for my CPU just now:
Cpu(s): 17.5%us, 3.8%sy, 0.1%ni, 71.6%id, 6.9%wa, 0.1%hi, 0.1%si, 0.0%st
© Server Fault or respective owner