<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><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><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><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></div></div></blockquote></div><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>