Bug #2316
closedFreeBSD fastcgi broken: connection was dropped after accept()
Description
When running Lighttpd 1.4.28 under FreeBSD FastCGI scripts fail every few requests (not always, but often enough so you notice).
The error_log is full with:
2011-05-12 23:45:53: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10262
2011-05-12 23:45:53: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10261
2011-05-12 23:45:53: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10262
2011-05-12 23:45:54: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10260
2011-05-12 23:45:57: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10261
2011-05-12 23:45:58: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10263
2011-05-12 23:46:00: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10262
2011-05-12 23:46:00: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10262
2011-05-12 23:46:00: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10262
2011-05-12 23:46:03: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10261
2011-05-12 23:46:03: (mod_fastcgi.c.3094) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: tcp:127.0.0.1:10261
Same configuration works fine with Lighttpd 1.4.26
Changing kqueue to poll or select does not help.
Problem occurs with both FreeBSD 8.2 as well as on an old server with FreeBSD 6.
Updated by stbuehler over 13 years ago
- Priority changed from High to Normal
show us some syscall traces (truss, ktrace, ...?), make sure your fastcgi app isn't just crashing.
Updated by Max_nl over 13 years ago
Problem is that if I do a "truss -o truss.txt -p PID-OF-LIGHTTPD" there are no longer any errors.
If I press CTRL-C to kill truss, the errors start appearing again.
This truss behavior is also mentioned in another bug, perhaps it concerns something very similar? http://redmine.lighttpd.net/issues/1644
And no the app has not crashed, as FreeBSD would have mentioned that in /var/log/messages. (pid xx exited on signal yy)
Updated by Max_nl over 13 years ago
Found a workaround.
It does work ok with 1.4.28 when using FastCGI over Unix sockets, instead of TCP sockets.
Causes errors:
fastcgi.server = (
".php" =>
(
(
"host" => "127.0.0.1", "port" => 10260,
"bin-path" => "/usr/local/bin/php",
"bin-environment" => ("PHP_FCGI_CHILDREN" => "1", "PHP_FCGI_MAX_REQUESTS" => "1000000"),
"bin-copy-environment" => ("PATH", "SHELL", "USER"),
"allow-x-send-file" => "enable"
)
)
)
Works ok:
fastcgi.server = (
".php" =>
(
(
"socket" => "/tmp/php.socket",
"bin-path" => "/usr/local/bin/php",
"bin-environment" => ("PHP_FCGI_CHILDREN" => "1", "PHP_FCGI_MAX_REQUESTS" => "1000000"),
"bin-copy-environment" => ("PATH", "SHELL", "USER"),
"allow-x-send-file" => "enable"
)
)
)
Updated by stbuehler over 13 years ago
- Status changed from New to Missing Feedback
- Target version deleted (
1.4.29)
Perhaps we can look at it again if you can show us the tcpdump of a connection, but i expect it to look like that:
lighttpd <--> php --> SYN <-- SYN,ACK --> ACK <-- RST
I don't think it is our job to handle that.
Updated by stbuehler over 10 years ago
- Status changed from Missing Feedback to Reopened
delayed connect() may be broken, see:
Updated by stbuehler over 10 years ago
- Target version changed from 1.4.35 to 1.4.36
Updated by stbuehler over 9 years ago
- Target version changed from 1.4.36 to 1.4.37
Updated by stbuehler about 9 years ago
- Target version changed from 1.4.37 to 1.4.38
Updated by stbuehler about 9 years ago
- Target version changed from 1.4.38 to 1.4.x
Updated by gstrauss almost 9 years ago
Related ticket: https://redmine.lighttpd.net/issues/2329
Updated by stbuehler almost 9 years ago
- Related to Bug #2329: connection was dropped after accept() added
Updated by gstrauss over 8 years ago
Please close ticket: Missing Feedback.
If this is still a problem, please reopen ticket and provide new details. Thank you.
Updated by gstrauss over 8 years ago
- Status changed from Reopened to Missing Feedback
If this is still a problem, please reopen ticket and provide new details. Thank you.
Also available in: Atom