Support

Home Forums Event Espresso Premium Submit of Tickets page – 40 seconds to load Payment Overview Page

Submit of Tickets page – 40 seconds to load Payment Overview Page

Posted: February 22, 2016 at 6:57 am


James Murrin

February 22, 2016 at 6:57 am

If I click the ‘Submit’ button on a ‘Buy Tickets Now’ page, it takes about 40 seconds to load up the Payments OVerview page.

If I click Event Espresso > Payment settings > Bypass Payment Overview Page? (yes), then we don’t have this problem and we get through to paypal in normal speed.

Last year, I set the Bypass Payment Overview Page? to ‘No’ on Toni’s advice because we were having problems with Paypal taking double payments and setting the page to ‘No’ stopped us getting double payments from Paypal.

But I’ve just done a test from my smartphone, and the paypal ‘Pay Now’ part came up for 2nd time again after successfully taking my money once, which makes me think that we could be back with the Paypal taking double payments problem if we keep Bypass Payment Overview Page? at ‘yes’.

I don’t really want to run with ‘Bypass Payment Overview Page’ set to Yes, but having a 40 submit time when going to the Payment Overview Page isn’t really acceptable for users, so please could you tell me how we could avoid it?

I am not using any caching plugins and I’m not using the wordpress https plugin either.

Also, I noticed that when I load the Event Espress > Payment Settings it also takes about 40 seconds to load – perhaps it’s the same issue?

You can see the problem here: https://guildfordbeerfestival.co.uk/tickets/?ee=10

Many thanks for your help.

Dee


Josh

  • Support Staff

February 22, 2016 at 10:10 am

Hi Dee,

The Payment Settings page slowdown might be caused by the check for SSL. You can disable the check by adding this code to your site:

if (!function_exists('espresso_check_ssl')) {
	function espresso_check_ssl(){
		return false;
	}
}

You’ll need to make sure that code loads before Event Espresso does, which can be done if you add the code to /wp-content/uploads/espresso/custom_functions.php.


James Murrin

February 23, 2016 at 4:58 am

Hello Josh

I created a custom_functions.php and put in the code with a <?php at the start of the file & copied it to the /wp-content/uploads/espresso/ folder. I tried the ‘submit’ button again – 40 second wait.

So, then I unzipped the Custom Files add on https://eventespresso.com/wiki/custom-files-add-on/ and added the same code to the already-existing custom_functions.php file and copied that, along with its companions custom_includes.php & custom_shortcodes.php to the same folder. I tried the submit button again, and again it took 40 seconds to get to the payments overview page.

I’ve deleted those 3 files from that folder now, so we’re back where we were before.

Sorry, my php isn’t good enough to go digging. Going live in 2 days. Please could you advise again?

Thank you.

Dee


James Murrin

February 23, 2016 at 5:58 am

Josh, just reread your original reply. I don’t mind about the slowdown on the Payments Settings page – it’s only me that goes there and I can wait 40 seconds for that!

It’s the slow down when pressing ‘Submit’ after putting in registration details on your way to the Payment Overview page. It’s here that it matters. Please see:
https://guildfordbeerfestival.co.uk/tickets/?ee=10

Could you advise on that please?

Thanks
Dee


Tony

  • Support Staff

February 23, 2016 at 8:24 am

Hi Dee,

Within Event Espresso -> General Settings.

Do you have the option ‘Send registration confirmation emails before payment is received?’ set to Yes or No?

If you temporarily disable the PayPal payment method and enable say Invoice, does the page still take so long to load?

‘Something’ is processing on the server side on that page load, but there should not be anything that should cause this kind of slow down. You mentioned you do not run any caching, does your host? Cloudflare for example?

The reason I ask is I’ve been searching around for a reason that a page would start taking so long to load, the majority of posts have hinted towards caching although nothing really useful (hence no links to any)


James Murrin

February 23, 2016 at 9:08 am

Hi Tony

I checked in EE -> General Settings – the ‘Send Registration confirmation emails before payment is received?’ is set to No. I didn’t change it.

I temporarily disabled the Paypal payment method and enabled invoice. Then, on clicking the ‘Submit’ button, it goes lightning fast to the Payments Overview page.

Does this help? Should I still contact Fasthosts and ask if they’re using any caching? or is that not relevant now?

Thanks.


Tony

  • Support Staff

February 23, 2016 at 9:11 am

Should I still contact Fasthosts and ask if they’re using any caching? or is that not relevant now?

It may still be.

If you look within /wp-content/uploads/espresso/gateways/ do you have a PayPal gateway there?


James Murrin

February 23, 2016 at 9:34 am

Hi Tony
I’ve looked in /wp-content/uploads/espresso/gateways/ and there’s nothing.

By the way, disaster. I can’t get back in to the Payment Settings page to change it back to ‘Paypal’. The page just hangs and hangs. Got a ‘No data received ERR_EMPTY_RESPONSE’ from Chrome. Tried opening the page in another browser and it also hangs.

What do you think might be causing this?

Thanks
Dee


Tony

  • Support Staff

February 23, 2016 at 10:38 am

Hmm, it looks like this is come kind of server config issue, but theres nothing to say what.

If you enable WP_DEBUG and reload the payment settings page does it show any errors?


James Murrin

February 23, 2016 at 11:05 am

Hi Tony, sorry can’t even get to Payment settings page because server times out.

I have spoken with the hosting company and have found a ‘RSA certificate configured for SERVER does NOT include an ID which matches the server name’ in the ssl_errorlog. It’s been referred to their engineers so I am hoping that they will be able to fix the problem their end.

Will keep you updated. Many thanks. Dee


James Murrin

February 24, 2016 at 6:02 am

Hi Tony & Josh

I think we’re getting there. Just need a little bit more help please.

Fasthosts said ‘because the site is on a shared server and warnings will always exist.’ and … ‘the error that must be checked is:mod_fcgid: read data timeout in 60 seconds’.

I saw in Event Espress -> System Status that

session.save_path	10.10.111.52:11211,10.10.111.53:11211	10.10.111.52:11211,10.10.111.53:11211 does not exist - contact your host to resolve the problem.

So I contacted Fasthosts again and told them that if I did a phpinfo(); that the session.save_path was an ip address and that it should be a regular folder to which php should have write access and pointed them towards some php man pages. No joy yet.

But, I did find this https://wordpress.org/support/topic/fast-secure-contact-form-3 which told me that I could fix my own session_save_path within wp-config.php. Which I’ve done, and now I get this from Event Espress -> System Status

Session save path	/home/hp3-linc2-nfs2-y/835/377835/user/gbfsessions is writable.

So, Josh, going back to your earlier post yesterday, I added this:

<?php

if (!function_exists('espresso_check_ssl')) {
	function espresso_check_ssl(){
		return false;
	}
}

to custom_functions.php and put it in the uploads/espresso directory, and then, HURRAY, I could get to the payment gateways file and change the payment method from invoice (Tony’s test yesterday) to Paypal.

So, I think this means that if we can get the Event Espress -> Payment Gateways file to not check for SSL, then we can get in there.

I went back to taking a ticket.
https://guildfordbeerfestival.co.uk/tickets/?ee=10
And when you press SUBMIT, it takes 42 seconds to get to the Payments Overview page.

So, I think my question to you if, please could you give me another piece of code I could put somewhere which would prevent the ticket submission doing a SSL check before it gets to the payments overview page?

Sorry it’s so long winded but thought you’d want to know the details so you can point out any other obvious tracks to go along?

Many thanks for your help. It’s really appreciated.

Dee


James Murrin

February 24, 2016 at 7:15 am

Hello again,

I’ve been looking at the /uploads/espresso/logs/espresso_log.txt file and finding the part which corresponds to the 40 second wait between ‘Submit’ and getting to the payments overview page.

The interesting part is between here I think:

[ 2016-02-24 14:03:45 ] payment_page.php -> FILE LOADED
[ 2016-02-24 14:04:25 ] espresso.php -> espresso_load_javascript_files

Here’s the full log for the test:

