Welcome! Log In Create A New Profile

Advanced

Nginx: 502 Error every hour

Posted by YamiHoshi.nl 
Nginx: 502 Error every hour
October 26, 2010 12:07PM
I've noticed, that since I installed MediaWiki on one of the sites on that server, PHP5-CGI stops working every hour.
The only configurations I made, are these:
/etc/nginx/nginx.conf
[code]
worker_processes 1;
keepalive_timeout 2;
[/code]


/etc/php5/cgi/php.ini (at the end)
[code]
cgi.fix_pathinfo = 1
[/code]


/etc/nginx/sites-available/default (I'll only post the PHP5-related part, from one of them)
[code]
location ~ \.php$ {
fastcgi_pass localhost:9000; # port where FastCGI processes were spawned
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/yamihoshi.nl$fastcgi_script_name; # same path as above

fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;

# required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
}
}
[/code]



And I still have to do this command:
[code]
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid
[/code]


With this as an output:
[code]
spawn-fcgi: couldn't open and redirect stdout/stderr to '/dev/null': Permission denied
spawn-fcgi: child spawned successfully: PID: 11595
[root@client319 ~]#PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mhash.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mhash.so' - /usr/lib/php5/20090626+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0
<br />
<b>Warning</b>: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
^C
[/code]

What am I doing wrong?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 195
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready