Support

Home Forums Event Espresso Premium Invoice Generation Slow, Freezes Site Until Finished

Invoice Generation Slow, Freezes Site Until Finished

Posted: December 9, 2014 at 9:33 pm


Ian Mills

December 9, 2014 at 9:33 pm

Hi,

I’m having an issue where when I try to view the invoice, or download it as a PDF, it takes an extremely long time, and while it’s happening I can’t view any other pages on the site.

Any ideas why this would be happening?


Tony

  • Support Staff

December 10, 2014 at 5:46 am

Hi Ian,

What kind of hosting are you using?

Can I run a test registration on the site to troubleshoot this?


Ian Mills

December 10, 2014 at 4:05 pm

Hi,

Our company does the hosting ourselves, so we have control over the hosting environment if something needs to be done there.

You can try a test registration with this event:
http://thehighlyeffectiveteacher.com/events/young-nsw/

It’s invoice-only so you can get to the end without paying anything.

When viewing the receipt or attempting to download the PDF Invoice is when it struggles.

Thanks


Lorenzo Orlando Caum

  • Support Staff

December 10, 2014 at 5:16 pm

Hi,

The invoice page is an html page with information. The Download PDF button then creates the PDF on demand.

Could you temporarily turn on WP debugging using this macro?

https://gist.github.com/848801a1173be464fbe7

Then could you try accessing the invoice page and let us know if you see anything in the debugging log?


Lorenzo


Tony

  • Support Staff

December 11, 2014 at 3:39 am

Downloading an invoice from your site (looks like you now have WP_Debug enabled) shows a PDF that can not be opened normally.

However opening the PDF in SubLime text shows 3 errors.

<b>Warning</b>: getimagesize(http://thehighlyeffectiveteacher.com/wp-content/uploads/2014/12/logo-black.png) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: Connection timed out in <b>/wp-content/plugins/event-espresso-core-reg/modules/gateways/Invoice/lib/Invoice.class.php</b> on line <b>237</b><br />

We use DOMPDF to create the PDF’s which uses fopen to download files from your site. Can you check on your sever and see if fopen is disabled, this is normally within the php.ini file, you should find allow_url_fopen, is that enabled or disabled?

You should also be able to find this within Event Espresso -> Maintenance -> System Information.


Ian Mills

December 11, 2014 at 7:42 pm

Thansk Tony, we saw that message and did some Googling and saw the allow_url_fopen suggestion. This is what EE says, re allow_url_fopen:

global_value 1
local_value 1
access 4


Ian Mills

December 11, 2014 at 8:07 pm

Just a small update. I’ve spoken to our server guy, and he’s checked and fopen is enabled on the server and that account, and he’s checked the requirements for DOMPDF and apparently we’re all good there too.


Dean

December 12, 2014 at 1:18 am

Hi,

Can you try using a logo image that does not have an alpha channel (transparency)?

PNG should be fine so long as the background is solid (e.g. white), though a JPG or GIF might be smaller file size (always a benefit).


Ian Mills

December 17, 2014 at 5:49 pm

Hi Dean,

I’ve switched to a JPG and it hasn’t helped.


Tony

  • Support Staff

December 18, 2014 at 3:50 am

Does your site have ‘hotlink protection’?

We’ve seen it before where hotlink protection basically checks the User-agent of the request for the image, if it is not a browser then the connection is blocked.

I’m wondering if something similar is happening here.


Ian Mills

December 18, 2014 at 4:10 pm

No, I don’t believe so.


Josh

  • Support Staff

December 19, 2014 at 9:23 am

Hi Ian,

Does it help if the invoice doesn’t include a logo image?


Ian Mills

December 22, 2014 at 6:11 pm

Hi Josh,

Sorry for the late reply.

Not using an image does fix the issue, however we do need that image. We have tried several different images in different formats & sizes, with no improvement.


Tony

  • Support Staff

December 23, 2014 at 3:57 am

Hi Ian,

I took the URL for the above image (the one that is timing out) and used it to add a logo to my Invoice on my test site – http://take.ms/ZUVXe

As you can see the Invoice is generated correctly and is pulling the image from your server, what this means is that ‘something’ is blocking the request when your own server requests the image. I would recommend contacting your host and requesting they investigate this.

What kind of hosting are you using?


Ian Mills

January 4, 2015 at 8:41 pm

Hi Tony,

We also host the site, and we have our server guys looking at it, but it looks like none of the obvious solutions are working (fopen config etc.).

We’ll keep looking into it on the sever then.

Thanks for your help though.


Lorenzo Orlando Caum

  • Support Staff

January 5, 2015 at 7:01 am

Hi Ian,

I ran some web searches on the issue that you are running into and found these results that may help in determining the cause:

http://stackoverflow.com/questions/8077496/getimagesize-failed-to-open-stream-connection-timed-out-in

http://community.sitepoint.com/t/getimagesize-filename-url/3710

http://stackoverflow.com/questions/5272239/how-to-handle-timeouts-in-getimagesize


Lorenzo

The support post ‘Invoice Generation Slow, Freezes Site Until Finished’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Lorenzo Orlando Caum 4 years, 10 months ago ago

Topic Tags

Tagged: ,

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!
[for="input_96_5_3"]
[for="input_96_5_3"]
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[i]
[i]
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.