0

Here is a simplified version of the page that causes me great trouble:

<?php
passthru('dd if=/path/to/file bs=xx skip=xx count=xx | resource_intensive_command | dd bs=xx skip=xx count=xx');
?>

It only stops when the client stops listening or upon completion (but it is not a quick task). It uses one thread at 100% (+ run dd on other threads).

While processing this request, any other request (needing php-fpm) ends up in a 504 Gateway Time-out error and I would like to know if I can do anything about it. I am running php8.2-fpm and nginx 1.22.1 on Debian (on a Raspberry Pi).
My guess it that it is related to some config but I am completely lost.

I have no idea if it could be an issue but all request load main.php which then calls the correct file.

1 Answer 1

0

It turns out that the same session cannot be opened twice simultaneously. (I had session_start() in main.php).

<?php
session_write_close();
passthru('dd if=/path/to/file bs=xx skip=xx count=xx | resource_intensive_command | dd bs=xx skip=xx count=xx');
?>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .