zakird / wkhtmltopdf_binary_gem

Ruby gem containing easily installable access to wkhtmltopdf application
https://rubygems.org/gems/wkhtmltopdf-binary
Apache License 2.0
179 stars 342 forks source link

Jobs not generating files and returning error Text file busy Errno::ETXTBSY #163

Open caffo opened 1 year ago

caffo commented 1 year ago

Hi, I'm using wkhtmltopdf in a low-volume app, with the jobs enqueued. From time to time, I encounter the error 'Text file busy', resulting in the PDF not being generated. However, this doesn't always happen. More information is provided below:

Stack:

RuntimeError: PDF could not be generated!
 Command Error: /opt/render/project/.gems/ruby/3.0.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf:74:in `exec': Text file busy - /opt/render/project/.gems/ruby/3.0.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf_debian_10_amd64 (Errno::ETXTBSY)
    from /opt/render/project/.gems/ruby/3.0.0/gems/wkhtmltopdf-binary-0.12.6.6/bin/wkhtmltopdf:74:in `<top (required)>'
    from /opt/render/project/.gems/bin/wkhtmltopdf:27:in `load'
    from /opt/render/project/.gems/bin/wkhtmltopdf:27:in `<main>'

System

Flow

CleanShot 2023-07-13 at 13 09 30@2x
KimTrijnh commented 3 months ago

I got the same problem when having jobs running at the same time. have you fixed it yet? Screenshot 2024-05-27 at 22 26 32

ghiculescu commented 2 months ago

See also https://github.com/mileszs/wicked_pdf/issues/1029