Odoo Help


Wkhtmltopdf failed (error code: -11)

Lucas Huber
on 2/9/15, 5:22 AM 10,457 views

When I try to generate a PDF from a quotation or something else the following error messge appears:

Report (PDF)
Wkhtmltopdf failed (error code: -11). Message


Feb  9 10:50:01 SRV02 kernel: [2175649.190455] wkhtmltopdf[35674]: segfault at bbadbeef ip 00000000004f3449 sp 00007fff9c574870 error  6 in wkhtmltopdf[400000+2274000]

I having an Ubuntu 14.4 Server, Wkhtmltopdf was installed as follows:

sudo wget http://downloads.sourceforge.net/project/wkhtmltopdf/archive/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb

sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

Am I the only one having this issue?

@Lucas removed my answer as I looked wrong. My apologies! Do you get this error on every report? Did you modify the report code or is it still the same as from the source?

on 2/9/15, 5:49 AM

yep it is on every report.

Lucas Huber
on 2/9/15, 7:06 AM

You test your wkhtmltopdf from linux command line

on 2/9/15, 7:54 AM

@Lucas, 1.st - you should test if wkhtmltopdf wkhtmltopdf works. From bash you should issuue *wkhtmltopdf --help* 2.nd - If wkhrmltopdf works you should look at your report, because may be it has wrong data inside. Try to repeat commnda n odoo log with bash and see in /tmp what is created Hope this help Antonio

Antonio M. Vigliotti
on 2/9/15, 10:31 AM

Do you have selinux installed?

Shaun Haddrill
on 11/17/15, 5:59 PM
Lucas Huber
On 2/9/15, 11:58 AM

The solution in my question was relatively simple.

Because normally odoo is started from the root user, so the environment variable from the odoo user are not active. The  environment variables are coming from the process, eg are normally stated in the /etc/init.d/odoo-server startup file.

This variable should solve the problem:  Please ad or correct in the startup script.

Florent de Labarre
On 3/25/17, 9:59 AM

Dear, When you try to generate a big pdf (over 200 pages) with header and footer, you are an error -11. It is a limitation of max handle file per process. (default is 256). But the wkhtmltopdf open for each page the header and the footer. to change this value : http://stackoverflow.com/questions/16526783/python-subprocess-too-many-open-files In terminal : ulimit -n 10000

Johann Müller
On 8/9/17, 8:26 AM

We run on wkhtmltopdf and got the errorcode -11 only in some rare cases. So the error could appear for a sale order. Only by changing the saleorder lines or other information like deleting the notes, save, paste the old notes, we could get through the error.

How we solved the problem:

In our case, the error was not consistent. We changed the limit_memory_hard and tried other solutions, which finally didnt help us. We've been building the report styles by replacing it without inherit_id
so the new customer reportstyle template was like

<template id="report.style"> CSS HERE </template>

and we went to....

<template id="report_style_custom" inherit_id="report.style">
<xpath expr=".">

While in 0.12.1 this error didnt occure nearly once,

in this solution helped us at www.myodoo.de and for our customers


Ivan Elizaryev

--Ivan Elizaryev--
| 4 3 7
Ufa, Russian Federation
--Ivan Elizaryev--

I tried odoo at the end of 2013. I fell in love in it and have been working with odoo as a freelancer for almost two years. In September 2015 I began operate as a Company and have 5 developers for now.

Ivan, March 2016.

Ivan Elizaryev
On 3/5/16, 5:02 AM

The solution is to increase value for limit_memory_hard parameter in odoo config file


Shaun Haddrill
On 11/17/15, 5:58 PM

In my case it was selinux getting in the way, have you checked your /etc/log/audit/audit.log?

Denero Team
On 11/4/15, 2:25 AM


I am getting same issues to my vm (Debian 7.0). When I restart server it works well but after sometime I get it again. I dont know how to fix it.

Can anybody help me ?

On 9/15/15, 10:19 AM

Hi i had the same probleme, i solved it by installing wkhtmtopdf compiled with patched Qt libs. You can download it here




It happened also to me after some change of document header. Combination of header.html + body.html + footer.html goes in crash.

Be patient, restore original file html and do 1 change per time, until you'll discover what is wrong.

Be patient, very patient


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 2/9/15, 5:22 AM
Seen: 10457 times
Last updated: 12/7/17, 4:26 AM