lighttpd/PHP-fcgi bleibt mit "Fehler 500" hängen

marekventur

New Member
Hallo,

also ich bin vor kurzem von S4Y auf Proplay umgezogen. Bin mit dem neuen VServer dort sehr zufrienden, habe aber Probleme mit lighttpd und PHP.

Selbst zu einigen Lastzeiten rennt der Server ohne Probleme. Jedoch hängt er sich sporadisch mit einem "500"er Fehler auf, von dem sich der Server auch nicht mehr von selbst "erholt". Ein einfacher /etc/init.d/lighttpd restart löst das Problem kurzfristig.

PHP läuft über FastCGI. Anfangs hatte ich folgende Einstellung:

Code:
".php" => ((
                     "bin-path" => "/usr/bin/php5-cgi",
                     "socket" => "/tmp/php.socket"
                     ))

und habe nach mehreren 500er Fehlern auf folgende Einstellung gewechselt:


Code:
".php" => ((
                     "bin-path" => "/usr/bin/php5-cgi",
                      "host" => "127.0.0.1",
                      "port" => 1026,
                      "max-procs" =>5
                      
                     ))

Auch hier kommt es immer wieder zu diesen Ausfällen. Der Log sagt folgendes:

Code:
2008-09-22 23:23:21: (log.c.75) server started 
2008-09-23 12:03:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 163 1024 
2008-09-23 12:03:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 164 1024 
2008-09-23 12:03:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 165 1024 
2008-09-23 12:03:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 166 1024 
2008-09-23 12:03:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 166 1024 
2008-09-23 12:03:47: (mod_fastcgi.c.3455) all handlers for  /resp/checkword.php on .php are down. 
2008-09-23 12:04:13: (log.c.135) server stopped 
2008-09-23 12:04:15: (log.c.75) server started

Zum System: Ein Debian Etch Minimal, einem Standart lighttpd,
php -v spuckt folgendes aus
Code:
PHP 5.2.0-8+etch11 (cgi-fcgi) (built: May 10 2008 10:41:01)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

Ram/CPU-Power hat der VServer noch genung, aber numtcpsock und othersockbuf haben öfter das Limit erreicht:

Code:
cat /proc/user_beancounters
Version: 2.5
       uid  resource           held    maxheld    barrier      limit    failcnt
     2318:  kmemsize        6481704    6825415   20971520   20971520          0
            lockedpages           0          0        344        344          0
            privvmpages       53695     167001     196608     196608          0
            shmpages           1920       4496       8192       8192          0
            dummy                 0          0          0          0          0
            numproc              80         90        256        256          0
            physpages         17017      74931          0 2147483647          0
            vmguarpages           0          0     196608     196608          0
            oomguarpages      17663      74931     131072     196608          0
            numtcpsock           24        256        256        256       6434
            numflock              7         23        100        110          0
            numpty                1          2         16         16          0
            numsiginfo            1         17        256        256          0
            tcpsndbuf        279720     766164    2768240    2768240          0
            tcprcvbuf        321864    1158500    2768240    2768240          0
            othersockbuf     159412     336868     336896     336896       2548
            dgramrcvbuf           0       4440     132096     132096          0
            numothersock        109        186        256        256          0
            dcachesize       287182     375204 2147483647 2147483647          0
            numfile            1871       2259       5000       5000          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            numiptent            14         14        128        128          0

Das Problem scheint laut Google öfter vorzukommen, jedoch hab ich keine wirkliche Lösung gefunden.

Ist euch schon ähnliches untergekommen? Habt ihr vielleicht eine Lösung parat?

Viele Grüße Marek
 
Sorry, dass ich die Dikussion noch mal hochschiebe. Aber mir fällt wirklich nichts mehr ein, und irgendjemand muss doch schon mal ähnliches passiert sein.

