Laravel-snappy: Symfony\Component\Process\Exception\ProcessTimedOutException after 60 seconds

Created on 25 Aug 2016  ·  6Comments  ·  Source: barryvdh/laravel-snappy

Hi everyone I have used this package with Laravel Homestead (which uses PHP 7 and Ubuntu 16.04), using the binary downloaded via composer and it worked fine.

However now that I have moved this to the client's server and asked the sysadmins to install the needed dependencies etc but now I am getting the following errror:

Symfony\Component\Process\Exception\ProcessTimedOutException·The process "/var/www/vhosts/site/releases/20160825132128/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality --orientation 'landscape' --footer-center 'Page [page]' --footer-html '/tmp/knp_snappy57bf1a8864f695.77971125.html' --header-html '/tmp/knp_snappy57bf1a8864f975.55470971.html' '/tmp/knp_snappy57bf1a8864eaa3.02438702.html' '/tmp/knp_snappy57bf1a8864f486.83789457.pdf'" exceeded the timeout of 60 seconds.

I have seen a few other issues like this but seems like they said it was a problem with php built in server or something like that but I am not using the php built in server but apache server instead, plus they were a bit vague in terms of explaining how to fix it.

Hope someone can help. Thanks, Vitor

stale

Most helpful comment

See also #129 for a fix.

You need to specify the 'timeout' => 3600 in config/snappy.php.

Currently having a 'timeout' => false times out after 60s.

All 6 comments

Increase the max_execution_time in php.ini

I had the same issue com up to and I extended all of the timeouts to not time out for 5 minutes and I still got this error. About a week or two ago it was working perfectly fine.

I've suddenly starting having this problem in the last couple of days, for code that's been the same for at least a year. Haven't upgraded any composer packages or anything and the HTML itself doesn't take long to render.

All of a sudden the 60 seconds isn't enough and I'm having to wait up to 5 minutes for the PDF to output. Why would this start all of a sudden…?!

This seems to be a long standing issue #9

In my case specifying a timeout value in config/snappy.php stopped this error occurring

See also #129 for a fix.

You need to specify the 'timeout' => 3600 in config/snappy.php.

Currently having a 'timeout' => false times out after 60s.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Any issues with PDF rendering itself that are not directly related to this package, should be reported on https://github.com/KnpLabs/snappy instead. When having doubts, please try to reproduce the issue with just snappy.
If you believe this is an actual issue with the latest version of laravel-snappy, please reply to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

austenc picture austenc  ·  7Comments

larsemil picture larsemil  ·  5Comments

leonardosapiras picture leonardosapiras  ·  3Comments

MaximeDawn picture MaximeDawn  ·  3Comments

eriktobben picture eriktobben  ·  6Comments