Sziasztok,
van egy szerver, rajta egy weboldal (plusz phpmyadmin, munin, stb.).
A 80-as porton egy pound proxy figyel, a static.domain.tld -re erkezo kereseket egy nginx-nek, a tobbit a 8080-on levo lighttpd -nek tovabbitja.
A lighttpd 1.4.25 -os verziojuk, a php 5.3-as fastcgi, mindketto forrasbol telepitve.
Idokozonkent (mondjuk napi egyszer), meghal az egesz, webes lekeresre timeoutol, pontosabban a timeout eleresekor a pound bedobja az 500-as hibaoldalt. Muninban ilyenkor azt latom, hogy az atlagos 100-200 szal / thread / worker, vagy nem tudom mi hirtelen felugrik 2400-ra, majd onnantol nulla. A munin plugin, ami ezt mutatja az alap apache_processes, ami a /server-status?auto url-t hivogatja.
A Lighttpd errorlog-ban ez van ilyenkor:
2010-01-04 17:25:43: (mod_fastcgi.c.1734) connect failed: Connection refused on unix:/var/run/lighttpd/akarmi.socket-3
2010-01-04 17:25:43: (mod_fastcgi.c.3024) backend died; we'll disable it for 1 seconds and send the request to another backend instead: reconnects: 0 load: 7
2010-01-10 18:09:40: (server.c.1391) [note] sockets disabled, connection limit reached
Illetve a latogatok tobbszor is mondtak, hogy 500-as hibat kapnak veletlenszeruen, ezt egyszer en is tapasztaltam, egy oldal frissites utan mar jo volt. A fenti hiba utan viszont teljesen meghal az oldal, csak egy teljes restart (killall -9 lighttpd ; killall -9 php-cgi) segit.
Az idevago lighttpd config reszek:
server.modules = (
"mod_status",
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_auth",
"mod_compress",
"mod_rewrite",
"mod_fastcgi"
)
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.stat-cache-engine = "fam"
server.max-worker = 0
server.max-fds = 8192
server.max-keep-alive-requests = 256
server.max-keep-alive-idle = 5
server.max-read-idle = 30
server.max-write-idle = 30
fastcgi.server = (
".php" => ((
"bin-path" => "/usr/local/bin/php/bin/php-cgi -c /etc/php5/sites/akarmi.hu.ini",
"socket" => "/var/run/lighttpd/akarmi.socket",
"max-procs" => 10,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "10",
"PHP_FCGI_MAX_REQUESTS" => "1000",
),
"broken-scriptfilename" => "enable",
"allow-x-send-file" => "enable"
))
)
Koszonom!