Momentan halte ich mich mit folgendem Cronjob über Wasser:
Code:
#!/bin/bash
NB=`wget -q -O - http://www.wortopia.de|grep DOCTYPE | wc -l`
if [ $NB = 0 ]
then
echo "FastCGI liefert 500" 
/etc/init.d/lighttpd stop
/etc/init.d/lighttpd start
echo " - Lighttpd neu getartet"
fi

Dieses Script startet täglich mindestens 3mal den lighttpd-Deamon neu. Inzwischen ist das mehr als ärgerlich und nur noch Symptom-Doktorei. Ich mein, ein Webserver darf nicht einfach so abstürzen, auch nicht wegen evtl. schlecht programmierten php (so kompliziert sind die Scripte auch nicht).

Neue Erscheinung ist, dass manchmal (2x wöchentlich) nicht mal ein "lighttpd restart" weiterhilft:
(network.c.300) can't bind to port: 80 Address already in use failed!

Hier nochmal meine momentane FastCGI-Einstellungen:

Code:
fastcgi.server = (  

                     ".php" => ((
                     "bin-path" => "/usr/bin/php5-cgi",
                      "host" => "127.0.0.1",
                      "port" => 1026,
                      "max-procs" =>5,
                      "bin-environment" => (
                                "PHP_FCGI_CHILDREN" => "4",
                                "PHP_FCGI_MAX_REQUESTS" => "200",
                        ),
                      "bin-copy-environment" => ( "PATH", "SHELL", "USER" )
                     ))
                                     
                 )

Hier ist der aktuelle lighttpd/error.log:

