Support

Home Forums Event Espresso Premium PHP 7 – many datetime/tickets – venue field empty and random dates in calendar

PHP 7 – many datetime/tickets – venue field empty and random dates in calendar

Posted: April 10, 2017 at 12:32 am


Sjoukje Oostindie

April 10, 2017 at 12:32 am

Server:
PHP 7
512MB

Files:
Wordpress 4.7.3
Latest Event Espresso 4.9.36.p
No other plugins
Twenty Seventeen theme

Event 1 = Event with 10 datetimes & 10 tickets – low number of datetimes/tickets
Event 2 = Event with 28 datetimes & 28 tickets – upper end number of datetimes/tickets

Problem description:

A week ago, while working on the dev site a problem suddenly started occuring where admin-ajax.php was returning with a 404 error. Server logs showed no errors. After discussing the problem with the host they decided, on a hunch, to upgrade from PHP 5.6 to PHP 7 and step up the memory to 512MB. This seemed to take care of the initial problem though we were no wiser in discovering the underlying cause. However, this upgrade has now introduced another problem.

First a short description of the situation. As described above we have events that require many separate datetimes and tickets. Ideally we would like to have approximately 100 per event because we have events that take place two or three times a week all year long and each ticket is for a specific datetime. During initial development we discovered that due to the exhorbitant number of queries generated we had to limit the datetimes/tickets to approximately 38 per event. This was the top end of what the server could handle generating over 3000 queries. You can see the number of queries and duplicate queries by installing the “Query Monitor” plugin. I, as well as others on this list, recommend that the development team take a look at this issue. I suspect that this is the underlying cause of many problems including this one.

Back to the problem at hand, now it looks like upgrading to PHP 7 has caused an issue where opening Event 2 and simply updating the event without any changes removes the venue from the event post and on the front end, the calendar shows many (random?) <td>’s as an event day even though there is no datetime/ticket associated with that day. If we try to choose the venue again and update, the value remains empty on the post reload. This problem does not seem to exist for events with fewer datetime/tickes such as Event 1. Needless to say this is a major problem.

We could revert back to PHP 5.6, but I am afraid that the initial problem will reoccur (admin-ajax.php returning with a 404 error). Any thoughts or solutions would be appreciated.

Sincerely,

Jason Jeffers


Josh

  • Support Staff

April 10, 2017 at 2:05 pm

Hi Jason,

Can you check to see if the max_input_vars setting on your upgraded server can handle the number of inputs on the page where you have 28 tickets and 28 datetimes?

With regards to your recommendation to the development team, they don’t review each forum post here, but they do review each issue opened on Github. You’re invited to post your recommendation there:

https://github.com/eventespresso/event-espresso-core/issues


Sjoukje Oostindie

April 14, 2017 at 2:38 am

Josh,

Turns out that the host had forgotten to restart the server!!! 8 hours of research on my part and going over ever line of my code for nothing. We now have a stable system which did require some custom settings. For anyone out there in our situation with multiple events with a large number of datetimes/tickets (20+) here are our server settings:

PHP:
PHP version – 7.0.17
max_input_vars = 5000
max_execution_time = 120

MYSQL:
query_cache_type = 1
query_cache_limit = 256K
query_cache_min_res_unit = 2k
query_cache_size = 80M

Wordpress:
define(‘WP_MEMORY_LIMIT’, ‘512M’);

Cheers,

Jason Jeffers

The support post ‘PHP 7 – many datetime/tickets – venue field empty and random dates in calendar’ 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