Hi there
okay so this is worrying – see message from host. Can you advise/recommend any steps re the Xstore Core Plugin as this is a big problem.
Issue is they will disable my account if we cannot resolve the matter.
MESSAGE FROM HOST
Hi,
I hope that you are doing well.
We have noticed an abnormal CPU and MySQL usage from your site that seems to be coming from multiple sources.
[1] – The XStore Core plugin makes constant requests via admin-ajax.php causing CPU usage.
[2] – Pinterest bot aggressively crawls the site.
TOP User-Agents by PHP Calls
55144 Mozilla/5.0 (compatible; Pinterestbot/1.0; +http://www.pinterest.com/bot.html)
Hello, Websitedude1985,
The number of requests depends on the number of Ajax elements on the page, whether there is an Ajaxify widget, or if someone is searching a lot, or if this option is enabled – https://prnt.sc/GirTEgelCA_3
You need to disable ajax settings via Theme options, and edit the content of pages > disable Ajaxify in the settings of elements.
Provide temporary wp-admin access, so we can take a closer look at your settings.
Kind Regards,
8theme team
Hi there
that would be amazing – if you can log in and check over the settings.
Hello, Websitedude1985,
We’ve disabled next options: Wishlist For Variation Products https://prnt.sc/lr1_SFxIgzwK and Ajaxify Widgets https://prnt.sc/NiCLlHiMTB-R
Please check now.
Kind Regards,
8theme team
Hi there
thanks for the quick response, can you though please explain why this would need to be done? Surely disabling something is an option but in doing so I miss out on some feature?
Would be good if the user guide/docs covered this sort of information
Thanks again
Hello, Websitedude1985,
1/ Typically, there is no such issue, however, in your case it is a specific situation with server requirements.
2/ As all these features use Ajax technology, which in turn makes requests through admin-ajax, the more of these elements there are, the more requests will be made.
Some requests are only executed after certain manipulations, for example Quick View sends requests only after pressing the button and search as well.
Some work without a trigger due to their particularities, for example, Ajaxify Widgets performs requests when an element is visible on the screen. The same applies to Wishlist For Variation Products, as a request is sent immediately after the products are loaded to determine which variation is selected and which one to add to the wishlist.
Kind Regards,
8theme team
I am still having major issues with the speed of this theme. Please see comment below from the host… PLEASE HELP
Hi
During the past 24 hours we have noticed a huge decrease in the CPU usage, but unfortunately, there seem to be new spikes logged on our graphs.
You can check here –
Most of the requests made by user agents are related to Google and instead of blocking them via .htaccess rules, we’d suggest that you limit the crawl activity in the Google Search Console where the bots are managed.
As for the other bots, f.e. Pinterest, even if we block it the CPU usage will still go above the threshold limits, which affects the server.
As my colleague mentioned, the main reason for the high CPU time is because of the admin-ajax.php requests that come from your theme and plugins.
You can easily check that in your browser without any additional tools.
As you suggested, the website can indeed be checked and optimized, but in this case the issue is related to the way the theme is coded and our optimization service does not include development or optimization of your plugins/theme or anything code related.
We can help optimizing the website for better speed and performance, while reducing the calls to the admin-ajax.php file is something you should check with a developer.
Alternatively, you can also consider changing that theme with another that would have similar layout but won’t have such intensive usage.
Let me know if I can help with anything else.
Warm regards,
Luchezar Dimitrov.
Security & Optimization at WPX
Hello, Websitedude1985,
For now you may add next few filters in xstore-child/functions.php which may help you to remove few ajax requests but it may create some issues with caching plugins
add_filter('xstore_wishlist_mini_content_ajax', '__return_false');
add_filter('xstore_compare_mini_content_ajax', '__return_false');
Deep code refactoring is already written in our todo list. If you know the main code areas where we should take more time for refactoring, please, share them with us (public or in private area) so we will spend less time for searching such reasons and more time for improving those things of speed loading and excessive ajax requests.
Kind Regards,
8theme team
Hi there
thanks for this reply – so are you aware of this being an issue? It is good to hear you are considering code refactoring. I suspect many of us are affected in the same way
Can you elaborate a little what the pitfall is of adding your suggestion to our functions.php? Of course I don’t want to break anything. I decided to turn off the Compare feature in the end – but it does still seem that the theme is really heavy on admin-ajax.php use so this must be problematic for many people. Are there any further ideas on how to combat this?
Thanks
Hello, WebsiteDude,
The mentioned code disables additions ajax request for wishlist and compare quantity in the header, and this should not cause a problem on your site. For other customers, this additional ajax may be needed if they using cache plugins and face the problem of refreshing the quantity in the header while going through pages.
Currently, the task about combat with additional admin-ajax.php is in our task list, but there is no ready solution. If you have your own ideas, please reply back here.
Kind Regards,
8theme team
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.