8000 add a caution block about php-fpm pool · symfony/symfony-docs@cdf248c · GitHub
[go: up one dir, main page]

Skip to content

Commit cdf248c

Browse files
committed
add a caution block about php-fpm pool
1 parent 020f1b7 commit cdf248c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/process.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ are done doing other stuff::
135135
advantage of the ``kernel.terminate`` event, and run your command **synchronuously**
136136
inside this event. Be aware that ``kernel.terminate`` is called only if you run ``PHP-FPM``.
137137

138+
.. caution::
139+
140+
Beware also that if you do that, the said php process won't available to serve
141+
any new request until the subprocess is finished, which means you can block your
142+
FPM pool quickly if you're not careful enough.
143+
That's why it generally way better to not do any fancy thing even after the request is sent
144+
but prefer using a job queue.
145+
138146
:method:`Symfony\\Component\\Process\\Process::wait` takes one optional argument:
139147
a callback that is called repeatedly whilst the process is still running, passing
140148
in the output and its type::

0 commit comments

Comments
 (0)
0