Stop executing php script when closing browser

I have a PHP application running on Nginx and PHP-FPM.

When I used Apache, request an interrupt (close the browser) of the completed php process, but now the script continues to run until the end. The fastcgi_ignore_client_abort option is Off , and I do not use the fastcgi_finish_request function.

What could be causing this behavior? Or how can I tell php that the request is aborted?

+4
source share
2 answers

fastcgi leaves processes open and closes the handle to a specific file process. this is one of the main differences between fastcgi and regular cgi. In addition, php does not know the browser at all.

0
source

For this reason, fast-cgi usually provides better performance than mod_php . The threading approach, unlike forking, means that there is no overhead for starting the apache process for each request (or closing it).

You can adjust the number of working users to adjust the amount of resources consumed using the process manager documentation .

0
source

All Articles