[ 2016-02-24 14:03:43 ]  espresso.php
	VARS : price_id = 110 & start_time_id = 110 & fname = Dee & lname = Stevens & email = *redacted* & use_coupon = Array & use_groupon = Array & regevent_action = post_attendee & event_id = 10 & reg_form_nonce = 53e66b8399 & _wp_http_referer = /tickets/?ee=10 & Submit = Submit & PHPSESSID = 3ajnb4679nv9dk9kg6ko66grn7 & wordpress_logged_in_41963d9520aeb9b124172c0024340cb9 = gbfcricket|1456308648|msCnEFuGYYc2E9rhLkgvdZ1tKmrIIxI3NkVS1HJU4Ud|5a4ef98e62a846571bd8a2bb22e90c0c7cef9d57253fe6032b1ad8d1f9ce3736 & wp-settings-4 = editor=html&libraryContent=browse&urlbutton=file&imgsize=large&hidetb=1&align=center & wp-settings-time-4 = 1456244436 & wordpress_test_cookie = WP Cookie check & wordpress_logged_in_82e1ca464333aee7f4eca86dbc489bac = gbfcricket|1456422968|BLZdmZczFCzA7pA5QjOVca7nnvE12EOOqKbIL5mT2F3|2364ecd6342db0665dbf1c840a9b42f81704422e98d289ea9621d42d3e89d409 & __utmt = 1 & __utma = 120521118.188530377.1455118029.1456316498.1456321007.37 & __utmb = 120521118.15.10.1456321007 & __utmc = 120521118 & __utmz = 120521118.1456141855.22.5.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not provided)
[ 2016-02-24 14:03:43 ]  registration_page.php  -> FILE LOADED
[ 2016-02-24 14:03:43 ]  cart.php  -> FILE LOADED
[ 2016-02-24 14:03:43 ]  espresso.php  -> espresso_load_pricing_functions
[ 2016-02-24 14:03:43 ]  espresso.php  -> load_event_espresso_widget
[ 2016-02-24 14:03:43 ]  espresso.php  -> ee_init_session
[ 2016-02-24 14:03:45 ]  espresso.php  -> espresso_export_certificate
[ 2016-02-24 14:03:45 ]  espresso.php  -> espresso_export_ticket
[ 2016-02-24 14:03:45 ]  espresso.php  -> event_espresso_run
[ 2016-02-24 14:03:45 ]  add_attendees_to_db.php  -> FILE LOADED
[ 2016-02-24 14:03:45 ]  payment_page.php  -> FILE LOADED
[ 2016-02-24 14:03:45 ]  add_attendees_to_db.php  -> event_espresso_add_attendees_to_db
[ 2016-02-24 14:03:45 ]  add_attendees_to_db.php  -> espresso_verify_recaptcha
[ 2016-02-24 14:03:45 ]  pricing.php  -> event_espresso_get_orig_price_and_surcharge
[ 2016-02-24 14:03:45 ]  pricing.php  -> event_espresso_verify_price_id
[ 2016-02-24 14:03:45 ]  pricing.php  -> event_espresso_get_final_price
[ 2016-02-24 14:03:45 ]  pricing.php  -> event_espresso_verify_price_id
[ 2016-02-24 14:03:45 ]  pricing.php  -> early_discount_amount
[ 2016-02-24 14:03:45 ]  pricing.php  -> event_espresso_verify_price_id
[ 2016-02-24 14:03:45 ]  add_attendees_to_db.php  -> event_espresso_add_attendees_to_db
	line 289 : attendee_cost=10
[ 2016-02-24 14:03:45 ]  use_coupon_code.php  -> event_espresso_process_coupon
[ 2016-02-24 14:03:45 ]  use_coupon_code.php  -> event_espresso_coupon_payment_page
[ 2016-02-24 14:03:45 ]  payment_page.php  -> events_payment_page
[ 2016-02-24 14:03:45 ]  attendee_functions.php  -> espresso_update_primary_attendee_total_cost
	VARS : $total_cost = 10
