No way to end connection with User [Answered]RSS

1 reply

Last post Oct 05, 2015 05:19 AM by Pengzhen Song - MSFT

  • No way to end connection with User

    Oct 03, 2015 01:12 PM|davidbcn|LINK

    Please, get in touch with the MS-PHP Core contributors and implement something similar to this:

    http://php.net/manual/es/function.fastcgi-finish-request.php

    Most modern frameworks rely on registering shutdown functions or similar, and IIS/FastCGI/PHP will keep the connection open (and not deliver the response until then) making them run like a snail.

    The only way that FastCGI will actually end connection with the user is to send the Content-Length header, followed by content of such length. That is a nasty workaround that all these CMS do not implement, and that is not feasible to implement with modern web rendering strategies such as Big Pipe where you start streaming to the client the content of the page without knowing how much content are you actually going to send.

  • Re: No way to end connection with User

    Oct 05, 2015 05:19 AM|Pengzhen Song - MSFT|LINK

    Hi,

    I think there is no need to end connection with user. For performance, we can set MaxInstances and PHP_FCGI_MAX_REQUESTS and so on. For more information, please refer to the document:

    https://www.iis.net/configreference/system.webserver/fastcgi

    https://mplnsr.wordpress.com/articles/cgi-isapi-and-fastcgi/

    We are trying to better understand customer views on social support experience. Click HERE to participate the survey.
    Thanks!