8000 feature #4224 [Components][HttpKernel] outline implications of the ke… · symfony/symfony-docs@8dc90ef · GitHub
[go: up one dir, main page]

Skip to content

Commit 8dc90ef

Browse files
committed
feature #4224 [Components][HttpKernel] outline implications of the kernel.terminate event (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [Components][HttpKernel] outline implications of the kernel.terminate event | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #4198 Commits ------- c4f4588 outline implications of the kernel.terminate event
2 parents d3b5ba2 + c4f4588 commit 8dc90ef

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

components/http_kernel/introduction.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,15 @@ 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+
Internally, the HttpKernel makes use of the :phpfunction:`fastcgi_finish_request`
478+
PHP function. This means that at the moment, only the `PHP FPM`_ server
479+
API is able to send a response to the client while the server's PHP process
480+
still performs some tasks. With all other server APIs, listeners to ``kernel.terminate``
481+
are still executed, but the response is not sent to the client until they
482+
are all completed.
483+
475484
.. note::
476485

477486
Using the ``kernel.terminate`` event is optional, and should only be
@@ -689,3 +698,4 @@ look like this::
689698
.. _reflection: http://php.net/manual/en/book.reflection.php
690699
.. _FOSRestBundle: https://github.com/friendsofsymfony/FOSRestBundle
691700
.. _`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
701+
.. _`PHP FPM`: http://php.net/manual/en/install.fpm.php

0 commit comments

Comments
 (0)
0