Plugins is Using Too Much Memory/CPU on Server

Article sections

    A usual cause of such high CPU/resource usage is the WordPress ajax component (admin-ajax). That component is the only safe method to communicate with the site backend but it also may produce a high resource load. Optimization of that method is not provided in details by WordPress and WordPress itself manages the request and resources that are required to run. But as other plugins on your site may use it too and if the requests they produce are not optimized properly this may lead to leak of CPU/memory. Inside plugin we do various optimizations to ensure that our plugin will not use any resources outside the required for a specific function. But we also recommend to users make the minimal usage of that component if server is not prepared and optimized for that.

    List of functions that may generate a high resource usage

    Here is a list of functions you can check on plugin that uses the component or that may produce such resource usage

    1. You are using real time share counters – they are good for tests and development sites (even sites with light traffic) but this mode is not recommended for a real life usage. The mode requires admin-ajax requests for some of the networks update which may overload the server.
    2. Cache plugin/server update mode. This mode will update share counters on the backend even when a cache plugin is installed on site. The mode is left for sites that run specific cache options (for example memory caches like Varnish or similar). For the regular users of typical cache plugins that is not required to be active because cache updates on 6, 12 or 24 hours (Varnish for example updates on 10 minutes). In this case it is enough to setup the share counter update to be the half of cache TTL – usually 3 hours is good enough
    3. You activate the option to generate share counter based on all networks. The option for that will generate a total share counter not only for the used from site social networks but also for all networks that are available inside plugin. This will produce a much more resources than typical needs (especially if you are using recovery of shares). The option is required if you have shares outside the networks that you are using on site (the list of networks also will include a specific region based networks that your host may experience a problem)
    4. Not update configuration for a network that drops the share counter – for example Twitter, Google+ or LinkedIn. They are not supporting official share counters and you need to adjust the counter value from the Social Sharing -> Share Counters Setup -> Single Button Counter (for Twitter if you are using newsharecounts.com you need to update to a different source as newsharecounts.com is not operating anymore).
    5. You have set a short URL service but you did not configure properly the access details. In this situation the plugin will do a connection check each time post/page is loaded and fail connections may require too many resources.
    6. You can check if you have active the option for speed up the share counter update set to Yes to deactivate it. The typical share counter update sends one connection at a time (when that connection is completed sends another one for a different network). The speed up uses an extension of the servers for async connections – all connections runs at the same time (it is not waiting the first to be completed). On a large share counter update (for example multiple posts at same time) this may produce a large amount of simulated connections and if server is not optimized for that module you will see a high server usage. So if the option is set to Yes than you can deactivate it and check again.

    If none of the above is active on your site but you still see a high resource usage please contact our support team.

    Was this article helpful?
    YesNo
    in Troubleshooting
    Was this article helpful?
    YesNo