8000 outline implications of the kernel.terminate event · symfony/symfony-docs@11fe340 · GitHub
[go: up one dir, main page]

Skip to content

Commit 11fe340

Browse files
committed
outline implications of the kernel.terminate event
1 parent 7cbad6d commit 11fe340

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/http_kernel/introduction.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,14 @@ you will trigger the ``kernel.terminate`` event where you can perform certain
472472
actions that you may have delayed in order to return the response as quickly
473473
as possible to the client (e.g. sending emails).
474474

475+
.. caution::
476+
477+
You should use the ``kernel.terminate`` event with `PHP FPM`_ only. It
478+
is the only server API which is able to finish a PHP process on the server
479+
after the response has been sent to the client. With all other server
480+
APIs, executing the listeners to the ``kernel.terminate`` event will block
481+
the connection.
482+
475483
.. note::
476484

477485
Using the ``kernel.terminate`` event is optional, and should only be
@@ -689,3 +697,4 @@ look like this::
689697
.. _reflection: http://php.net/manual/en/book.reflection.php
690698
.. _FOSRestBundle: https://github.com/friendsofsymfony/FOSRestBundle
691699
.. _`Create your own framework... on top of the Symfony2 Components`: http://fabien.potencier.org/article/50/create-your-own-framework-on-top-of-the-symfony2-components-part-1
700+
.. _`PHP FPM`: http://php.net/manual/en/install.fpm.php

0 commit comments

Comments
 (0)
0