Project

General

Profile

Actions

Bug #2053

closed

lighttpd 1.5 svn on Solaris get error message

Added by stephen over 15 years ago. Updated over 8 years ago.

Status:
Obsolete
Priority:
Normal
Category:
mod_proxy_core
Target version:
ASK QUESTIONS IN Forums:

Description

on solaris system, using lighttpd + fastcgi + Catalyst, get lots of the following messages:

network_solaris_sendfilev.c.114: (error) sendfilev() failed: Address family not supported by protocol family (errno=124)
mod_proxy_core.c.1051: (error) oops, we failed to write
....

Actions #1

Updated by stbuehler over 15 years ago

  • Status changed from New to Invalid
  • Assignee deleted (darix)
  • Priority changed from High to Normal

If your system doesn't support sendfile on the filesystems/sockets you need don't use it.

Actions #2

Updated by stephen over 15 years ago

  • Status changed from Invalid to Patch Pending
  • Assignee set to darix

stbuehler wrote:

If your system doesn't support sendfile on the filesystems/sockets you need don't use it.

how to disable it? can I config it like the following:

proxy-core.allow-x-sendfile = "disable"

Actions #3

Updated by icy over 15 years ago

  • Status changed from Patch Pending to Need Feedback
  • Assignee deleted (darix)

You can set the network handler to writev or write. What version of Solaris are you using?

BTW: X-sendfile is something different. It just has the same name as the system call sendfile() :)

Actions #4

Updated by stephen over 15 years ago

icy wrote:

You can set the network handler to writev or write. What version of Solaris are you using?

BTW: X-sendfile is something different. It just has the same name as the system call sendfile() :)

version is:
SunOS test-cl2 5.10 Generic_137111-03 sun4v sparc SUNW,SPARC-Enterprise-T5220 Solaris

how to update lighttpd.conf?

Actions #5

Updated by icy over 15 years ago

server.network-backend = "writev" 
Actions #6

Updated by stephen over 15 years ago

icy wrote:

[...]

Thank you.

Could you explain more: Is this special for solaris? do we have fix for it in latest svn version? If I use lower version like 1.4.xx, do we have the same issue?

Actions #7

Updated by icy over 15 years ago

According to http://docs.sun.com/app/docs/doc/816-5172/sendfilev-3ext?l=en&a=view&q=sendfilev, Solaris does not support using sendfile() with sockets of type AF_UNIX (unix sockets).
You probably are using a fastcgi backend over a unix socket, right?
Just use writev as the network backend, it's fine.

Version of lighty does not matter in this case.

Actions #8

Updated by stephen over 15 years ago

icy wrote:

According to http://docs.sun.com/app/docs/doc/816-5172/sendfilev-3ext?l=en&a=view&q=sendfilev, Solaris does not support using sendfile() with sockets of type AF_UNIX (unix sockets).
You probably are using a fastcgi backend over a unix socket, right?
Just use writev as the network backend, it's fine.

Version of lighty does not matter in this case.

Thanks a lot.

It's not happened all the time, sometimes we got many many this error messages, sometimes don't have, so do you have any suggestion on how to reproduce this error? so that I can make sure this update will fix this issue.

Actions #9

Updated by benbrown over 15 years ago

stephen wrote:

It's not happened all the time, sometimes we got many many this error messages, sometimes don't have, so do you have any suggestion on how to reproduce this error? so that I can make sure this update will fix this issue.

Hi,

I'm on Solaris 10 here, and have had this error on 1.4 before changing to use writev. I only encountered it when some PHP was handling a file upload in a multi-part form. If you want to trigger this error it would be worth trying this.

Actions #10

Updated by stephen over 15 years ago

benbrown wrote:

stephen wrote:

It's not happened all the time, sometimes we got many many this error messages, sometimes don't have, so do you have any suggestion on how to reproduce this error? so that I can make sure this update will fix this issue.

Hi,

I'm on Solaris 10 here, and have had this error on 1.4 before changing to use writev. I only encountered it when some PHP was handling a file upload in a multi-part form. If you want to trigger this error it would be worth trying this.

Thanks!

Actually there is no file upload function in my application, just handle normal GET and POST request, a few of images and css files; back-end uses lighttpd + fastcgi over a unix socket, lighttpd listen on 2 different ports, both use the same unix socket file, totally 90 fastcgi processes running.

Also sometimes I got this error message:
mod_proxy_backend_fastcgi.c.487: (error) looks like the fastcgi-backend (/rest/get_role) terminated before it sent a FIN packet

Current lighttpd.conf is:
$HTTP["url"] !~ "^/(favicon.ico$|static/)" {
proxy-core.balancer = "round-robin"
proxy-core.protocol = "fastcgi"
proxy-core.allow-x-sendfile = "enable"
proxy-core.backends = ( "unix:/home/testuser/GWT/gwt.socket" )
proxy-core.max-pool-size = 90
}

Actions #11

Updated by gstrauss over 8 years ago

  • Missing in 1.5.x set to Yes

The probable reason that this error occurs only occassionally for some people on Solaris is that the client request body (e.g. for POST or PUT) is stored in temporary files when the size of the request body is larger than a certain threshold (e.g. 64k). When the server is Solaris AND when client input request body is large enough to be stored in temporary files AND when the backend is FastCGI, SCGI, or proxy on a unix domain socket, AND lighttpd has been configured with server.network-backend = "solaris-sendfilev", then this sendfilev() error occurs.

FYI: lighttpd 1.4.40 will catch sendfilev() EAFNOSUPPORT error (which occurs if target fd is AF_UNIX socket) and will fall back to writev()

Actions #12

Updated by gstrauss over 8 years ago

  • Status changed from Need Feedback to Obsolete
Actions

Also available in: Atom