<div dir="ltr">Thanks Igor.<br>I don&#39;t want to be rude, but I find it hard to believe that it&#39;s a kernel bug.<br><br>First, I&#39;m using the default CentOS 5.2 kernel, it&#39;s seems to me pretty odd that there&#39;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&#39;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&#39;s a kernel bug, I thought it would happen with all of my servers.<br>
If it&#39;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&#39;s a kernel bug? If it is, I should probably contact CentOS&#39;s maintainers.<br>
<br>Thank you, again.<br>Yo&#39;av.<br><br><div class="gmail_quote">On Wed, Jan 21, 2009 at 7:26 AM, Igor Sysoev <span dir="ltr">&lt;<a href="mailto:is@rambler-co.ru" target="_blank">is@rambler-co.ru</a>&gt;</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&#39;av Moshe wrote:<br>
<br>
&gt; Igor, here&#39;s the new strace.<br>
&gt; <a href="http://pastebin.com/m5129c54b" target="_blank">http://pastebin.com/m5129c54b</a><br>
&gt;<br>
&gt; Does the fact it works in low download rates still makes you think it&#39;s a<br>
&gt; 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 &lt;... epoll_wait resumed&gt; {{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, &nbsp;&lt;unfinished ...&gt;<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>
&gt; Thank you, really!<br>
&gt; And thanks, Kiril and Jeff, for confirming that!<br>
&gt;<br>
&gt; Yo&#39;av.<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Jan 20, 2009 at 9:39 PM, Kiril Angov &lt;<a href="mailto:kupokomapa@gmail.com" target="_blank">kupokomapa@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; 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>
&gt; &gt; --2009-01-20 21:36:00-- &nbsp;<a href="http://www.noal.org.il/static/temp/barvazi2.pdf" target="_blank">http://www.noal.org.il/static/temp/barvazi2.pdf</a><br>
&gt; &gt; Resolving www.noal.org.il... 195.28.180.147<br>
&gt; &gt; Connecting to <a href="http://www.noal.org.il" target="_blank">www.noal.org.il</a>|195.28.180.147|:80... connected.<br>
&gt; &gt; HTTP request sent, awaiting response... 200 OK<br>
&gt; &gt; Length: 1950230 (1.9M) [application/pdf]<br>
&gt; &gt; Saving to: `barvazi2.pdf&#39;<br>
&gt; &gt;<br>
&gt; &gt; 81% [=====================================&gt; &nbsp; &nbsp; &nbsp; &nbsp; ] 1,596,665<br>
&gt; &gt; --.-K/s &nbsp;eta 5s<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; 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>
&gt; &gt; --2009-01-20 21:38:28--<br>
&gt; &gt; <a href="http://www.noal.org.il/static/temp/barvazi2.pdf" target="_blank">http://www.noal.org.il/static/temp/barvazi2.pdf</a><br>
&gt; &gt; Resolving www.noal.org.il... 195.28.180.147<br>
&gt; &gt; Connecting to <a href="http://www.noal.org.il" target="_blank">www.noal.org.il</a>|195.28.180.147|:80... connected.<br>
&gt; &gt; HTTP request sent, awaiting response... 206 Partial Content<br>
&gt; &gt; Length: 1950230 (1.9M), 305960 (299K) remaining [application/pdf]<br>
&gt; &gt; Saving to: `barvazi2.pdf&#39;<br>
&gt; &gt;<br>
&gt; &gt; 100%[+++++++++++++++++++++++++++++++++++++++=======&gt;] 1,950,230<br>
&gt; &gt; 295K/s &nbsp; in 1.0s<br>
&gt; &gt;<br>
&gt; &gt; 2009-01-20 21:38:30 (295 KB/s) - `barvazi2.pdf&#39; saved [1950230/1950230]<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Tue, Jan 20, 2009 at 9:31 PM, jeff emminger &lt;<a href="mailto:jemminger@gmail.com" target="_blank">jemminger@gmail.com</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt; &gt;&gt; Could anyone confirm that this works:<br>
&gt; &gt; &gt;&gt; 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>
&gt; &gt; &gt;&gt; while this doesn&#39;t:<br>
&gt; &gt; &gt;&gt; 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>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Confirmed<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Yo&#39;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&#39;av Moshe<br>
</div>