PDF generation took too long


#1

Hello.

I checked the FAQ & other tickets but did not find a similar one.
Just installed InvoicePlane to my vesta web server with letsencrypt ssl without proxies (ex. Cloudflare)
PHP 5.6.29-0+deb8u1

The panel seems to work well … when i try to generate a PDF from invoice (“Download PDF”) … it tooks about 120 seconds, but it generates well after this long time.
Where do i need to search the problem source? What is the solution?

DEBUG - 2017-07-31 09:06:39 --> UTF-8 Support Enabled
DEBUG - 2017-07-31 09:06:39 --> Global POST, GET and COOKIE data sanitized
DEBUG - 2017-07-31 09:06:39 --> Invoices MX_Controller Initialized
DEBUG - 2017-07-31 09:06:39 --> Config file loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/config/invoice_plane.php
DEBUG - 2017-07-31 09:06:39 --> Encryption: Auto-configured driver 'openssl'.
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/settings/models/Mdl_settings.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/controllers/../modules/layout/controllers/Layout.php
DEBUG - 2017-07-31 09:06:39 --> Layout MX_Controller Initialized
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/invoices/models/Mdl_invoices.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/invoices/models/Mdl_items.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/invoices/models/Mdl_invoice_tax_rates.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/custom_fields/models/Mdl_custom_fields.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/payment_methods/models/Mdl_payment_methods.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/custom_fields/models/Mdl_invoice_custom.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/custom_fields/models/Mdl_client_custom.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/modules/custom_fields/models/Mdl_user_custom.php
DEBUG - 2017-07-31 09:06:39 --> File loaded: /home/admin/web/*DOMAIN-CENSORED*/public_html/application/views/invoice_templates/pdf/InvoicePlane - paid.php
**DEBUG - 2017-07-31 09:08:39 --> Total execution time: 120.3361**

#2

Having same issues. Just installed today so I have the latest version 1.5 running on iis 8/windows server 2012 with 64 bit php 7.1 non thread safe (tried different versions of php with same results). Everything runs fast until the pdf generation which is taking 4 minutes. No error logs though on my end. I have also tried changing the configuration from development to production as mentioned fixed the issue on older versions of the invoice plane software. Love the software but this slowness is driving me crazy. Also, note that i havent created any custom templates. Its the out of box templates with 1 line item and no images what so ever. Any help is much appreciated.


#3

Also having the same issue on my Mac. Total execution time: 240 second everytime.


#4

In my case issue is

From here https://github.com/mpdf/mpdf#requirements

mPDF has some problems with fetching external HTTP resources with single threaded servers such as `php -S`. A proper
server such as nginx (php-fpm) or Apache is recommended.

#5

I have a same issue.

And I am a Cloudflare user too. (Cloudflare offers free authoritative Domain Name System (DNS) service)

When I disable Cloudflare proxies(CDN feature), the PDF generator need a long time generate the invoice PDF.

I want find out what is the problem.

I think that is not invoiceplane problem. But I cannot find out that is Cloudflare problem.

Anyone can help?


#8

Is this an IP related problem?

If it is not specifically related to IP, you should consider posting your question to the mPDF forum as explained here.

If this is an IP issue, please, tell us which version you are using and detailed instructions to reproduce the problem so we can test and debug it. Last, can you reproduce the problem in the demo site?


#9

thank you for the information.