nginx.conf<br><br>location /test {<br>    root html;<br>    content_by_lua_file &quot;conf/test.lua&quot;;<br>}<br><br>test.lua:<br>-- start<br>ngx.location.capture(&#39;/1.html&#39;)<div id=":1pg"><br>ngx.exec(&quot;/1.html&quot;)<br>
-- end<br><br>Files in folder :<br><br>nginx<br>    -- conf<br>        -- nginx.conf<br>        -- test.lua<br>    -- html<br>        -- 1.html<br></div><br>That is all<br><br>#用中文再说一遍,英语水平有限:<br>我得到的最小集合就是:<br>1. nginx.conf<br>
location /test {<br>
    root html;<br>
    content_by_lua_file &quot;conf/test.lua&quot;;<br>
}<br>server/http等配置按默认的, event module用的是 epoll<br><br>2. test.lua文件仅2行:<br>ngx.location.capture(&#39;/1.html&#39;)
<div id=":1pg"><br>ngx.exec(&quot;/1.html&quot;)<br><br>我尝试过,无论这两句话是否请求同一个文件,结果都一样.<br><br>3. 1.html文件里面仅有几个字母,我已经试过不同的文件大小,结果一样<br><br><br>我遇到的情况是这样的:<br>1. 通过wget/curl/Firefox来访问 localhost/test 都能正常显示1.html中的内容<br>2. 使用ab访问 localhost/1.html是正常的,能够pass<br>
3. 使用ab进行测试,总是timeout , 我使用的语句是 ab -v 5 localhost/test  <br>Benchmarking localhost (be patient)...INFO: POST header == <br>---<br>
GET /down2 HTTP/1.0<br>Host: localhost<br>User-Agent: ApacheBench/2.3<br>Accept: */*<br><br><br>---<br>LOG: header received:<br>HTTP/1.1 200 OK<br>Server: nginx/0.8.54<br>Date: Tue, 15 Mar 2011 07:22:30 GMT<br>Content-Type: text/plain<br>

Content-Length: 4<br>Last-Modified: Fri, 11 Mar 2011 09:32:28 GMT<br>Connection: close<br>Accept-Ranges: bytes<br><br>ABC<br><br>LOG: Response code = 200<br><span style="color:rgb(255, 0, 0)">apr_poll: The timeout specified has expired (70007)</span><br>
</div><br>其中的ABC就是1.html的内容, 非常抱歉我之前写错了.<br><br>对于0A0D的描述,仅仅是我的猜测,请无视之.<br><br>单独写 ngx.exec(&quot;/1.html&quot;) 也是能够通过ab测试的.<br><br>环境:<br>Ubuntu 10.10<br>Luajit-5.1-dev<br>Nginx 0.8.54<br>Lua-nginx-module 0.16rc2<br><br>
Thanks,<br>Wendal Chen<br><br><div class="gmail_quote">2011/3/15 agentzh <span dir="ltr">&lt;<a href="mailto:agentzh@gmail.com">agentzh@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Mar 15, 2011 at 3:26 PM, Wendal Chen &lt;<a href="mailto:wendal1985@gmail.com">wendal1985@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Lua-nginx-module 0.16RC2<br>
&gt; Nginx  0.8.54<br>
&gt;<br>
</div>[snip]<br>
<div class="im">&gt;<br>
&gt; I am Best<br>
&gt;<br>
&gt; LOG: Response code = 200<br>
&gt; apr_poll: The timeout specified has expired (70007)<br>
&gt;<br>
<br>
</div>Can you provide a minimized but complete example to help us reproduce<br>
this issue?<br>
<br>
I do not understand where the output &quot;I am Best&quot; came from in your<br>
sample, for example.<br>
<br>
And in particular, what exactly were you doing in &quot;-- do something for res&quot; ?<br>
<div class="im"><br>
&gt; I think lua-nginx-module lose some 0x0A 0x0D in resp.<br>
&gt;<br>
<br>
</div>Where does &quot;0x0A 0x0D&quot; come from?<br>
<br>
Cheers,<br>
<font color="#888888">-agentzh<br>
</font></blockquote></div><br>