Welcome! Log In Create A New Profile

Advanced

sendfile EAGAIN support broken?

December 24, 2010 05:01PM
I've been trying figure out a problem we are seeing in passenger module where by the full POST data isnt passed to the underlying application.

After much digging I believe this may actually be a problem with the http_upstream / sendfile support in the core nginx code.

The following log snippet shows a trace of this happening:-

2010/12/24 18:04:08 [debug] 27169#0: *21 connected
2010/12/24 18:04:08 [debug] 27169#0: *21 http upstream connect: 0
2010/12/24 18:04:08 [debug] 27169#0: *21 http upstream send request
2010/12/24 18:04:08 [debug] 27169#0: *21 chain writer buf fl:0 s:2405
2010/12/24 18:04:08 [debug] 27169#0: *21 chain writer buf fl:0 s:15939
2010/12/24 18:04:08 [debug] 27169#0: *21 chain writer buf fl:1 s:23658449
2010/12/24 18:04:08 [debug] 27169#0: *21 chain writer in: 0000000801885F78
2010/12/24 18:04:08 [debug] 27169#0: *21 sendfile() sent only 18344 bytes (35: Resource temporarily unavailable)
2010/12/24 18:04:08 [debug] 27169#0: *21 sendfile: -1, 1, 0, @0 18344:23658449
2010/12/24 18:04:08 [debug] 27169#0: *21 chain writer out: 0000000801885F98
2010/12/24 18:04:08 [debug] 27169#0: *21 event timer add: 23: 600000:1293214448446
2010/12/24 18:04:08 [debug] 27169#0: *21 kevent set event: 23: ft:-2 fl:0025
2010/12/24 18:04:08 [debug] 27169#0: *21 http run request: "/uploadfile"
2010/12/24 18:04:08 [debug] 27169#0: *21 http upstream check client, write event:1, "/uploadfile"
2010/12/24 18:06:08 [debug] 27169#0: *21 http run request: "/uploadfile"

The last line is where the 2 minute request timeout triggered.

It seems that even though EAGAIN is returned there is never an attempt to try to send the remaining data.

Any ideas?
Subject Author Posted

sendfile EAGAIN support broken?

steveh December 24, 2010 05:01PM

Re: sendfile EAGAIN support broken?

steveh December 24, 2010 07:43PM

Re: sendfile EAGAIN support broken?

Piotr Sikora December 24, 2010 08:42PM

Re: sendfile EAGAIN support broken?

Maxim Dounin December 24, 2010 10:00PM

Re: sendfile EAGAIN support broken?

steveh January 05, 2011 08:01PM

Re: sendfile EAGAIN support broken?

Maxim Dounin January 06, 2011 02:14AM

Re: sendfile EAGAIN support broken?

steveh January 06, 2011 04:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready