Skip Navigation

[Resolved] High CPU usage with Views on VPS hosting but not on shared hosting?

This thread is resolved. Here is a description of the problem and solution.

Problem: I am seeing high CPU usage on VPS hosting but not on shared hosting. It seems to be related to Views.

Solution:
- If you have Views that use AJAX to update, or automatically paginate like Sliders, consider turning off caching and preloading for these Views temporarily to see if the performance improves. You can find those settings in the View editor under Custom Search, and Pagination and Slider settings.
- If you have several Views with automatic pagination, consider timing them so they do not all update in the same time interval.
- Consider manual pagination instead of automatic pagination in some or all Views.
- Temporarily set a small limit on Views that are configured to show many or unlimited results. If you do not see the limit settings in the View editor, scroll to the top right corner and click "Screen Options". You can enable the setting here.
- If you have nested Views, consider simplifying the View structure. Looping over loops can be quite intensive.

These are usually the easiest things to try. Beyond that, it comes down to inspecting each View on the page to determine if there is a bottleneck in one View, or if it's the combination of all Views at once.

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by bobA-2 5 years, 12 months ago.

Assisted by: Christian Cox.

Author
Posts
#1170729

I was wondering if you have ever heard about or seen an issue with high CPU use relating to Views when using VPS hosting but not on the same hosts Shared Webhosting?

I have the exact same site (same files and DB) on both and the shared hosting server has no issue with CPU usage while the VPS one is maxed out when the Views plugin is enabled. I have a lot of different views on my site so difficult to see if it is a specific one. Any tips on how to finding this would be appreciated.

I tried a different host where they said it was related to Views plugin. "maxing out your CPU usage by constantly making admin-ajax.php requests on all of your posts and pages." was the message

Then moved the site back to the shared host without issues and now I tried VPS variant with my current shared host and am seeing very high CPU usage with Views enabled.

#1170763

Hi, if multiple concurrent admin-ajax.php requests are slowing down your site and affecting performance, I see some users get better results by taking some or all of these steps:
- If you have Views that use AJAX to update, or automatically paginate like Sliders, consider turning off caching and preloading for these Views temporarily to see if the performance improves. You can find those settings in the View editor under Custom Search, and Pagination and Slider settings.
- If you have several Views with automatic pagination, consider timing them so they do not all update in the same time interval.
- Consider manual pagination instead of automatic pagination in some or all Views.
- Temporarily set a small limit on Views that are configured to show many or unlimited results. If you do not see the limit settings in the View editor, scroll to the top right corner and click "Screen Options". You can enable the setting here.
- If you have nested Views, consider simplifying the View structure. Looping over loops can be quite intensive.

These are usually the easiest things to try. Beyond that, it comes down to inspecting each View on the page to determine if there is a bottleneck in one View, or if it's the combination of all Views at once.

#1174503

My issue is resolved now. Thank you!