<div dir="ltr">Thanks Igor.<br>I don't want to be rude, but I find it hard to believe that it's a kernel bug.<br><br>First, I'm using the default CentOS 5.2 kernel, it's seems to me pretty odd that there's such a bug in it. CentOS is being used on a lot of servers, some of them must be running nginx.<br>
<br>Second, I tried serving the same file with thttpd, and it runs just fine.<br><a href="http://195.28.180.147:40/temp/hozer.pdf">http://195.28.180.147:40/temp/hozer.pdf</a><br>Note it's the exact same file which I cannot get from nginx:<br>
<a href="http://www.noal.org.il/static/temp/hozer.pdf">http://www.noal.org.il/static/temp/hozer.pdf</a><br><br>How come thttpd can serve the file just fine? If it's a kernel bug, I thought it would happen with all of my servers.<br>
If it's using some different way of sending the files which does not depend on that epoll call - is there any way to configure nginx to use that as well?<br><br>Can I do anything to confirm that it's a kernel bug? If it is, I should probably contact CentOS's maintainers.<br>
<br>Thank you, again.<br>Yo'av.<br><br><div class="gmail_quote">On Wed, Jan 21, 2009 at 7:26 AM, Igor Sysoev <span dir="ltr"><<a href="mailto:is@rambler-co.ru" target="_blank">is@rambler-co.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Wed, Jan 21, 2009 at 01:52:53AM +0200, Yo'av Moshe wrote:<br>
<br>
> Igor, here's the new strace.<br>
> <a href="http://pastebin.com/m5129c54b" target="_blank">http://pastebin.com/m5129c54b</a><br>
><br>
> Does the fact it works in low download rates still makes you think it's a<br>
> kernel issue?<br>
<br>
</div>Yes, this is seems like a kernel issue. Kernel excatly said (with EAGAIN)<br>
that there is no place to output data, but never returned a new notification<br>
via epoll_wait() about free space:<br>
<br>
21420 01:39:43 <... epoll_wait resumed> {{EPOLLOUT, {u32=153137960, u64=13811628390360331048}}}, 512, 60000) = 1<br>
21420 01:39:43 gettimeofday({1232494783, 413764}, NULL) = 0<br>
21420 01:39:43 sendfile64(20, 21, [1645625], 304605) = 40320<br>
21420 01:39:43 sendfile64(20, 21, [1685945], 264285) = -1 EAGAIN (Resource temporarily unavailable)<br>
21420 01:39:43 epoll_wait(11, <unfinished ...><br>
<br>
This is probably some race condition inside kernel, that does not appear on<br>
low speed download.<br>
<div><div></div><div><br>
> Thank you, really!<br>
> And thanks, Kiril and Jeff, for confirming that!<br>
><br>
> Yo'av.<br>
><br>
><br>
> On Tue, Jan 20, 2009 at 9:39 PM, Kiril Angov <<a href="mailto:kupokomapa@gmail.com" target="_blank">kupokomapa@gmail.com</a>> wrote:<br>
><br>
> > wget <a href="http://www.noal.org.il/static/temp/barvazi2.pdf" target="_blank">http://www.noal.org.il/static/temp/barvazi2.pdf</a><br>
> > --2009-01-20 21:36:00-- <a href="http://www.noal.org.il/static/temp/barvazi2.pdf" target="_blank">http://www.noal.org.il/static/temp/barvazi2.pdf</a><br>
> > Resolving www.noal.org.il... 195.28.180.147<br>
> > Connecting to <a href="http://www.noal.org.il" target="_blank">www.noal.org.il</a>|195.28.180.147|:80... connected.<br>
> > HTTP request sent, awaiting response... 200 OK<br>
> > Length: 1950230 (1.9M) [application/pdf]<br>
> > Saving to: `barvazi2.pdf'<br>
> ><br>
> > 81% [=====================================> ] 1,596,665<br>
> > --.-K/s eta 5s<br>
> ><br>
> ><br>
> > wget -c <a href="http://www.noal.org.il/static/temp/barvazi2.pdf" target="_blank">http://www.noal.org.il/static/temp/barvazi2.pdf</a><br>
> > --2009-01-20 21:38:28--<br>
> > <a href="http://www.noal.org.il/static/temp/barvazi2.pdf" target="_blank">http://www.noal.org.il/static/temp/barvazi2.pdf</a><br>
> > Resolving www.noal.org.il... 195.28.180.147<br>
> > Connecting to <a href="http://www.noal.org.il" target="_blank">www.noal.org.il</a>|195.28.180.147|:80... connected.<br>
> > HTTP request sent, awaiting response... 206 Partial Content<br>
> > Length: 1950230 (1.9M), 305960 (299K) remaining [application/pdf]<br>
> > Saving to: `barvazi2.pdf'<br>
> ><br>
> > 100%[+++++++++++++++++++++++++++++++++++++++=======>] 1,950,230<br>
> > 295K/s in 1.0s<br>
> ><br>
> > 2009-01-20 21:38:30 (295 KB/s) - `barvazi2.pdf' saved [1950230/1950230]<br>
> ><br>
> ><br>
> > On Tue, Jan 20, 2009 at 9:31 PM, jeff emminger <<a href="mailto:jemminger@gmail.com" target="_blank">jemminger@gmail.com</a>><br>
> > wrote:<br>
> > >> Could anyone confirm that this works:<br>
> > >> wget --limit-rate=3500 <a href="http://www.noal.org.il/static/temp/barvazi2.pdf" target="_blank">http://www.noal.org.il/static/temp/barvazi2.pdf</a><br>
> > >> while this doesn't:<br>
> > >> wget <a href="http://www.noal.org.il/static/temp/barvazi2.pdf" target="_blank">http://www.noal.org.il/static/temp/barvazi2.pdf</a><br>
> > >><br>
> > ><br>
> > > Confirmed<br>
> > ><br>
> > ><br>
> ><br>
> ><br>
><br>
><br>
> --<br>
> Yo'av Moshe<br>
<br>
</div></div>--<br>
<div><div></div><div>Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Yo'av Moshe<br>
</div>