Forum Bugs

Unable to create native thread.

robinms
I am using Prince v11.3, on a Ruby on Rails installation, using the Princely wrapper, to generate PDF reports.

I am trying to solve a strange issue that has occured. I have never had issues with this in the past, but suddenly the PDF's thats generated comes out empty. When opening in a PDF viewer, I just get an error saying the file is corrupt.

The size of the PDF files that has this problem are around 300 bytes, normal size are aroudn 150-200 kilobytes.

I can generate PDF files fine for a while, then suddenly this happens, and it stays like this until i restart Apache (which also restarts Phusion Passenger, which runs the RoR installation).

Then it will work fine for a while again, until the issue comes up again.

From the log:

Fri Apr 13 10:25:46 2018: ---- begin
Fri Apr 13 10:25:46 2018: internal error: thread: predicate `thread.spawn'/3: Unexpected: Unable to create native thread.
Fri Apr 13 10:25:46 2018: ---- end

Any ideas what causes this error?

mikeday
Which operating system are you running Prince on?
robinms
A CPanel server (v.68.0.36) on a Centos 7.4
mikeday
A temporary workaround would be to try running Prince with --no-parallel-downloads to disable creating multiple threads while we investigate further.
mikeday
We have added a workaround for this problem to latest builds, although we are still not entirely sure why the Rails/Apache stack is causing thread creation issues.