note 119692 added to function.fastcgi-finish-request

From: Date: Thu, 04 Aug 2016 09:29:33 +0000
Subject: note 119692 added to function.fastcgi-finish-request
Groups: php.notes 
Request: Send a blank email to php-notes+get-206207@lists.php.net to get a copy of this message
There are some pitfalls you should be aware of when using this function. The script will still occupy a FPM process after fastcgi_finish_request(). So using it excessively for long running tasks may occupy all your FPM threads up to pm.max_children. This will lead to gateway errors on the webserver. Another important thing is session handling. Sessions are locked as long as they're active (see the documentation for session_write_close()). This means subsequent requests will block until the session is closed. You should therefore call session_write_close() as soon as possible (even before fastcgi_finish_request()) to allow subsequent requests and a good user experience. This also applies for all other locking techniques as flock or database locks for example. As long as a lock is active subsequent requests might bock. ---- Server IP: 72.52.91.14 Probable Submitter: 78.94.37.178 ---- Manual Page -- http://php.net/manual/en/function.fastcgi-finish-request.php Edit -- https://master.php.net/note/edit/119692 Del: integrated -- https://master.php.net/note/delete/119692/integrated Del: useless -- https://master.php.net/note/delete/119692/useless Del: bad code -- https://master.php.net/note/delete/119692/bad+code Del: spam -- https://master.php.net/note/delete/119692/spam Del: non-english -- https://master.php.net/note/delete/119692/non-english Del: in docs -- https://master.php.net/note/delete/119692/in+docs Del: other reasons-- https://master.php.net/note/delete/119692 Reject -- https://master.php.net/note/reject/119692 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206207) next »