Code:
(...)
2008-10-02 15:26:07: (log.c.75) server started 
2008-10-02 21:01:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-02 21:01:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-02 21:01:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-02 21:01:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-02 21:01:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-02 21:01:45: (mod_fastcgi.c.3455) all handlers for  /resp/checkword.php on .php are down. 
2008-10-02 21:02:04: (log.c.135) server stopped 
2008-10-02 21:02:05: (log.c.75) server started 
2008-10-02 22:02:11: (mod_fastcgi.c.2786) socket failed: No buffer space available 170 1024 
2008-10-02 22:02:11: (mod_fastcgi.c.2786) socket failed: No buffer space available 170 1024 
2008-10-02 22:02:11: (mod_fastcgi.c.2786) socket failed: No buffer space available 170 1024 
2008-10-02 22:02:11: (mod_fastcgi.c.2786) socket failed: No buffer space available 170 1024 
2008-10-02 22:02:11: (mod_fastcgi.c.2786) socket failed: No buffer space available 170 1024 
2008-10-02 22:02:11: (mod_fastcgi.c.3455) all handlers for  /resp/chat.php on .php are down. 
2008-10-02 22:02:23: (log.c.135) server stopped 
2008-10-02 22:02:27: (log.c.75) server started 
2008-10-03 15:31:19: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 15:31:19: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 15:31:19: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 15:31:19: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 15:31:19: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 15:31:19: (mod_fastcgi.c.3455) all handlers for  /resp/chat.php on .php are down. 
2008-10-03 15:31:35: (log.c.135) server stopped 
2008-10-03 15:31:35: (log.c.75) server started 
2008-10-03 16:02:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 16:02:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 16:02:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 16:02:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 16:02:44: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 16:02:50: (mod_fastcgi.c.3455) all handlers for  /resp/checkword.php on .php are down. 
2008-10-03 16:03:11: (log.c.135) server stopped 
2008-10-03 16:03:15: (log.c.75) server started 
2008-10-03 17:40:04: (mod_fastcgi.c.2786) socket failed: No buffer space available 165 1024 
2008-10-03 17:40:04: (mod_fastcgi.c.2786) socket failed: No buffer space available 165 1024 
2008-10-03 17:40:04: (mod_fastcgi.c.2786) socket failed: No buffer space available 165 1024 
2008-10-03 17:40:04: (mod_fastcgi.c.2786) socket failed: No buffer space available 165 1024 
2008-10-03 17:40:04: (mod_fastcgi.c.2786) socket failed: No buffer space available 165 1024 
2008-10-03 17:40:08: (mod_fastcgi.c.3455) all handlers for  /resp/checkword.php on .php are down. 
2008-10-03 17:40:15: (log.c.135) server stopped 
2008-10-03 17:40:18: (log.c.75) server started 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1463 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1393 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1475 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1465 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1476 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1460 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1461 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1474 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1570 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1569 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1476 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.3213) response not received, request sent: 1376 on socket: tcp:127.0.0.1:1027 for /resp/checkword.php , closing connection 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:56: (mod_fastcgi.c.2721) establishing connection failed: Connection refused socket: tcp:127.0.0.1:1027 
2008-10-03 17:40:56: (mod_fastcgi.c.2721) establishing connection failed: Connection refused socket: tcp:127.0.0.1:1026 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1464 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1324 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1474 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1521 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1475 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1476 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1474 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1461 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1485 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1461 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1567 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1569 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1324 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1485 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1475 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1461 on socket: tcp:127.0.0.1:1030 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.3281) error: unexpected close of fastcgi connection for /resp/checkword.php (no fastcgi process on host:127.0.0.1, port: 1026 ?)5 
2008-10-03 17:40:57: (mod_fastcgi.c.2721) establishing connection failed: Connection refused socket: tcp:127.0.0.1:1030 
2008-10-03 17:40:57: (mod_fastcgi.c.2721) establishing connection failed: Connection refused socket: tcp:127.0.0.1:1029 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1393 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1474 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1375 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1347 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1474 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1375 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1464 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1476 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1475 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1465 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1347 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1324 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1463 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1347 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1460 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2428) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3213) response not received, request sent: 1325 on socket: tcp:127.0.0.1:1028 for /resp/checkword.php , closing connection 
2008-10-03 17:40:57: (mod_fastcgi.c.2721) establishing connection failed: Connection refused socket: tcp:127.0.0.1:1028 
2008-10-03 17:40:57: (mod_fastcgi.c.3455) all handlers for  /resp/checkword.php on .php are down. 
2008-10-03 17:41:02: (log.c.135) server stopped 
2008-10-03 17:41:02: (log.c.75) server started 
2008-10-03 18:01:17: (mod_fastcgi.c.2786) socket failed: No buffer space available 167 1024 
2008-10-03 18:01:17: (mod_fastcgi.c.2786) socket failed: No buffer space available 167 1024 
2008-10-03 18:01:17: (mod_fastcgi.c.2786) socket failed: No buffer space available 167 1024 
2008-10-03 18:01:17: (mod_fastcgi.c.2786) socket failed: No buffer space available 167 1024 
2008-10-03 18:01:17: (mod_fastcgi.c.2786) socket failed: No buffer space available 167 1024 
2008-10-03 18:01:18: (mod_fastcgi.c.3455) all handlers for  /resp/checkword.php on .php are down. 
2008-10-03 18:02:20: (log.c.135) server stopped 
2008-10-03 18:02:23: (log.c.75) server started 
2008-10-03 18:40:36: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 18:40:36: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 18:40:36: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 18:40:36: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 18:40:36: (mod_fastcgi.c.2786) socket failed: No buffer space available 169 1024 
2008-10-03 18:40:37: (mod_fastcgi.c.3455) all handlers for  /resp/getwords/4.php on .php are down. 
2008-10-03 18:52:58: (server.c.1355) unlink failed for: /var/run/lighttpd.pid 2 No such file or directory 
2008-10-03 18:52:58: (log.c.135) server stopped 
2008-10-03 18:55:11: (log.c.75) server started

Über irgendeinen Hinweis würde ich mich sehr freuen. Ich habe nämlich keine Lust, wieder zurück zu Apache zu wechseln.

Vielen Dank schon mal im Vorraus
Marek Ventur
 
