Project

General

Profile

Actions

Bug #2316

closed

FreeBSD fastcgi broken: connection was dropped after accept()

Added by Max_nl over 13 years ago. Updated over 8 years ago.

Status:
Missing Feedback
Priority:
Normal
Category:
mod_fastcgi
Target version:
-
ASK QUESTIONS IN Forums:

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.


Related issues 2 (0 open2 closed)

Related to Bug #2329: connection was dropped after accept()Missing Feedback2011-07-26Actions
Related to Bug #2121: fastcgi failover not workingMissing Feedback2009-12-16Actions
Actions #1

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.

Actions #2

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)

Actions #3

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"
)
)
)

Actions #4

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.

Actions #5

Updated by stbuehler over 10 years ago

  • Status changed from Missing Feedback to Reopened

delayed connect() may be broken, see:

https://redmine.lighttpd.net/boards/2/topics/5960?r=5974

Actions #6

Updated by stbuehler over 10 years ago

  • Target version set to 1.4.35
Actions #7

Updated by stbuehler over 10 years ago

  • Target version changed from 1.4.35 to 1.4.36
Actions #8

Updated by stbuehler over 9 years ago

  • Target version changed from 1.4.36 to 1.4.37
Actions #9

Updated by stbuehler about 9 years ago

  • Target version changed from 1.4.37 to 1.4.38
Actions #10

Updated by stbuehler about 9 years ago

  • Target version changed from 1.4.38 to 1.4.x
Actions #12

Updated by stbuehler almost 9 years ago

  • Related to Bug #2329: connection was dropped after accept() added
Actions #13

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.

Actions #14

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.

Actions #15

Updated by stbuehler over 8 years ago

  • Target version deleted (1.4.x)
Actions #16

Updated by gstrauss 11 months ago

  • Related to Bug #2121: fastcgi failover not working added
Actions

Also available in: Atom