I have two actions, and inside one action I am calling the other one but symfony block on that call until the first one (the one I am calling from) is finished. Therefore due to this fact i am getting time out error. Does anyone know what could be the reason ?
Action is rly simple:
$url = $this->router->generate(
'invoice_show',
[
'invoiceId' => $invoiceId,
],
UrlGeneratorInterface::ABSOLUTE_URL
);
return new Response(
$this->pdfGenerator->getOutput(
$url,
[
'margin-bottom' => 3,
'margin-top' => 3,
'margin-left' => 4,
'margin-right' => 4,
'disable-javascript' => true,
'load-error-handling' => 'ignore',
'cookie' => $request->cookies->all(),
]
),
200,
[
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="' . $invoiceId . '.pdf"',
]
);
Exception:
Symfony\Component\Process\Exception\ProcessTimedOutException(code: 0): The process \"/usr/bin/xvfb-run /usr/bin/wkhtmltopdf --lowquality --margin-bottom '3' --margin-left '4' --margin-right '4' --margin-top '3' --disable-javascript --load-error-handling 'ignore' 'http://localhost/invoices/in_1Atlve2rN1gYNyHu4Ixmy8ZI' '/var/www/var/cache/dev/snappy/knp_snappy599cffb13836d0.68608376.pdf'\" exceeded the timeout of 60 seconds. at /var/www/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:1265