<div dir="ltr">And it work fine in nginx too (it is very fast =o ), using this configuration:<div><br></div><div><div>    upstream fastcgi_backend {</div><div>        server <a href="http://127.0.0.1:8080">127.0.0.1:8080</a>;</div><div>        keepalive 8;</div><div>    }</div></div><div><br></div><div><div><span class="" style="white-space:pre">    </span>location /test {</div><div><span class="" style="white-space:pre">           </span>fastcgi_pass fastcgi_backend;</div><div><span class="" style="white-space:pre">              </span>fastcgi_keep_conn on;<br></div><div><span style="white-space:pre">...</span></div><div><span class="" style="white-space:pre">       </span>}</div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Loading time: 4 ms<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 15, 2015 at 1:30 AM, silvioprog <span dir="ltr"><<a href="mailto:silvioprog@gmail.com" target="_blank">silvioprog@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Oops ... I sent an incorrect example ...</div><div class="gmail_quote"><br></div><div class="gmail_quote">Please use this new example in attached, it is the correct example.</div><span class=""><div class="gmail_quote"><br></div><div class="gmail_quote">On Sat, Feb 14, 2015 at 11:51 PM, silvioprog <span dir="ltr"><<a href="mailto:silvioprog@gmail.com" target="_blank">silvioprog@gmail.com</a>></span> wrote:</div></span><div class="gmail_quote">[...]<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div>I was able to make the example works in "enablereuse=on" mode! =)<br></div><span class=""><div><br></div><div>It was not necessary to change the mycustfcgi.pas, it is the same as the previous example.</div><div><br></div><div>This made the application more responsive, now I hold the F5 key on the browser and I can see the millisecond changing on the screen, even with another tab "locked" in a 10-second loop. In the first example it was not possible.<br></div><div><br></div><div>In that second example was added the "KeepConnection" property. If it is False, the application will work as the first example that I sent: each connection is closed in the end of request. If it is True, it will only open a new thread if the first thread was still occupied in any processing, otherwise the AcceptConnection of the application will be used.</div><div><br></div><div>I'm really impressed with the great performance achieved, please check this log below (Chrome debug the result):<br></div><div><br></div><div>KeepConnection = False<br></div><div>--</div><div><br></div><div><div><b>Status 200 OK - Loading time: 1022 ms</b></div><div><br></div><div>KeepConnection = True<br></div><div>--</div><div><br></div><div><b>Status 200 OK - Loading time: 8 ms</b></div></div><div><br></div><div>To test it, download the attached example, unzip and run it. Using Apache 2.4.12+, make the following change in your httpd.conf:<br></div><div><br></div><div>LoadModule proxy_module modules/mod_proxy.so<br></div><div>ProxyPass /test fcgi://localhost:8080/ enablereuse=on<br></div><div>LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so</div><div><br></div><div>PS: in the code there is the comment "we will in Place the thread pool here ...", showing that at that point we will implement the thread pool, with a thread-safe list.</div></span></div></div></blockquote></div><span class=""><div><br></div>-- <br><div>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a></div>
</span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a></div>
</div></div>