Lighty hängt sich häufig auf :( "wait for fd at connection:

Apache, Lighttpd, nginx, Cherokee
malo
Posts: 61
Joined: 2005-01-03 22:40

Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by malo » 2007-02-12 15:35

Hi leider hängt sich mein lighty häufiger auf (nur der webserver)
ein restart hilft dann zwar, ist aber denoch nicht schön

in meiner /var/log/lighttpd/error.log habe ich solche einträge:

weiß einer woran das liegen mag bzw wie ich das problem löse? hab unten auhc mal meine php.ini angehängt.
danke schon mal, gruß

Code: Select all

2007-02-12 15:01:03: (mod_fastcgi.c.2460) wait for fd at connection: 
2020
2007-02-12 15:01:03: (mod_fastcgi.c.2460) wait for fd at connection: 
2020
2007-02-12 15:01:03: (mod_fastcgi.c.2460) wait for fd at connection: 
2020
2007-02-12 15:01:03: (mod_fastcgi.c.2460) wait for fd at connection: 
2020
2007-02-12 15:01:03: (mod_fastcgi.c.2460) wait for fd at connection: 
2020
2007-02-12 15:01:03: (mod_fastcgi.c.2460) wait for fd at connection: 
2020
2007-02-12 15:01:03: (mod_fastcgi.c.2460) wait for fd at connection: 
2020
und

Code: Select all

2007-02-12 15:00:14: (mod_fastcgi.c.2460) wait for fd at connection: 
1943
2007-02-12 15:00:14: (mod_fastcgi.c.2460) wait for fd at connection: 
1943
2007-02-12 15:00:14: (mod_fastcgi.c.2460) wait for fd at connection: 
1943
2007-02-12 15:00:14: (connections.c.1080) accept failed: Too many open 
files 24
2007-02-12 15:00:14: (connections.c.1080) accept failed: Too many open 
files 24
2007-02-12 15:00:14: (connections.c.1080) accept failed: Too many open 
files 24
2007-02-12 15:00:14: (connections.c.494) connection closed: write failed 
on fd 1943
2007-02-12 15:00:14: (network_linux_sendfile.c.152) open failed:  Too 
many open files
2007-02-12 15:00:14: (mod_fastcgi.c.2460) wait for fd at connection: 
1967
2007-02-12 15:00:14: (mod_fastcgi.c.2460) wait for fd at connection: 
1967
und

Code: Select all

2007-02-12 15:25:27: (server.c.935) connection closed - 
write-request-timeout: 112
2007-02-12 15:24:25: (server.c.935) connection closed - 
write-request-timeout: 50
*update* ganz neu drin

Code: Select all

2007-02-12 15:36:29: (server.c.935) connection closed - write-request-timeout: 63 
2007-02-12 15:36:18: (server.c.935) connection closed - write-request-timeout: 108 
2007-02-12 15:36:06: (server.c.935) connection closed - write-request-timeout: 52 

PHP.ini

Code: Select all

[PHP]
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;


engine = On
zend.ze1_compatibility_mode = Off
short_open_tag = On
asp_tags = Off
precision    =  14
y2k_compliance = On
output_buffering = On
zlib.output_compression = On
zlib.output_compression_level = -1
zlib.output_handler =
implicit_flush = Off
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = Off
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
open_basedir =
disable_functions = system, shell_exec, popen, pclose, proc_open, proc_close, proc_get_status, proc_nice, proc_terminate, exec, passthru, show_source, escapeshellcmd, escapeshellarg
disable_classes =
expose_php = Off

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 300
max_input_time = 600
memory_limit = 32M

;;;;;;;;;;;;;;;;;;
; Error Handling ;
;;;;;;;;;;;;;;;;;;

error_reporting  =  E_ALL & ~E_NOTICE
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
report_zend_debug = 0
track_errors = Off
html_errors = Off
error_log = "/var/log/lighttpd/phperr_log"

;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
variables_order = "EGPCS"
register_globals = on
register_long_arrays = on
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
magic_quotes_gpc = On
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
doc_root =
user_dir =
enable_dl = On

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads = On
upload_max_filesize = 10M
cgi.fix_pathinfo = 1

;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

allow_url_fopen = on
allow_url_include = on
from = "anonymous@localhost"
user_agent = ""
default_socket_timeout = 60
auto_detect_line_endings = Off



[Date]
;date.timezone =
;date.default_latitude = 31.7667
;date.default_longitude = 35.2333
;date.sunrise_zenith = 90.583333
;date.sunset_zenith = 90.583333

[filter]
;filter.default = unsafe_raw
;filter.default_flags =

[iconv]
;iconv.input_encoding = ISO-8859-1
;iconv.internal_encoding = ISO-8859-1
;iconv.output_encoding = ISO-8859-1

[sqlite]
;sqlite.assoc_case = 0

[xmlrpc]
;xmlrpc_error_number = 0
;xmlrpc_errors = 0

[Pcre]
;pcre.recursion_limit = 100000
;pcre.backtrack_limit = 100000

[Syslog]
define_syslog_variables = Off

[mail function]
SMTP = localhost
smtp_port = 25
;sendmail_path = "/usr/sbin/sendmail -t -i"
;mail.force_extra_parameters =

[SQL]
sql.safe_mode = Off

[MySQL]
mysql.allow_persistent = Off
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off

[MySQLi]
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off

[PostgresSQL]
pgsql.allow_persistent = Off
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0

[bcmath]
bcmath.scale = 0

[browscap]
;browscap = "extra/browscap.ini"

session.save_handler = files
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly = 
session.serialize_handler = php
session.gc_divisor     = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 4
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="



[Assertion]
assert.active = On
assert.warning = On
assert.bail = Off
assert.callback = 0
assert.quiet_eval = 0

[mbstring]
;mbstring.language = Japanese
;mbstring.internal_encoding = EUC-JP
;mbstring.http_input = auto
;mbstring.http_output = SJIS
;mbstring.encoding_translation = Off
;mbstring.detect_order = auto
;mbstring.substitute_character = none;
;mbstring.func_overload = 0
;mbstring.strict_encoding = Off

[gd]
gd.jpeg_ignore_warning = 0

[exif]
;exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel = UCS-2LE
;exif.encode_jis =
;exif.decode_jis_motorola = JIS
;exif.decode_jis_intel = JIS

[Tidy]
;tidy.default_config = "/usr/share/php/default.tcfg"
tidy.clean_output = Off

[soap]
soap.wsdl_cache_enabled = 1
soap.wsdl_cache_dir = "/tmp"
soap.wsdl_cache_ttl = 86400

; Local Variables:
; tab-width: 4
; End: 

apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask="/tmp/apc.XXXXXX"
apc.enable_cli=0

malo
Posts: 61
Joined: 2005-01-03 22:40

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by malo » 2007-03-31 13:20

keiner ne idee?
das prob besteht leider immer noch :(

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by Joe User » 2007-03-31 13:28

lighttpd.conf:

Code: Select all

server.username = "lighttpd"
server.groupname = "lighttpd"
server.stat-cache-engine = "fam"
server.event-handler = "linux-sysepoll"
server.pid-file = "/var/run/lighttpd.pid"
server.errorlog = "/var/log/lighttpd/error_log"
server.document-root = "/var/www/localhost/htdocs"
server.name = "www.yourdomain.tld"
server.follow-symlink = "enable"
server.max-keep-alive-idle = 10
server.max-fds = 2048
Wenn das nicht ausreicht: server.max-fds = 4096
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

malo
Posts: 61
Joined: 2005-01-03 22:40

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by malo » 2007-03-31 13:32

hi den tipp mit server.max-fds = 2048
hab ich auch scho aus dem wiki genommen
das hatte ich bis gerade sogar auf

server.max-fds = 8192

denoch hatte sich lighty gestern ~19 uhr aufgehängt .( und ich musste ihn restarten

die letzten zeilen der error löog von gestern:
2007-03-30 19:20:17: (server.c.935) connection closed - write-request-timeout: 8136
2007-03-30 19:18:15: (server.c.935) connection closed - write-request-timeout: 8077
2007-03-30 19:14:57: (server.c.935) connection closed - write-request-timeout: 7414
2007-03-30 19:14:37: (connections.c.1080) accept failed: Too many open files 24
2007-03-30 19:14:37: (connections.c.494) connection closed: write failed on fd 8108
2007-03-30 19:14:37: (network_linux_sendfile.c.152) open failed: Too many open files
hier das error.log
http://89.163.146.113/error.log.1.gz (20kb)


Danke, gruß malo

User avatar
Joe User
Project Manager
Project Manager
Posts: 11138
Joined: 2003-02-27 01:00
Location: Hamburg

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by Joe User » 2007-03-31 15:26

Poste bitte die vollständige (die virtuellen Hosts kannst Du weglassen) Ausgabe von:

Code: Select all

lighttpd -V
lighttpd -p -f /etc/lighttpd/lighttpd.conf
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.

malo
Posts: 61
Joined: 2005-01-03 22:40

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by malo » 2007-04-01 14:01

Danke schon mal für deine hilf und mühe

hier die ausgaben:

lighttpd -V

Code: Select all

R146113:~# lighttpd -V
lighttpd: invalid option -- V
lighttpd-1.4.3 (ssl) (Sep  1 2005 17:43:12) - a light and fast webserver
usage:
lighttpd -p -f /etc/lighttpd/lighttpd.conf

Code: Select all

config {
    server.max-keep-alive-requests = 0
    server.max-keep-alive-idle     = 4
    server.modules                 = (
        "mod_indexfile",
        "mod_rewrite",
        "mod_redirect",
        "mod_access",
        "mod_auth",
        "mod_status",
        "mod_fastcgi",
        "mod_cgi",
        "mod_accesslog",
        "mod_dirlisting",
        "mod_staticfile",
        # 11
    )
    server.document-root           = "/var/www/"
    server.errorlog                = "/var/log/lighttpd/error.log"
    server.indexfiles              = ("index.php", "index.html", "index.htm", "default.htm")
    mimetype.assign                = (
        ".pdf"     => "application/pdf",
        ".sig"     => "application/pgp-signature",
        ".spl"     => "application/futuresplash",
        ".class"   => "application/octet-stream",
        ".ps"      => "application/postscript",
        # 5
        ".torrent" => "application/x-bittorrent",
        ".dvi"     => "application/x-dvi",
        ".gz"      => "application/x-gzip",
        ".pac"     => "application/x-ns-proxy-autoconfig",
        ".swf"     => "application/x-shockwave-flash",
        # 10
        ".tar.gz"  => "application/x-tgz",
        ".tgz"     => "application/x-tgz",
        ".tar"     => "application/x-tar",
        ".zip"     => "application/zip",
        ".php3"    => "application/x-httpd-php",
        # 15
        ".mp3"     => "audio/mpeg",
        ".m3u"     => "audio/x-mpegurl",
        ".wma"     => "audio/x-ms-wma",
        ".wax"     => "audio/x-ms-wax",
        ".ogg"     => "audio/x-wav",
        # 20
        ".wav"     => "audio/x-wav",
        ".gif"     => "image/gif",
        ".jpg"     => "image/jpeg",
        ".jpeg"    => "image/jpeg",
        ".png"     => "image/png",
        # 25
        ".xbm"     => "image/x-xbitmap",
        ".xpm"     => "image/x-xpixmap",
        ".xwd"     => "image/x-xwindowdump",
        ".css"     => "text/css",
        ".html"    => "text/html",
        # 30
        ".htm"     => "text/html",
        ".js"      => "text/javascript",
        ".asc"     => "text/plain",
        ".c"       => "text/plain",
        ".conf"    => "text/plain",
        # 35
        ".text"    => "text/plain",
        ".txt"     => "text/plain",
        ".dtd"     => "text/xml",
        ".xml"     => "text/xml",
        ".mpeg"    => "video/mpeg",
        # 40
        ".mpg"     => "video/mpeg",
        ".mov"     => "video/quicktime",
        ".qt"      => "video/quicktime",
        ".avi"     => "video/x-msvideo",
        ".asf"     => "video/x-ms-asf",
        # 45
        ".asx"     => "video/x-ms-asf",
        ".wmv"     => "video/x-ms-wmv",
        # 47
    )
    accesslog.filename             = "/var/log/lighttpd/access.log"
    url.access-deny                = ("~", ".inc")
    server.pid-file                = "/var/run/lighttpd.pid"
    server.username                = "www-data"
    server.groupname               = "www-data"
    fastcgi.server                 = (
        ".php" => (
            (
                "bin-path"              => "/usr/bin/php5-cgi",
                "socket"                => "/tmp/php.socket",
                "max-procs"             => 10,
                "idle-timeout"          => 30,
                "bin-environment"       => (
                    "PHP_FCGI_CHILDREN"     => "16",
                    "PHP_FCGI_MAX_REQUESTS" => "10000",
                    # 2
                ),
                # 5
                "bin-copy-environment"  => ("PATH", "SHELL", "USER"),
                "broken-scriptfilename" => "enable",
                # 7
            ),
        ),
    )
    server.event-handler           = "linux-sysepoll"
    server.max-fds                 = 12000
    cgi.assign                     = (
        ".pl"  => "/usr/bin/perl",
        ".cgi" => "/usr/bin/perl",
        # 2
    )
    status.status-url              = "/server-status"
    auth.backend.plain.userfile    = "lighttpd.user"
    auth.require                   = (
        "/admintest" => (
            "method"  => "basic",
            "realm"   => "adminarea",
            "require" => "user=admin",
            # 3
        ),
    )

Roger Wilco
Administrator
Administrator
Posts: 5924
Joined: 2004-05-23 12:53

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by Roger Wilco » 2007-04-01 14:02

Probier es mit einem neueren lighttpd. Version 1.4.13 ist aktuell, 1.5.0 steht in den Startlöchern.

malo
Posts: 61
Joined: 2005-01-03 22:40

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by malo » 2007-04-10 23:24

Roger Wilco wrote:Probier es mit einem neueren lighttpd. Version 1.4.13 ist aktuell, 1.5.0 steht in den Startlöchern.
so seit 5 tagen läuft 1.4.13 nun schon, und bisher ohne murren und ohne zicken.. danke für den hinweis....


ist es schon empfehlenswert auf 1.5.0 pre zu wechseln? (kann man die alte config behalten?)
gruß

blattlaus
Posts: 52
Joined: 2007-03-08 13:45

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by blattlaus » 2007-04-11 07:11

Ins blaue geraten sieht es so aus als käme das Dateisysteme nicht hinterher. Ist das ein VServer oder die Kiste stark ausgelastet?

malo
Posts: 61
Joined: 2005-01-03 22:40

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by malo » 2007-04-11 09:24

ne is nen eigener Root..
zum dateisystem:

Code: Select all

Dateisysteme: 
Mount  |  Typ       |  Partion  |  Belegte Kapazität (%  |  Frei    |     Belegt  |  Gesamt 
/        reiserfs    /dev/hda2      22%                    145.69 GB    39.63 GB 185.32 GB 
/proc    proc        proc           0%                     0.00 B       0.00 B 0.00 B 
/sys     sysfs       sysfs          0%                     0.00 B       0.00 B 0.00 B 
/dev/pts devpts      devpts         0%                     0.00 B       0.00 B 0.00 B 
/dev/shm tmpfs       tmpfs          0%                     1008.50 MB    0.00 B 1008.50 MB 
Gesamt:                             21%                    146.68 GB    39.63 GB 186.31 GB 


ZUm Root:

Model: Intel(R) Pentium(R) 4 CPU 3.20GHz
Physical Memory: 2GB Ram Arbeitsspeicher
IDE Devices: Maxtor 6B200P0 (189.92 GB)
ST3200822A (186.31 GB)
Chip Mhz: 3201.21 (i686)
Cache Grösse: 1024 KB


Betriebssystem: linux (Kernel: 2.6.17-cks1-rootserver)
4.0

Jetzt Gerade (09:17)
CPU Auslastung: 17,4%
Durchschnittliche Serverlast vor:
01 Minuten: 0.59
05 Minuten: 0.61
15 Minuten: 0.55


naja wie gesagt
aktuell läuft alles fein ( Server aktiv seit: 7 Tage, 0 Stunden, 46 Minuten )

SERVER_SOFTWARE lighttpd/1.4.13

sledge0303
Posts: 695
Joined: 2005-09-16 00:06
Location: Berlin-Reinickendorf

Re: Lighty hängt sich häufig auf :( "wait for fd at connection:

Post by sledge0303 » 2007-04-11 11:22

Ich benutze für ein Testprojekt die 1.5pre wegen dem AJP13_worker. Hab bislang 2-3 kleinere Bugs und Ungereimtheiten entdeckt. PHP-FCGI wird per spawn-fcgi eingebunden, da es kein mod_fastcgi mehr gibt. Bin eigentlich zufrieden mit den bisherigen Testergebnissen.