Webkit : Considerable use of RAM

Bug #1086731 reported by YannickB (YOLO consulting)
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Account - Financial Report
New
Undecided
Unassigned

Bug Description

Hi everyone,

First I'd like to thank you for the great financial_report_webkit module, you almost save one of our project here.

We have a customer which generate a large amount of line in his accounting, aka one month = 500pdf pages on the general ledger.

We are able to print 3month of general ledger, but if we try to print all the year wkhtmltopdf crash without error message.

We finally figured the problem, wkhtmltopdf use a considerable amount of RAM. We have 6Go RAM on the server dedicated to OpenERP, it wasn't enough.

I precise the problem does not come from OpenERP, OpenERP compute during an hour and then call wkhtmltopdf which crash.

My question is : Do you know any way to workaround the problem? It'll difficult for me to say to the customer improve the RAM to 20Go just for the general ledger. How the guys who wrote wkhtmltopdf does when dealing with such large amount of data?

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : Re: [Bug 1086731] [NEW] Webkit : Considerable use of RAM

On mer. 05 déc. 2012 11:48:52 CET, YannickB wrote:
> Public bug reported:
>
> Hi everyone,
>
> First I'd like to thank you for the great financial_report_webkit
> module, you almost save one of our project here.
>
> We have a customer which generate a large amount of line in his
> accounting, aka one month = 500pdf pages on the general ledger.
>
> We are able to print 3month of general ledger, but if we try to print
> all the year wkhtmltopdf crash without error message.
>
> We finally figured the problem, wkhtmltopdf use a considerable amount of
> RAM. We have 6Go RAM on the server dedicated to OpenERP, it wasn't
> enough.
>
> I precise the problem does not come from OpenERP, OpenERP compute during
> an hour and then call wkhtmltopdf which crash.
>
> My question is : Do you know any way to workaround the problem? It'll
> difficult for me to say to the customer improve the RAM to 20Go just for
> the general ledger. How the guys who wrote wkhtmltopdf does when dealing
> with such large amount of data?
>
> ** Affects: account-financial-report
> Importance: Undecided
> Status: New
>

I assume your server is 64bit ?

--
Alexandre Fayolle
Chef de Projet
Tel : + 33 (0)4 79 26 57 94

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com

Revision history for this message
YannickB (YOLO consulting) (yannick-buron) wrote :

Yes it is.

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hi,

Usually, wkhtmltopdf does not take more than 2, maybe 3 Go. The used
amount of RAM should stay stable along the generation. Is that too much
on 6GB?

We just printed a report of 3655 pages and it used max 2.9 GB during 1
hour. It was on a 32bits architecture though. I just launched the same
report on a 64bits one, it is still running and uses ~3.2GB

First, check if you have the latest wkhtmltopdf version.

We had an issue on one of our customer's server, which is possibly the
same than yours. When we were printing a big report > 500 pages, the
used RAM sometimes (not on each printing) started to grow and grow until
OOM (then kill of the process). With the same data, same code and same
wkhtmltopdf version, we could not reproduce it on another server nor
workstation. So it seems to be related to the environment or hardware,
but we could not identify what exactly. Now, they have moved to a new
server and this problem does no longer appear.

To summarize, sometimes there is a memory leak somewhere in the
wkhtmltopdf library. Unfortunately we couldn't localize what caused it.

Sorry, not sure that helps you, but at least you are aware of this. And
give a try to print the report on another machine (and check how much
RAM it uses), that may be a temporary solution.

Maybe you are already aware of that, but you can also active a
"centralize in reports" option on accounts (typically VAT accounts) and
this can drastically reduce your count of pages.

Guewen

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.