-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF Generation exceeded the timeout of 60 seconds #399
Comments
Hello, I'm afraid it's not related to Snappy itself but more to |
I added a logger to the snappy process. The last crash shown us the following error:
Interesting is that the previous PDF which was generated includes more data than the one when the error occurred. Think the problem is not the HTML. |
@ThemePoint is your consumer running through the I experience the same issues an running without |
Difficult to say without being able to debug it directly, but I'm pretty sure it's not Snappy related. |
After a long time we found a solution for this problem. |
Thanks to let us know! |
I just found out, that you can set the timeout in snappy. |
is there anyway to fix/work around this issue? currently experience the same. @alexpozzi |
same issue |
@itwondersteam It's very unlikely to be Snappy related so I'm afraid I can't do much for that. |
same issue |
Hello I was facing similar issue in my dev env, I use php embedded server to execute, and it's single threaded. When wkhtmltopdf tries to create pdf it makes a second request to the php server, requiring images, css, etc. but this request hangs because the 1st thread is locked waiting wkhtmltopdf finish the pdf creation, generating thus a deadlock. |
thanks a lot, you save my time |
Hello,
i am running Snappy in an Rabbit-MQ Consumer (PHP 7.2.19)(Docker-Container) to generate PDF-Tickets.
Snappy is here included into an symfony 4.2 framework but the symfony-bundle is do not used.
The server and containers are running on Ubuntu 18.04.
Since our systems process thousands of Consumer-Messages a day we have the following problem:
The snappy runs many hours without problems. But sometimes (at irregular intervals) snappy throw an ProcessTimedOutException with the message
Failed to generate invoice pdf: The process \"\/www\/management\/vendor\/h4cc\/wkhtmltopdf-amd64\/bin\/wkhtmltopdf-amd64 --lowquality --image-dpi 150 --image-quality 70 --margin-bottom '75mm' --margin-top '50mm' --enable-external-links --enable-internal-links --load-error-handling 'ignore' --load-media-error-handling 'ignore' --enable-local-file-access --disable-plugins --footer-html '\/tmp\/knp_snappy5eff19d0233bc0.91517889.html' --header-html '\/tmp\/knp_snappy5eff19d0233f01.67188931.html' --header-spacing '10' '\/tmp\/knp_snappy5eff19d0233375.94981478.html' '\/pdfs/tickets/T-754024-1.pdf'\" exceeded the timeout of 60 seconds.
When this error occurs the system can not create more pdf files until we restart the docker container. After this point snappy every time will throw the same exception.
When we restart the container the system runs as like before.
Set the timeout to 200 also do not help.
Does somebody have any idea about this behavior?
We can reproduce this behaviour in several systems on different servers.
The text was updated successfully, but these errors were encountered: