Excessive CPU usage userswp plugin

This topic contains 10 replies, has 3 voices, and was last updated by  Patrik 1 month ago.

  • Author
    Posts
  • #5619

    Duane Siebert
    Free User
    Post count: 22

    Hello.

    I had noticed the WP admin section of our site was very, very slow (frequent 504 errors) yesterday and asked SiteGround for help.

    Though their support is normally excellent, the first support agent reported, “Uh, looks okay to me…”

    I re-opened that ticket today and the next level support person hit on the issue nearly immediately providing this:

    Hello Duane,

    I have checked your account and indeed there is excessive CPU usage in the last three days, caused by the admin-ajax.php script:

    Code:
    support@support.com [~]# executions bestauto 2 | grep ajax
    10133 /home/bestauto/public_html/wp-admin/admin-ajax.php – the number, shoes how many times the script was executed two days ago
    support@support.com [~]# executions bestauto 1 | grep ajax
    297358 /home/bestauto/public_html/wp-admin/admin-ajax.php – yesterday
    support@support.com [~]# executions bestauto | grep ajax
    71097 /home/bestauto/public_html/wp-admin/admin-ajax.php – today

    The issue started two days ago and yesterday it was over the top, leading to almost 300 000 script executions by the script, which leads us to the message you received:

    https://s.nimbusweb.me/share/3492451/kmx30t41nrdkw15gbvqc

    I have scanned your account for malware, in order to check if this leads to the issue, but there is none. After that I have checked your installation logs and noticed that the admin-ajax execution are connected to the URL:

    Code:
    bestauto@bestretirementcommunitiesusa.com [~/access-logs]# grep ‘wp-admin/admin-ajax.php?action=wp_1_uwp_updater’ bestretirementcommunitiesusa.com-ssl_log | wc -l
    42113

    After some research, I found that the calls are made by the plugin:

    https://wordpress.org/plugins/userswp/

    (That’s the end of their initial reply)

    Unfortunately, the CPU usage got so high (eating up 90% of our monthly CPU allotment in just a few days) their monitoring team shut off the account temporarily until the issue is fixed.

    I went in via FTP and renamed “userswp” to “userswp-old”.

    I also requested the site be turned back on so we can do further homework on it to see if that reduced the huge lags I was seeing.

    And, of course, since I am only technologically “advanced” enough to be “dangerous”, I will need help from you folks to figure out why a plugin which had been installed many months ago somehow went “crazy” (or if something else interacting with that plugin did.)

    Speaking of which, one thing I did notice is that there was a message at the top of the plugins screen which appeared recently indicating Yoast SEO had turned off “user profiles”.

    Let me know what you need from SiteGround or me, etc. and I will gladly comply.

    Thank you,

    Duane

    Attachments:
    You must be logged in to view attached files.
    #5632

    Alex Rollin
    Moderator
    Post count: 24130

    Hello,

    thanks for posting to the UsersWP forum where our team can take a look at the issue.

    Please share WP Admin and FTP credentials and the location of the logs we should check to see those reports.

    Thanks

    #5995

    Duane Siebert
    Free User
    Post count: 22

    Hello, again…

    I never received a reply to my initial problem report.

    I had left the plugin deactivated since that time and activated it again this morning.

    Same problem occurred in short order with 404,953 executions of admin-ajax.php

    I also noticed an error message during an UpdraftPlus backup this morning which I think might be somehow related.

    Thank you for the help.

    Duane

    Attachments:
    You must be logged in to view attached files.
    #6002

    Alex Rollin
    Moderator
    Post count: 24130

    This isn’t a known issue. We would need to check into it on your site. Please share WP Admin and FTP credentials and the location of the logs we should check to see those reports.

    #6159

    Duane Siebert
    Free User
    Post count: 22
    This reply has been marked as private.
    #6161

    Duane Siebert
    Free User
    Post count: 22
    This reply has been marked as private.
    #6164

    Duane Siebert
    Free User
    Post count: 22
    This reply has been marked as private.
    #6182

    Patrik
    Moderator
    Post count: 1658

    Hi,

    Sorry for the delay in reply. Regarding the admin-ajax.php file calling multiple time, it is mostly used for AJAX functionality by plugins and themes. So it will be called frequently by plugins or theme. Calling “wp_1_uwp_updater” function is done when the plugin UsersWP is activated to sync the data of users already existing on the site. This will run only single time.

    Regarding message Yoast SEO had turned off “user profiles”, it is because there is a setting in the Yoast SEO plugin to disable author which will disable user profile from the sitemap.

    Are you sure you are getting the more CPU usage only if UsersWP is active? I may suggest try installing UWP on the same server but on another site which will allow us to troubleshoot the issue. We didn’t get such a request from our other customers so we wanted to fix it for you asap.

    Regards,
    Patrik

    #6265

    Duane Siebert
    Free User
    Post count: 22
    This reply has been marked as private.
    #6268

    Duane Siebert
    Free User
    Post count: 22

    I was wrong about making the 503 errors disappear by deactivating UsersWP.

    I turned on Divi Builder, tried editing the Location page (which I have set as the static home page), then tried exiting the visual editor and immediately got the 503 error.

    I wasn’t able to navigate back to the admin section and kept getting the 503 errors.

    When I finally manually (via the nav bar) navigated to the /wp-admin/ page, only then was I able to not receive the 503 error message.

    Wish this would have led further down the “Ah ha, something with UsersWP is the cause of the 503 errors…” path, but, it didn’t.

    Ugh…

    #6312

    Patrik
    Moderator
    Post count: 1658

    Hi,

    You can take help from the hosting provider regarding the above case as it is not always the UsersWP who generates the error. There are server resources overused by your site and causing this issue. If you can set up the same site in local or on another server to test then please do and let us know if you get the same error or not or try using minimal plugins as you can.

    Regards,
    Patrik

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.