Hallo!
Ich weis nicht, in welche Richtung du Antworten oder Lösungen erwartest. Du hast halt nicht genug Ressourcen af deinem vServer zur Verfügung. Die failcounts siehst du ja selbst. Ich gehe davon aus, das du die Bedeutung der einzelnen Parameter kennst - falls nicht, UBC primary parameters - OpenVZ Wiki gibt im Detail darüber Aufschluss.

mfG
Thorsten
 
Danke für die Antwort!

Du tippst also auf Resourcenengpässe? Das wäre zwar eine einleuchtende Antwort, aber ich glaube in meinen Fall passt das nicht so gut:

1. Der Server fällt auch oft Mitten in der Nacht aus, und zu Zeiten wo nicht viel "Betrieb" ist.
2. Ram ist selten/nie über 25% Barrier ausgelastet
3. Cpu meistens nur am idle'n

Wo ich aber regelmäßg ans Limit stoße ist numtcpsock. Es kann doch nicht sein, dass die Anzahl der TCP-Verbindungen der Begrenzende Faktor eines Web-Servers ist. Eine Lösung wäre, die Anzahl der TCP-Verbindungen zum minmimieren. Aber wo setzte ich da an?

Limit/Barrier ist bei 256, FastCGi/PHP verbrauchen davon 20. Da auf der Seite aber selten mehr als 400 Besucher/Tag sind (diese Seite hier), weiß ich nicht, womit die vielen TCP-Verbindungen aufgebracuht werden.

Wenn ich beancounter aufrufe erhalte ich auch selten mehr als 30 Verbindungen bei "held".

Ich weiß mir wirklich keinen Rat mehr...

Marek
 
Pass doch mal deine Konfiguration an, vielleicht liegt da der Hund begraben. Poste mal die lighttpd.conf bzw vereinfache einfach mal deine FastCGI-Konfiguration.

z.B.
Code:
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-fcgi"
                                 )
                               )
                            )
 
ich probier es mal aus. Hab nur die Pfadde angepasst:

Code:
".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/tmp/php.socket",
                                   "bin-path" => "/usr/bin/php5-cgi"
                                 )
                               )

Vielleicht geht es ja. Ich melde mich dann noch mal!
 
Schon wieder nichts... Port 80 war sogar schon wieder 3 Minuten belegt... (can't bind to port: 80 Address already in use)

An der Einbindung von PHP scheint es also so nicht zu liegen.

Ich bin wirklich ratlos. Hier der letzte error.log

Code:
2008-10-03 22:30:50: (mod_fastcgi.c.1731) connect failed: Cannot allocate memory on unix:/tmp/php.socket-2 
2008-10-03 22:30:50: (mod_fastcgi.c.2849) backend died, we disable it for a 5 seconds and send the request to another backend instead: reconnects: 0 load: 38 
2008-10-03 22:30:50: (mod_fastcgi.c.1731) connect failed: Cannot allocate memory on unix:/tmp/php.socket-1 
2008-10-03 22:30:50: (mod_fastcgi.c.2849) backend died, we disable it for a 5 seconds and send the request to another backend instead: reconnects: 1 load: 38 
2008-10-03 22:30:50: (mod_fastcgi.c.1731) connect failed: Cannot allocate memory on unix:/tmp/php.socket-0 
2008-10-03 22:30:50: (mod_fastcgi.c.2849) backend died, we disable it for a 5 seconds and send the request to another backend instead: reconnects: 2 load: 38 
2008-10-03 22:30:50: (mod_fastcgi.c.1731) connect failed: Cannot allocate memory on unix:/tmp/php.socket-3 
2008-10-03 22:30:50: (mod_fastcgi.c.2849) backend died, we disable it for a 5 seconds and send the request to another backend instead: reconnects: 3 load: 38 
2008-10-03 22:30:51: (mod_fastcgi.c.3455) all handlers for  /resp/checkword.php on .php are down. 
2008-10-03 22:34:02: (log.c.135) server stopped 
2008-10-03 22:34:02: (log.c.75) server started
 
laut "top" ist ligghtpd selbst nach einem angeblich erfolgreichen "stop" immer noch aktiv. ich tippe also mal darauf, dass der lighttp-Deamon nicht richtig gestoppt wird/werden kann....

Das "/etc/init.d/lighttpd stop" schlägt sich auch nicht mehr im lighttpd error-log nieder.
 
Zeig uns doch mal die lighttpd.conf. Dann beende doch den lighttpd-Prozess vollständig.
 
Hier die lighttpd.conf:

Code:
# Debian lighttpd configuration file
# 

############ Options you really have to take care of ####################

## modules to load
# mod_access, mod_accesslog and mod_alias are loaded by default
# all other module should only be loaded if neccesary
# - saves some time
# - saves memory

server.modules              = ( 
            "mod_access",
            "mod_alias",
            "mod_accesslog",
            "mod_rewrite", 
            "mod_fastcgi",
#            "mod_magnet", 
#           "mod_redirect", 
#           "mod_status", 
            "mod_evhost",
#           "mod_compress",
#           "mod_usertrack",
#           "mod_rrdtool",
#           "mod_webdav",
#           "mod_expire",
#           "mod_flv_streaming",
#           "mod_evasive"
 )

## a static document-root, for virtual-hosting take look at the 
## server.virtual-* options
server.document-root       = "/var/www/"

## where to send error-messages to
server.errorlog            = "/var/log/lighttpd/error.log"

## files to check for if .../ is requested
index-file.names           = ( "index.php", "index.html", 
                               "index.htm", "default.htm" )


## Use the "Content-Type" extended attribute to obtain mime type if possible
# mimetype.use-xattr = "enable"

#### accesslog module
accesslog.filename         = "/var/log/lighttpd/access.log"

## deny access the file-extensions
#
# ~    is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
#      of the document-root
url.access-deny            = ( "~", ".inc" )



######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
# server.port               = 81

## bind to localhost only (default: all interfaces)
## server.bind                = "localhost"

## error-handler for status 404
#server.error-handler-404  = "/error-handler.html"
#server.error-handler-404  = "/error-handler.php"

## to help the rc.scripts
server.pid-file            = "/var/run/lighttpd.pid"

## 
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix    = "/var/www/"

## virtual directory listings
dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"

## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers  = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot            = "/"

## change uid to <uid> (default: don't care)
server.username            = "www-data"

## change uid to <uid> (default: don't care)
server.groupname           = "www-data"

#### compress module
#compress.cache-dir          = "/var/tmp/lighttpd/cache/compress/"
#compress.filetype           = ("text/plain", "text/html")

#### status module
# status.status-url = "/server-status"
# status.config-url = "/server-config"

#### url handling modules (rewrite, redirect, access)
# url.rewrite                 = ( "^/$"             => "/server-status" )
# url.redirect                = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
evhost.path-pattern = "/var/www/%0/%3/"

#### expire module
# expire.url                  = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")

#### rrdtool
# rrdtool.binary = "/usr/bin/rrdtool"
# rrdtool.db-name = "/var/www/lighttpd.rrd"


#### handle Debian Policy Manual, Section 11.5. urls
#### and by default allow them only from localhost

$HTTP["remoteip"] =~ "127.0.0.1" {
	alias.url += ( 
		"/doc/" => "/usr/share/doc/",
		"/images/" => "/usr/share/images/"
	)
	$HTTP["url"] =~ "^/doc/|^/images/" {
		dir-listing.activate = "enable"
	}
}

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")


#### external configuration files
## mimetype mapping
include_shell "/usr/share/lighttpd/create-mime.assign.pl"

## load enabled configuration files, 
## read /etc/lighttpd/conf-available/README first
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

fastcgi.server = (  #"chat.cgi" => ((
                  #   "bin-path" => "/var/www/fcgi/chat/chat",
                  #   "socket" => "/tmp/wcgi.socket",
                  #   "max-procs" => 1,
                  #   "check-local" => "disable",
                  # )),

                   #  ".php" => ((
                   #  "bin-path" => "/usr/bin/php5-cgi",
                     #"socket" => "/tmp/php.socket",
                   #   "host" => "127.0.0.1",
                   #   "port" => 1026,
                   #   "max-procs" =>5,
                  #    "bin-environment" => (
                   #             "PHP_FCGI_CHILDREN" => "1",
                  #              "PHP_FCGI_MAX_REQUESTS" => "200",
                   #     ),
                  #    "bin-copy-environment" => ( "PATH", "SHELL", "USER" )
                  #   ))
                   ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/tmp/php.socket",
                                   "bin-path" => "/usr/bin/php5-cgi"
                                 )
                               )
                   
                 )

$HTTP["host"] == "www.wortopia.de" {
  url.rewrite-once = (
    "^/(.*)-(.*)-(.*)-(.*).htm$" => "/$1.php?value1=$2&value2=$3&value3=$4",   
    "^/(.*)-(.*)-(.*).htm$" => "/$1.php?value1=$2&value2=$3",    
    "^/(.*)-(.*).htm$" => "/$1.php?value1=$2", 
    "^/(.*).htm$" => "/$1.php"     
    
  )
}

$HTTP["host"] == "www2.wortopia.de" {
  url.rewrite-once = (
    "^/(.*)-(.*)-(.*)-(.*).htm$" => "/$1.php?value1=$2&value2=$3&value3=$4",   
    "^/(.*)-(.*)-(.*).htm$" => "/$1.php?value1=$2&value2=$3",    
    "^/(.*)-(.*).htm$" => "/$1.php?value1=$2", 
    "^/(.*).htm$" => "/$1.php"
     
    
  )
}

$HTTP["host"] == "support.wortopia.de" {
  url.rewrite-once = (
    "^/(.*)-(.*)-(.*)-(.*).htm$" => "/$1.php?value1=$2&value2=$3&value3=$4",   
    "^/(.*)-(.*)-(.*).htm$" => "/$1.php?value1=$2&value2=$3",    
    "^/(.*)-(.*).htm$" => "/$1.php?value1=$2", 
    "^/(.*).htm$" => "/$1.php",
    "^/box-(.*).js$" => "/box.php?website=$1"
    
  )
}

$HTTP["host"] == "blog.wortopia.de" {   
  #server.document-root = "/var/www/wortopia.de/blog"
  #magnet.attract-physical-path-to = ( server.document-root + "/rewrite.lua" )
  url.rewrite-once = (
    "^" + "/var/www/wortopia.de/blog/" + "(wp-.+).*/?" => "$0",
    "^" + "/var/www/wortopia.de/blog/" + "(sitemap.xml)" => "$0",
    "^" + "/var/www/wortopia.de/blog/" + "(xmlrpc.php)" => "$0",
    "^" + "/var/www/wortopia.de/blog/" + "()/([A-Za-z_0-9-])/?$" => "/var/www/wortopia.de/blog" + "index.php?keyword=$1",
    "^" + "/var/www/wortopia.de/blog/" + "(.+)/?$" => "/var/www/wortopia.de/blog" + "index.php/$1"
)
}

Hab dem Prozess ein SIGTERM geschickt und neu gestartet. Jetzt läuft der Server wieder, auf jeden Fall mal vorerst....
 
Wieder das selbe Spiel... Wieder eine 500-er Fehlerseite. Und lighttpd scheint sich jetzt gar nicht mehr per /etc/init.d/lighttpd stop stoppen zu lassen, nur noch per SIGTERM
 
So, für heute abend hab ich genug von FastCGI... Jetzt läuft PHP erstmal als CGI. Vielleicht ist das nicht ganz so schnell, dafür muss ich mich jetzt aber auch nicht rumärgern... :-[

Danke für eure Hilfe bis jetzt. Würde mich freuen, wenn jemand vielleicht doch noch einen Hinweis hätte....
 
Back
Top