CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
When I try to generate a PDF from a quotation or something else the following error messge appears:
Wkhtmltopdf failed (error code: -11). Message
Feb 9 10:50:01 SRV02 kernel: [2175649.190455] wkhtmltopdf: 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?
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.
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
We run on wkhtmltopdf 0.12.2.1 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">
While in 0.12.1 this error didnt occure nearly once,
in 0.12.2.1 this solution helped us at www.myodoo.de and for our customers
About This Community
Odoo Training Center
|Asked: 2/9/15, 5:22 AM|
|Seen: 10457 times|
|Last updated: 12/7/17, 4:26 AM|