High memory and high cpu usage on Wordpress application hosted on azure web app

kuldeep Singh 25 Reputation points
2025-03-25T09:48:00.2233333+00:00

Hi Team, we are using wordpress application hosted on azure web app, am experiencing issue of high cpu and high memory, can some pls suggest how to resolve it.

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

root 562 3.9 6.5 600812 531928 ? SN Mar18 368:14 unison /home/site/wwwroot /var/www/wordpress -auto -batch -times -copythresh

nginx 166415 1.7 2.0 772780 168336 ? SN 07:19 0:34 php-fpm: pool www

nginx 166413 1.6 2.0 769816 164900 ? SN 07:19 0:32 php-fpm: pool www

nginx 166406 1.6 2.0 772416 168676 ? SN 07:19 0:32 php-fpm: pool www

nginx 166396 1.6 2.3 791192 187316 ? SN 07:19 0:32 php-fpm: pool www

nginx 166412 1.6 2.3 792168 187656 ? SN 07:19 0:32 php-fpm: pool www

nginx 166411 1.5 2.1 778128 173484 ? SN 07:19 0:31 php-fpm: pool www

nginx 166407 1.5 2.1 774260 170600 ? SN 07:19 0:30 php-fpm: pool www

nginx 166417 1.5 2.3 791376 188228 ? RN 07:19 0:30 php-fpm: pool www

nginx 166410 1.5 2.1 780208 176428 ? SN 07:19 0:29 php-fpm: pool www

nginx 166414 1.4 2.3 792232 188452 ? SN 07:19 0:29 php-fpm: pool www

nginx 166409 1.4 2.0 771468 166448 ? SN 07:19 0:29 php-fpm: pool www

nginx 144671 1.4 2.1 775344 174284 ? SN 06:57 0:49 php-fpm: pool www

nginx 149061 1.4 2.1 778076 174052 ? SN 07:01 0:43 php-fpm: pool www

nginx 166402 1.3 2.1 776192 172756 ? SN 07:19 0:27 php-fpm: pool www

nginx 166401 1.3 2.0 769952 166032 ? SN 07:19 0:27 php-fpm: pool www

nginx 166416 1.3 2.0 771912 166392 ? SN 07:19 0:25 php-fpm: pool www

nginx 144597 1.3 2.1 772536 172328 ? SN 06:57 0:43 php-fpm: pool www

nginx 152700 1.3 2.1 774756 169944 ? SN 07:05 0:36 php-fpm: pool www

nginx 166408 1.2 2.0 769816 165592 ? SN 07:19 0:25 php-fpm: pool www

nginx 76335 1.2 2.4 796164 200948 ? SN 05:54 1:30 php-fpm: pool www

nginx 163543 1.2 2.1 778252 173676 ? SN 07:16 0:27 php-fpm: pool www

nginx 151754 1.2 2.3 796352 191692 ? SN 07:04 0:36 php-fpm: pool www

nginx 149045 1.2 2.0 772620 169228 ? SN 07:01 0:38 php-fpm: pool www

nginx 147697 1.2 2.0 769824 168468 ? SN 07:00 0:39 php-fpm: pool www

nginx 61457 1.2 2.1 772284 177156 ? SN 05:41 1:37 php-fpm: pool www

nginx 59978 1.2 2.4 793332 195492 ? SN 05:41 1:38 php-fpm: pool www

nginx 148159 1.2 2.1 772164 170736 ? SN 07:00 0:38 php-fpm: pool www

nginx 145120 1.2 2.2 780448 179700 ? SN 06:57 0:39 php-fpm: pool www

nginx 142909 1.1 2.3 794936 190868 ? SN 06:55 0:40 php-fpm: pool www

nginx 148805 1.1 2.1 782488 177324 ? SN 07:01 0:35 php-fpm: pool www

nginx 61289 1.1 2.3 781528 187044 ? SN 05:41 1:29 php-fpm: pool www

nginx 150224 1.1 2.0 770296 168572 ? SN 07:03 0:33 php-fpm: pool www

nginx 145242 1.1 2.0 772020 167228 ? SN 06:57 0:37 php-fpm: pool www

nginx 142121 1.1 2.1 780560 176248 ? SN 06:54 0:39 php-fpm: pool www

nginx 75700 1.0 2.4 791156 194344 ? SN 05:53 1:16 php-fpm: pool www

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Alekhya Vaddepally 1,670 Reputation points Microsoft External Staff Moderator
    2025-04-03T05:21:42.1133333+00:00

    Hi kuldeep Singh,
    It seems that whenever your web app is restarted, the Unison-FSMonitor is starting automatically. This is because this process is being triggered by the service, script or default startup behavior of the environment. Since the Pkill command only eliminates the process on the runtime, it does not prevent re -launch after the restart.

    To disable permanently unison-FSMONITOR from re-starting, you need to modify the startup configuration of your Azure App service.

    Instead of running only Pkill -F Unison -FSmonitor, you should add a continuous mechanism to stop it. Update your startup command to include the following:

    #!/bin/bash

    pkill -f unison-fsmonitor

    while true; do pkill -f unison-fsmonitor; sleep 10; done &

    steps to update the startup command in Azure go to azure portal, Open your app service ->Click on the configuration (from the left panel)->Scroll down for a startup command,Enter the script above and save

    if you installed as service remove unison-fsmonitor from Auto-Startup,If the issue persists, it might be that unison-fsmonitor is registered as a service. You can check and disable it using SSH/Kudu:

    systemctl disable unison-fsmonitor

    systemctl stop unison-fsmonitor

    make sure you restart the web apps

    Use SSH/Kudu to confirm the process is no longer running:

    ps aux | grep unison

    If nothing appears, it’s successfully removed.

    https://learn.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux&tabs=debian#custom-startup-command
    https://learn.microsoft.com/en-us/azure/app-service/configure-linux-open-ssh-session?pivots=container-linux If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    Let me know if you have any further Queries.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.