Project

General

Profile

Bug #2053

lighttpd 1.5 svn on Solaris get error message

Added by stephen about 10 years ago. Updated about 3 years ago.

Status:
Obsolete
Priority:
Normal
Assignee:
-
Category:
mod_proxy_core
Target version:
Start date:
2009-08-21
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
Yes

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
....

History

#1

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

#2

Updated by stephen about 10 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"

#3

Updated by icy about 10 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() :)

#4

Updated by stephen about 10 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?

#5

Updated by icy about 10 years ago

server.network-backend = "writev" 
#6

Updated by stephen about 10 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?

#7

Updated by icy about 10 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.

#8

Updated by stephen about 10 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.

#9

Updated by benbrown about 10 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.

#10

Updated by stephen about 10 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
}

#11

Updated by gstrauss about 3 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()

#12

Updated by gstrauss about 3 years ago

  • Status changed from Need Feedback to Obsolete

Also available in: Atom