Skip to content

Loading…

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

Merged
merged 1 commit into from

2 participants

@pyrat

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

Cheers,
Alastair

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

Thanks!

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 README.md
View
8 README.md
@@ -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.