Email Subscribers 4.0+ has significant performance issue with admin-ajax
-
I first discovered this issue several weeks ago, but it’s taken me a while to debug it. I finally did today, and so thought I should share.
I’ve had Email Subscribers installed for ~2 years. It’s been working well for me, and so I’ve hesitated to update it. I am currently running version 3.5.16.
About a month ago, I noticed that I was getting duplicate subscriber signups, which I realized was due to the fact that people were double-clicking on the ‘subscribe’ button on my (shortcode) forms.
To ‘solve’ this, I wanted to redirect users after they clicked ‘submit,’ and so ended up installing Rainmaker based on this article (https://www.icegram.com/documentation/es-how-to-redirect-subscribers-to-a-new-page-url-after-successful-sign-up/).
That solved my problem, so at the time I thought I was done, and I was happy.
However, over the next few weeks, I noticed that my server resources were much higher than usual, and that my admin page load times were terrible – on the order of 45+ seconds per page. Additionally, I started to get “Connection lost – we’re saving your work in the browser” messages very frequently when editing posts.
Using Chrome debugging tools, I could see that the culprit was admin-ajax.php. Approximately 75-90% of the time, requests to it were timing out at 30 seconds, and causing extremely high server loads during those 30 seconds.
Yesterday, I finally decided to get to the bottom of it, and started deactivating plugins one-by-one. When I deactivated Rainmaker, the problem went away immediately. Without Rainmaker, admin-ajax returns in less than 1 second, and everything is snappy again.
Seeing that Email Subscribers had a new major version (with a lot of new functionality), I decided I might as well upgrade, hoping that new functionality would mean that I no longer needed Rainmaker.
After installing the current version of Email Subscribers v4.3.10, I found that once again my admin-ajax was taking 30+ seconds and timing out most of the time (with high CPU load).
As a software developer myself, my guess is that there is now a shared codebase between Email Subscribers and Rainmaker (or at least, more common code). I can tell that the ajax calls that used to be handled by /widget/es-widget-page.js are now handled quite differently, and with code that is much more similar to Rainmaker.
This is however causing performance problems.
I’ve uninstalled Rainmaker, and rolled back to Email Subscribers 3.5.16, and everything is working for me again – but I’d love to upgrade to the current version of Email Subscribers.
I’m happy to help with debugging if necessary, let me know what you need.
Cheers,
DanThe page I need help with: [log in to see the link]
- The topic ‘Email Subscribers 4.0+ has significant performance issue with admin-ajax’ is closed to new replies.