[ 2016-02-24 14:03:45 ]  payment_page.php  -> espresso_confirm_registration
[ 2016-02-24 14:03:45 ]  payment_page.php  -> FILE LOADED
[ 2016-02-24 14:04:25 ]  espresso.php  -> espresso_load_javascript_files
[ 2016-02-24 14:04:25 ]  espresso.php  -> espresso_register_validation_for_shortcodes
[ 2016-02-24 14:04:25 ]  espresso.php  -> espresso_load_jquery
[ 2016-02-24 14:04:25 ]  espresso.php  -> add_event_espresso_stylesheet
[ 2016-02-24 14:04:25 ]  espresso.php  -> add_espresso_themeroller_stylesheet
[ 2016-02-24 14:04:25 ]  espresso.php  -> espresso_info_header

Hope that helps track it down?

Thank you.

Dee

  • This reply was modified 8 years, 2 months ago by  Josh. Reason: removed email address


James Murrin

February 24, 2016 at 8:03 am

I set WP_Debug, to true in wp-config.sys which brings this up after the 40 second wait getting to the Payments overview page:

Warning: session_start(): Write of lock failed in /..../htdocs/wp-content/plugins/event-espresso/espresso.php on line 80

Warning: session_start(): Unable to clear session lock record in /..../htdocs/wp-content/plugins/event-espresso/espresso.php on line 80

and line 80 of espresso.php is:

if (!isset($_SESSION)) {
		session_start();
	}

The phpinfo(); for the server brings up this:

session.save_handler	memcached	memcached
session.save_path	10.10.111.52:11211,10.10.111.53:11211	10.10.111.52:11211,10.10.111.53:11211

Please could you tell me, is there a problem around here which we could fix and get rid of the 40 second latency?

Thank you.

Dee


Josh

  • Support Staff

February 24, 2016 at 8:24 am

Yes, good find. Can you check with your host to see if it’s running out of space in memcached? Along with that, can you check to see if memcached can be disabled?


James Murrin

February 24, 2016 at 9:47 am

Hi Josh

Spoken with Fasthosts. They confirm that memcached can not be disabled.
They will check to see if it’s running out of space in memcached.

While waiting for them I pinged the server.save_path 10.10.111.52 and got a 100% loss (no packets returned). This doesn’t sound very healthy, don’t you agree?

Before, as a result of the WP_DEBUG,true being set, I incorrectly told you that the Warning: session_start(): Write of lock failed … only happened as a result of the 40 sec delay getting to the Payments overview page. Wrong. It happens on every page of the website.

The special message which comes up after the 40 sec delay getting to Payments overview page in addition to the above is this:

Notice: Array to string conversion in /.../htdocs/wp-content/plugins/event-espresso/class/espresso_log.php on line 54

Notice: Array to string conversion in /.../htdocs/wp-content/plugins/event-espresso/class/espresso_log.php on line 54

and line 54 of that file says:

 if ( is_array( $message['status'] )) {
				$msg = '';
				foreach ( $message['status'] as $key => $value ) {
					$msg .= ' & ' . $key . ' = ' . $value ;
				}
				$message['status'] = "\n\tVARS : " . ltrim( $msg, ' & ' );				
			} else {
				$message['status'] = ! empty( $message['status'] ) ? "\n\t" . $message['status'] : '';
			}

I don’t know if this is relevant?

Or do we think all these problems are going to go away once Fasthosts work out how to sort the Warning: session_start(): Write of lock failed … problem?

PS: Do I need a to buy a support token for this? It seems to be very specific to a messy setup this end and it needs to be sorted by tomorrow latest, otherwise I’m gonna have to go to another hosting company ….

I’m checking out for the day now to do any more real work, but would really appreciate your thoughts between now & my tomorrow morning!

Thank you very much.

Dee


Josh

  • Support Staff

February 24, 2016 at 10:28 am

I’d advise moving to a different hosting company.


James Murrin

February 25, 2016 at 7:41 am

Thanks for all your help Josh. You’re right, enough is enough and I’m switching hosts! I really appreciate all your help to date. Have a good day. Dee

The support post ‘Submit of Tickets page – 40 seconds to load Payment Overview Page’ 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.

Event Espresso