Page 1 of 1

Error in the log and PHP error log file

Posted: Sat Oct 12, 2013 8:37 am
by ricardo777
Hello,

Title says it I sometimes get a error 500 on the webpage and a refresh of the page solves it.

I am reading this in the log:

upstream prematurely closed connection while reading response header from upstream

I am reading something about NGINX and timeout or RAM issues but I have RAM enough so that is not a problem.

Also where can I find the log file for PHP errors, because I want to search for the 500 error what is showing up sometimes.

Re: Error in the log and PHP error log file

Posted: Sat Oct 12, 2013 9:43 am
by skid
If you want to see php errors enable display_errors options /etc/php.ini

Sometimes error 500 also means that your php script is repsonding too slow.

Checkout nginx and httpd configuration with increased timeouts

Code: Select all

wget http://c.vestacp.com/0.9.8/rhel/nginx-long.conf -O /etc/nginx/nginx.conf 
wget http://c.vestacp.com/0.9.8/rhel/httpd-long.conf -O /etc/httpd/conf/httpd.conf
service httpd restart
service nginx restart

Re: Error in the log and PHP error log file

Posted: Sat Oct 12, 2013 10:59 am
by ricardo777
skid wrote:If you want to see php errors enable display_errors options /etc/php.ini

Sometimes error 500 also means that your php script is repsonding too slow.

Checkout nginx and httpd configuration with increased timeouts

Code: Select all

wget http://c.vestacp.com/0.9.8/rhel/nginx-long.conf -O /etc/nginx/nginx.conf 
wget http://c.vestacp.com/0.9.8/rhel/httpd-long.conf -O /etc/httpd/conf/httpd.conf
service httpd restart
service nginx restart
Thank you very much for the really quick response, will try it out this afternoon.

Also I think 30 SEC is too little maybe? For us it is to little we are using a script that access another server via a API so it needs more time.