Project

General

Profile

Bug #2316

FreeBSD fastcgi broken: connection was dropped after accept()

Added by Max_nl about 9 years ago. Updated about 4 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

Related to Bug #2329: connection was dropped after accept()Missing Feedback2011-07-26Actions
#1

Updated by stbuehler about 9 years ago

  • Priority changed from High to Normal

show us some syscall traces (truss, ktrace, ...?), make sure your fastcgi app isn't just crashing.

#2

Updated by Max_nl about 9 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)

#3

Updated by Max_nl about 9 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"
)
)
)

#4

Updated by stbuehler about 9 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.

#5

Updated by stbuehler over 6 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

#6

Updated by stbuehler over 6 years ago

  • Target version set to 1.4.35
#7

Updated by stbuehler over 6 years ago

  • Target version changed from 1.4.35 to 1.4.36
#8

Updated by stbuehler about 5 years ago

  • Target version changed from 1.4.36 to 1.4.37
#9

Updated by stbuehler almost 5 years ago

  • Target version changed from 1.4.37 to 1.4.38
#10

Updated by stbuehler almost 5 years ago

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

Updated by stbuehler over 4 years ago

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

Updated by gstrauss over 4 years ago

Please close ticket: Missing Feedback.

If this is still a problem, please reopen ticket and provide new details. Thank you.

#14

Updated by gstrauss over 4 years ago

  • Status changed from Reopened to Missing Feedback

If this is still a problem, please reopen ticket and provide new details. Thank you.

#15

Updated by stbuehler about 4 years ago

  • Target version deleted (1.4.x)

Also available in: Atom