Wkhtmltopdf: How to set timeout?

Created on 15 Nov 2015  路  3Comments  路  Source: wkhtmltopdf/wkhtmltopdf

I've just found wkhtmltopdf on my linux machine was working for the last 28 minutes eating 99% of CPU and effectively killing the server. Can I set some kind of timeout so it it can't create a PDF within 30 seconds it dies?

Question

Most helpful comment

Is something like this viable ?

xvfb-run -a -s "-screen 0 640x480x16" \
    timeout --preserve-status 40 -k 60 \
    wkhtmltopdf http://www.qwamci.com/ /tmp/qwam.pdf

All 3 comments

You'd have to do that outside of wkhtmltopdf.

Closing as the answer was provided.

Is something like this viable ?

xvfb-run -a -s "-screen 0 640x480x16" \
    timeout --preserve-status 40 -k 60 \
    wkhtmltopdf http://www.qwamci.com/ /tmp/qwam.pdf
Was this page helpful?
0 / 5 - 0 ratings

Related issues

caleywoods picture caleywoods  路  4Comments

klondi picture klondi  路  4Comments

marcrib picture marcrib  路  3Comments

dhughesbc picture dhughesbc  路  4Comments

pyTex picture pyTex  路  3Comments