anttiviljami / wp-pdf-templates

Add PDF templates to your WordPress theme
https://wordpress.org/plugins/wp-pdf-templates
GNU General Public License v3.0
42 stars 18 forks source link

Fatal error causing 504 Gateway Time-Out -- Allowed memory bytes exhausted #20

Closed ayyobro closed 8 years ago

ayyobro commented 8 years ago

So I'm using this plugin on my site but today when I visited the site I got a 504 Gateway Time-out error.

I contact my hosting provider ( Flywheel ) and asked them to do some debugging. When they poked around they found this in the logs as the culprit:

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /www/wp-content/plugins/wp-pdf-templates/vendor/dompdf/dompdf/src/LineBox.php on line 161

Since this occurred in your plugin I'm not sure if this is a bug on your end or if the way we're using your plugin is the cause, here.

Let me know if you need more details.

anttiviljami commented 8 years ago

DOMPDF just uses a shit ton of memory unfortunately. :/ Please ask your hosting provider to add some more memory if you wish to use this plugin, or try to find ways to make the memory footprint of the pdf generation smaller, like making the template simpler with less styles and fonts etc.