Skip to content


Add info to README on how to solve the single thread deadlock issue. #141

merged 1 commit into from

2 participants


Adding a solution to the single thread deadlock issue. Proposes the use of unicorn with multiple worker processes.


@devn devn merged commit d7690c4 into pdfkit:master
pdfkit member


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 8 additions and 0 deletions.
  1. +8 −0
@@ -107,6 +107,14 @@ PDFKit comes with a middleware that allows users to get a PDF view of any page o
around this issue you may want to run a server with multiple workers
like Passenger or try to embed your resources within your HTML to
avoid extra HTTP requests.
+ Example solution (rails / bundler), add unicorn to the development
+ group in your Gemfile `gem 'unicorn'` then run `bundle`. Next, add a
+ file `config/unicorn.conf` with
+ worker_processes 3
+ Then to run the app `unicorn_rails -c config/unicorn.conf` (from rails_root)
* **Resources aren't included in the PDF:** Images, CSS, or JavaScript
does not seem to be downloading correctly in the PDF. This is due
Something went wrong with that request. Please try again.