sendfile EAGAIN support broken?
steveh
nginx-forum at nginx.us
Sat Dec 25 01:01:39 MSK 2010
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?
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,160981,160981#msg-160981
More information about the nginx
mailing list