Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High Memory usage caused by opacity #2950

hs4b opened this issue May 15, 2016 · 2 comments


3 participants
Copy link

commented May 15, 2016

Hello devs,

while the html → pdf conversion on an MBP (16GB ram) worked like a charm as usual, i experienced a memory leak after the productive delivery on a low mem machine.

Both are running: wkhtmltopdf 0.12.3 (with patched qt)

Edit: replaced attachment by the's not that much

<!doctype html>
<html lang="de">
    <meta charset="UTF-8">
        html, body {
            width: 210mm;
            height: 297mm;
            background-color: #ffffff !important;
            font: 11pt/160% Verdana, Arial, sans-serif;

        .watermark {
            display: block;
            position: fixed;
            z-index: 999;
            width: 90mm;
            height: 45mm;
            top: 165mm;
            left: 27mm;

            color: #ff0000;
            font-size: 10em;            
            opacity: 0.3; /* comment this line out and mem usage will be reduced to ~0 */


    <div class="watermark">let's blow mem</div>

So just save the file and run: wkhtmltopdf [file_name].html [file_name].pdf and your mem usage should raise to ~1GB.

To verify the difference, comment out the opacity style in .watermark and the conversion will take ~10MB ram.

Hope this helps,


This comment has been minimized.

Copy link

commented May 15, 2016

This is a known issue in WebKit, see #1510. Upgrading the browser engine might fix this -- can you see the performance with 0.13 alpha?.

@ashkulz ashkulz closed this May 15, 2016

@ashkulz ashkulz added the Duplicate label May 15, 2016


This comment has been minimized.

Copy link

commented Jul 28, 2016

It seems we stumbled (ehem crashed at full spead) into the same issue.
So far I only can report back symtomps, we havn't get to a more detailed analisis but are working on it feverishly.

our monitoring system shows the memory consuption explodes to arround 1GB in a matter of less then our 2s stat's resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.