Byron Posted February 7, 2011 Posted February 7, 2011 Seems anything like php or cgi/perl is throwing a 500 error on my site. I checked my Error log but it isn't showing anything. Could you take a look djbob? http://byrondallas.heliohost.org/server_load.php
Ashoat Posted February 8, 2011 Posted February 8, 2011 Apache is setup to limit each user to a maximum of 5 forked processes at a time. However, you were running fives copies of a PHP script (tools/phonify/index.php)... and so SuExec was unable to fork off a new process for your CGI script. I killed your phonify scripts and your CGI scripts are working fine now.
Byron Posted February 8, 2011 Author Posted February 8, 2011 Thanks djbob. So are you saying I'm getting too many requests at once to my phonifier tool? Is there anyway to keep that from happening?
Ashoat Posted February 8, 2011 Posted February 8, 2011 I guess you could create a CGI script that ran a bash command that counted the number of processes already running (ie. `ps aux | grep phonify | grep -vc grep`) and prevented the PHP script from running otherwise. You could have the CGI script run as a cronjob and touch a file when there are spare spots, and the PHP script would read that file to make sure there were spots.
Byron Posted February 8, 2011 Author Posted February 8, 2011 Why didn't my site come back up on it's on once all the requests had stopped?
Ashoat Posted February 8, 2011 Posted February 8, 2011 I'm not sure... what I know is that the phonify scripts were still running. It might be a bug in PHP or a bug in your script.
Byron Posted February 8, 2011 Author Posted February 8, 2011 Okay I've added this to my script: set_time_limit(60); Hopefully that will stop it after 60 seconds.
Recommended Posts