Forum: NGINX 502 Gateway PHP

64848a47f3851889be823688483d77cf?d=identicon&s=25 Silvio Siefke (Guest)
on 2014-04-29 00:59
(Received via mailing list)
Hello,

i try to run a database management system and no matters what i use, i
become 502 Bad Gateway.

the error log say
siefke /var/www/siefke/log $  cat error.log
2014/04/29 00:52:05 [error] 20458#0: *1 recv() failed (104: Connection
reset by peer) while reading response header from upstream, client:
10.42.0.20, server: silviosiefke_de, request: "POST /adminer.html
HTTP/1.1", upstream:
"fastcgi://unix:/var/tmp/php/silviosiefke.de.sock:", host:
"silviosiefke_de", referrer: "http://silviosiefke_de/adminer.html"

I found strange because all other of php work only the database
managements
want not work. Phpmyadmin,. sqlbuddy, adminer ever 502.

The configuration in nginx of php path:
location ~ \.(php|htm|html)$ {
try_files $uri =404;
fastcgi_pass unix:/var/tmp/php/siefke.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/configuration/fastcgi_params;
}

php config:
[siefke]
 listen = /var/tmp/php/siefke.sock
 listen.owner = nginx
 listen.group = nginx
 listen.mode = 0660
 user = siefke
 group = siefke
 pm = ondemand
 pm.max_children = 100
 pm.process_idle_timeout = 5s
 pm.start_servers = 1
 pm.min_spare_servers = 1
 pm.max_spare_servers = 35
 security.limit_extensions = .php .html
 php_flag[display_errors] = off
 php_admin_value[error_log] = /var/www/siefke/log/php.log
 php_admin_flag[log_errors] = on
 php_admin_value[memory_limit] = 32M
 php_admin_value[open_basedir] = /var/www/siefke:/usr/share/php
 php_admin_value[session.save_path]= /var/www/siefke/tmp
 php_admin_value[include_path] = /var/www/siefke/inc/php:/usr/share/php


Contao run without problems and the small scripts of php too. Has
someone
an advice what running wrong?

Thank you for help & Nice Day
Silvio
C7827ae1c607ba302ed466ffc4fec6eb?d=identicon&s=25 Scott Larson (Guest)
on 2014-04-29 01:07
(Received via mailing list)
I'm not personally a fan of telling nginx to glob all .html files for
PHP processing, but maybe that's just me and unrelated. If other PHP
apps
are working I'd dig into the logging for that. Generally when I run into
situations like this it has nothing to do with nginx and instead is
something within the PHP config. Exceeding memory is a frequent culprit,
followed by the app not liking the values sent to it within
SCRIPT_FILENAME
or PATH_INFO.



*__________________Scott LarsonSystems AdministratorWiredrive/LA310 823
8238 ext. 1106310 943 2078 faxwww.wiredrive.com
<http://www.wiredrive.com/>www.twitter.com/wiredrive
<http://www.twitter.com/wiredrive>www.facebook.com/...
<http://www.wiredrive.com/facebook>*
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.