<div dir="ltr"><div>I think the weird issue I mentioned had something to do with ngx_pagespeed with a memcached backed and memcached was not running . It is working fine with memcached now running .</div><div><br></div><div>Somehow the sendfile and directio setting was affecting that. as I mentioned the issue fixed with enabling either sendfile and directio on with memcached not running (I think pagespeed falls back to a file based cache if memcached is not running) .</div><div><br></div><div>Right now with </div><div><br></div><div><div>sendfile on;</div><div>sendfile_max_chunk 512k;</div><div>aio threads=iopool;</div><div>directio 4m;</div></div><div><br></div><div>and memcached running ;I dont see any issues .</div><div><br></div><div>if memcached is not running (used by pagespeed) and the above setting produce weird errors that goes away if directio and sendfile is used in a mutually exclusive fashion. </div><div><br></div><div><br></div><div><br></div><div>#########</div><div><div>the book is NGINX High Performance</div><div>By Rahul Sharma</div></div><div><br></div><div>You can check the exact section in page #53 available in google books as a sample. </div><div>#########</div><div><br></div><div>So the setting</div><div><br></div><div><div>sendfile on;</div><div>sendfile_max_chunk 512k;</div><div>aio threads=iopool;   #thread_pool iopool is defined in the main context</div><div>directio 4m;</div></div><div><br></div><div><br></div><div>is good ? </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 3:35 PM, Valentin V. Bartenev <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Friday 22 January 2016 14:38:13 Anoop Alias wrote:<br>
> From an nginx book i read setting<br>
><br>
<br>
</span>What's the name of the book?<br>
<span class=""><br>
<br>
> ###########<br>
> http {<br>
><br>
> sendfile on;<br>
> sendfile_max_chunk 512k;<br>
> aio threads=default;<br>
> directio 4m;<br>
> ############<br>
><br>
> is good as it use (if i understand it correctly)<br>
<br>
</span>In some specific use case scenarios these settings can be good.<br>
<span class=""><br>
<br>
><br>
> sendfile for files less than 4m and directio for files larger than 4m<br>
><br>
> But the above config is causing issues like static css files images etc not<br>
> being served. I am not sure what exactly is the issue But commenting out<br>
><br>
> directio from the above fix it or commenting out sendfile fix it .<br>
><br>
> But adding them both creates a mess.<br>
><br>
> The question is is the above combination valid and if yes what might be<br>
> causing  the issue .<br>
><br>
<br>
</span>Could you provide the full configuration and a debug log<br>
(see <a href="http://nginx.org/en/docs/debugging_log.html" rel="noreferrer" target="_blank">http://nginx.org/en/docs/debugging_log.html</a>)?<br>
<br>
I'm unable to reproduce any issues on a simple configuration<br>
example with the settings above.<br>
<br>
  wbr, Valentin V. Bartenev<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><b>Anoop P Alias</b> <div><br></div></div></div></div>
</div>