Ich hab nun Google befragt, serverfault.com durchsucht und nen Arbeitskollegen in meiner Firma gefragt aber keiner konnte mir den "Fehler" erklären.
Zum Problem:
Mein Fast CGI destroyed in unregelmäßigen Abständen den Proccess und dann krieg ich vom Upstream einen 502 sserviert.
Mir ist bis jetzt noch nicht aufgefallen warum das so ist, den nginx error.log bot mir auch keine Information darüber.
Einen PHP Log konnte ich auch nicht finden.
Code
user stpuser;worker_processes 4;pid /var/run/nginx.pid;events { worker_connections 2048; # multi_accept on;}http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 4096; # server_tokens off; client_max_body_size 4000M; # server_names_hash_bucket_size 128; # server_name_in_redirect off; default_type application/octet-stream; include /etc/nginx/mime.types; ## # Logging Settings ## access_log /etc/nginx/logs/access.log; error_log /etc/nginx/logs/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; ## # nginx-naxsi config ## # Uncomment it if you installed nginx-naxsi ## #include /etc/nginx/naxsi_core.rules; ## # nginx-passenger config ## # Uncomment it if you installed nginx-passenger ## #passenger_root /usr; #passenger_ruby /usr/bin/ruby; ## # Virtual Host Configs ## include /etc/nginx/pages.web/*;}
---------------
Code
#! /bin/sh ### BEGIN INIT INFO# Provides: spawn-fcgi-php# Required-Start: $all# Required-Stop: $all# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: starts FastCGI for PHP# Description: starts FastCGI for PHP using start-stop-daemon### END INIT INFO PHP_FCGI_CHILDREN=5PHP_FCGI_MAX_REQUESTS=500PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binNAME=spawn-fcgi-phpPHP_CONFIG_FILE=/etc/php5/cgi/php.iniPID=/var/run/spawn-fcgi-php.pidDAEMON=/usr/bin/spawn-fcgiDAEMON_OPTS="-f /usr/bin/php-cgi -a 127.0.0.1 -p 9000 -u stpuser -g www-data -P $PID" if [ ! -x $DAEMON ]; then exit 0fi set -e case "$1" in start) echo "Starting $NAME: " start-stop-daemon --start --pidfile $PID --exec $DAEMON -- $DAEMON_OPTS echo "Server started successfully" ;; stop) echo "Stopping $NAME: " start-stop-daemon --stop --pidfile $PID --retry 5 rm -f $PID echo "Server stopped successfully" ;; restart) echo "Stopping $NAME: " start-stop-daemon --stop --pidfile $PID --retry 5 rm -f $PID echo "done..." sleep 1 echo "Starting $NAME: " start-stop-daemon --start --pidfile $PID --exec $DAEMON -- $DAEMON_OPTS echo "Restarzed!" ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|restart}" >&2 exit 1 ;;esac exit 0
---------------
Code
server { listen 80; ## listen for ipv4; this line is default and implied listen [::]:80 default_server ipv6only=on; ## listen for ipv6 root /online/www/dead-page/; index index.html index.htm index.php; # Make site accessible from http://localhost/ server_name DeadalusHD.com www.DeadalusHD.com; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ /index.html /index.htm /index.php; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules } location = /favicon.ico { alias /online/www/dead-resource/assets/images/dfavicon.ico; } location /doc/ { alias /usr/share/doc/; autoindex on; allow 127.0.0.1; allow ::1; deny all; } #error_page 404 /online/www/public-resources/assets/server-status/status/404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /online/www/public-resources/assets/server-status/status/50x.html { root /; } location ~ \.pl|cgi$ { try_files $uri =404; gzip off; fastcgi_pass 127.0.0.1:8999; fastcgi_index index.pl; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all;} }
Evtl. gibts ja hier einen Linux Nutzer der das Problem selbst hatte oder jemand der im weiten des Internets was dazu gefunden hat.