freezes #110

cj opened this Issue May 1, 2012 · 27 comments


None yet

cj commented May 1, 2012


So I'm using the current master head and have this code:

  def show
    respond_with claim do |format|
      format.pdf do
        render pdf: claim.number.gsub(/[^0-9a-z]/i, '_'), layout: 'print.html'

and once it gets to here:

"***************\"/usr/local/bin/wkhtmltopdf\" -q        - - ***************"

It just freezes. When I kill the server with ctrl + c it then renders the pdf.... any ideas on what's going wrong?

Many thanks

p.s. I'm using the latest home brew version /usr/local/Cellar/wkhtmltopdf/0.11.0_rc1

cj commented May 2, 2012

So I found out something very strange, it's showing the wkhtmltopdf bin icon in the dock and when I click on it then it completes generating the pdf. I'm using mac osx 10.7.3....

I can verify the exact same behaviour with OS X 10.7.4.

mech commented May 16, 2012

I encounter this issue with OS X 10.7.4 and 0.10.0 rc2 (but strangely brew said I install 0.11.0_rc1, but the command line version is 0.10)

Only after you the process icon on the "dock" will it quickly render and exit.

cdmwebs commented May 21, 2012

+1 on 10.7.4 and /usr/local/Cellar/wkhtmltopdf/0.11.0_rc1/bin/wkhtmltopdf.

This issue isn't specific to wicked_pdf, I'm having the same problem with PDFKit. The problem didn't appear until I installed 0.11.0_rc1 via homebrew. I stumbled on this ticket while trying to track down whether or not this was an issue with the wkhtmltopdf binary that comes with homebrew.

I see this issue as well. which wkhtmltopdf shows /usr/local/bin/wkhtmltopdf which is a link to ../Cellar/wkhtmltopdf/0.11.0_rc1/bin/wkhtmltopdf. However, I see the 0.10 when I run wkhtmltopdf --version.

inkstak commented Jun 3, 2012


The problem comes from wkhtmltopdf. It has been reported at
I also used OSX 10.7.4 and wkhtmltopdf 0.11.rc1.

By waiting a solution, I moved back to 0.9.9 and it works.

coolbox commented Jun 26, 2012

Currently running OSX 10.7.4 and wkhtmltopdf 0.9.9 and this isn't working for me. wkhtmltopdf bin icon appears in my dock but clicking it or exiting it does nothing and Firefox just outputs a "Connection was reset" error after approx 10 seconds.

dsnipe commented Jun 27, 2012

Same problem.
OSX 10.7.4, wkhtmltopdf 0.10.0 rc2 (installed by homebrew).

coolbox commented Jun 27, 2012

I got this working in the end. Rolling back to version 0.9.9 fixed the problem for me.

I also had to be careful as i was using Unicorn with a process timeout of 30s. I had some PDF's (before optimisation) which were taking longer than 30s to generate so i was getting timeout errors, as you'd expect.

If you're not sure about how to rollback to an older package version using Homebrew, i did a writeup here: Homebrew and installing old package versions.

Same problem here. Tried so many different options. Such a simple task, so many problems with dependencies and native extensions..

Dreyfuzz commented Oct 1, 2012

I'm on OS 10.6.8, same issue. Solved by rolling back wkhtmltopdf to 0.9.9. Now the wkhtmltopdf shell just pops up and disappears, leaving a beautiful pdf in the browser. Here's full steps, for newbs:

Step 1: uninstall wkhtmltopdf
$ brew uninstall wkhtmltopdf
Uninstalling /usr/local/Cellar/wkhtmltopdf/0.11.0_rc1...

Step 2: find version 0.9.9
$ brew versions wkhtmltopdf
0.11.0_rc1 git checkout aa80fbc /usr/local/Library/Formula/wkhtmltopdf.rb
0.9.9 git checkout 6e2d550 /usr/local/Library/Formula/wkhtmltopdf.rb

Step 3: Copy and paste the git checkout command (everything from git over to the right):
$ git checkout 6e2d550 /usr/local/Library/Formula/wkhtmltopdf.rb

Step 4: reinstall
$ brew install wkhtmltopdf

The last output line should say something like
/usr/local/Cellar/wkhtmltopdf/0.9.9: 6 files, 424K, built in 15 seconds

Before step 3 you have to cd to /usr/local/Library/Formula/ otherwise you will get a fatal: '/usr/local/Library/Formula/wkhtmltopdf.rb' is outside repository error.

dsci commented Oct 18, 2012

Same problem here: OSX 10.7.5 and newest wkhtmltopdf from homebrew. The solution to roll back to 0.9.9 works fine for me.

gamov commented Mar 18, 2013

I've just migrated to 10.8.3 and now, wkhtmltopdf is showing up in the Dock when converting PDF... is there a way to stop this Dock 'appearance'?

Dreyfuzz commented Apr 2, 2013

If it goes away once the PDF is rendered, don't worry about it. It's just showing that the script is running on your machine. It won't happen in production.

installing 0.9.9 worked for me,

is it possible that it's been two major releases since the last working version?

is this issue happening only to MAC users?


unixmonkey commented Jan 25, 2014

As far as I've ever heard, this only affects OSX builds of wkhtmtopdf binaries. Most production systems run Linux or Windows, that do not suffer this strange behavior, and it is one of the reasons I have recommended in the past for people to stick with 0.9.6. I plan to investigate more this weekend, as that is quite old now, and a few major releases behind.

For information, this seems to be fixed with last binary package from here
I just installed 0.12.1 (carbon edition) and it worked

Well not so bright: I still have some PDF not working. Apparently it hangs for larger files like this : with big CSS data
But using command line on this file work well.

wkhtmltopdf with wicked_pdf 0.9.9 or 0.11.0 on OS X 10.10.1 got same problem.

See my next comment.

For people who use Puma. You need at least 2 process worker. With only 1 worker it will freeze. Change to 2 workers worked for me. The number of process workers can be set in config/puma.rb.

@JuanitoFatas I hang when using 'rails s' to serve my app on Mac. Any idea if this is related / is there a way to increase # of workers using the default rails s?

Hi People I was struggling to make it work but I was having constant freezes, all as described in previous messages here. I am Cent OS 6.6 64bits, with latest binary downloaded from . I am new to this project, but when I heard lots of complain I thought that it would not be possible to use it.

Luckily after reading these posts and thanks to @beerlington saying that he had problem after installing the 0.11.0_rc1 I installed a previous version 0.10.0_rc2 which is now working fine with no freezes. I also noticed that even charts generated by flot improved quality with same settings I was using before.

It seems that problem occurred with version 0.11.0_rc1 and it is common to every platform.

Despite this, after all is working now smoothly, I can say it is a great project.

TheFox commented Feb 4, 2016

It freezes with version 0.10.0 rc2.

nagrgk commented Apr 18, 2016

just comment below line if you face issues again (from application.rb).

config.middleware.use WickedPdf::Middleware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment