Support

Home Forums Event Espresso Premium Event Espresso high CPU usage

Event Espresso high CPU usage

Posted: July 20, 2016 at 3:37 am

Viewing 6 reply threads


tnt-graphics

July 20, 2016 at 3:37 am

Hi, I’m using your Plugin on a client’s website. Unfortunately I had to disable the plugin due to extreme CPU usage. It’s definitely your plugin. When monitoring the server stats using “top”, I see 100% CPU consumption when enabling the plugin and about 20% when your plugin is not enabled.

I have just one event on a test page but your plugin generates thousands and thousands of entries (about 1million in a very short time) in the database tables “wp_esp_line_item” and “wp_esp_transaction”.

The problem seems to be similar to these (and many others complaining about high CPU usage):
https://eventespresso.com/topic/something-in-your-code-is-creating-thousands-of-empty-temp-files/

Please give me some advice on how to solve it.

Thanks


tnt-graphics

July 20, 2016 at 5:25 am

Ok, here some more details:

As soon as I activate your plugin, it starts to fill the “tmp” folder with files of the form “sess_819c39e90cb26add0917c5a0xxxxxxxx”. As already mentioned the plugin also starts to fill the tables “wp_esp_line_item” and “wp_esp_transaction”.

It looks like there are transactions being made constantly.


Josh

  • Support Staff

July 20, 2016 at 7:41 am

Hi TNT Graphics,

This sounds like your website is getting hit by a bot. If you go to Event Espresso > Maintenance mode and set Event Espresso into Maintenance mode does the table filling stop?

If so, you can install these plugins to protect the ticket selector form:

https://wordpress.org/plugins/block-bad-queries/
https://wordpress.org/plugins/blackhole-bad-bots/

You can also check your server’s access logs to spot any repeated attempts at accessing your site.


tnt-graphics

July 21, 2016 at 1:49 am

Ok, I figured it out myself. No, the traffic is not coming from bots. It’s a website with a good amount of traffic.

The problem with your plugin is it’s not optimized for higher traffic websites. The plugin creates a session for every single hit on the website. Not just hits on pages using the plugin but every single hit on any page of the website.

I solved it by using a workaround but I really recommend you to optimize your plugin. A good starting point might be this article:
https://pressjitsu.com/blog/wordpress-sessions-performance/

When reading through your forums I can see a lot of users complaining about the CPU usage of your plugin. You always try to pass the buck to hosters, your users, bots etc. but hey, please optimize your plugin!


Josh

  • Support Staff

July 21, 2016 at 7:25 am

Thank you for your comments. I’m curious though, you say Event Espresso is creating sessions for every site visitor, but you also said that the wp_esp_transaction and wp_esp_line_item table are filling up? Does your workaround address the transaction and line items getting recorded to the database?


tnt-graphics

July 21, 2016 at 7:36 am

I’m using “Plugin Organizer” to prevent Event Espresso from loading on every page. I only load your plugin on relevant pages. That way the session creation is reduced to a minimum and the tables are not filled up anymore.

Thanks for a otherwise nice plugin


Josh

  • Support Staff

July 21, 2016 at 8:07 am

Thanks again for following up. Something isn’t quite right here, and please understand that I’m trying to help you, to figure out what’s causing the problem, and not looking to pass the buck. To be clear, the bot issue is a real thing because we’ve seen it happen on high traffic sites where if the bots get blocked, the transactions and line item tables stop filling up.

An important thing to know is when a session is started by Event Espresso, no transactions or line items should be created at that moment. It sounds like there may be some other things happening on your site as well contributing to this.

You may be interested to know that we have Event Espresso running on our saas service which has thousands of sites in a multisite install and has no problems processing 1000 registrations per hour.

So we’re definitely interested in knowing what may be going on in your case, but you may want to consider other possibilities where what you saw on your site could be caused by caching, another plugin that also uses sessions, or some other unknown factor.

May I ask if there are any other e-commerce plugins running on this site, and do you know if there is any server level caching set up?

Viewing 6 reply threads

The support post ‘Event Espresso high CPU usage’ 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