• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    FOGTaskScheduler causes always 100 % CPU usage

    Scheduled Pinned Locked Moved
    Linux Problems
    2
    6
    820
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      KaiHerlemann
      last edited by

      Hi,
      on our server, running on Debian 10.7 (we just switched from CentOS 7, there was the same problem), causes the FOGTaskScheduler always a 100 % CPU usage. We had this problem on our CentOS server for more than 50 days without interruption. The Debian one is still new, as I said. It’s a VM with 1 core, which is sufficient.
      I found here a thread with related problem, but it’s not the same like that – the result of

      mysql> SELECT * FROM scheduledTasks WHERE stActive=1;
      ...
      

      is empty,

      mysql> SELECT * FROM powerManagement WHERE pmAction LIKE '%wol%';
      ...
      

      shows 158 entries. The newer one in pmMin column have an entry “00” instead of “0” or something else, but I think this is not the problem.
      Two entries had no entry at all in the pmMin/pmHour/pmDom/pmMonth/pmDow columns. I deleted them, but it didn’t help.

      We have 204 hosts in our database, not very much.

      /var/log/fog/fogscheduler.log is not helpful, the content is:

      [12-25-20 12:46:51 am] 
      ==================================
      ===        ====    =====      ====
      ===  =========  ==  ===   ==   ===
      ===  ========  ====  ==  ====  ===
      ===  ========  ====  ==  =========
      ===      ====  ====  ==  =========
      ===  ========  ====  ==  ===   ===
      ===  ========  ====  ==  ====  ===
      ===  =========  ==  ===   ==   ===
      ===  ==========    =====      ====
      ==================================
      ===== Free Opensource Ghost ======
      ==================================
      ============ Credits =============
      = https://fogproject.org/Credits =
      ==================================
      == Released under GPL Version 3 ==
      ==================================
      
      
      [12-25-20 12:46:51 am] Interface Ready with IP Address: 127.0.0.1
      [12-25-20 12:46:51 am] Interface Ready with IP Address: 127.0.1.1
      [12-25-20 12:46:51 am] Interface Ready with IP Address: xxxxxxxx
      [12-25-20 12:46:51 am] Interface Ready with IP Address: xxxxxxxx
      [12-25-20 12:46:51 am]  * Starting TaskScheduler Service
      [12-25-20 12:46:51 am]  * Checking for new items every 60 seconds
      [12-25-20 12:46:51 am]  * Starting service loop
      [12-25-20 12:46:51 am]  * 158 tasks found.
      
      

      In opposite to the linked thread, we have no problems at all with the webgui, it’s only about high CPU usage. We also don’t have noticeable performance problems. But the temperature of the host cpu is much higher when fog is running 😄

      Thanks & keep healthy,
      Kai

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @kaiherlemann said in FOGTaskScheduler causes always 100 % CPU usage:

        Two entries had no entry at all in the pmMin/pmHour/pmDom/pmMonth/pmDow columns. I deleted them, but it didn’t help.

        Did you restart the FOG server after that?

        Which version of FOG do you use?

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        K 1 Reply Last reply Reply Quote 0
        • K
          KaiHerlemann @Sebastian Roth
          last edited by

          @sebastian-roth said in FOGTaskScheduler causes always 100 % CPU usage:

          Did you restart the FOG server after that?

          I don’t remember if I restarted the FOG server immediately after that (I think so), but in the meantime I restarted it and it didn’t help.

          Which version of FOG do you use?

          We use fog 1.5.9.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Sebastian Roth

            @KaiHerlemann A few weeks ago we had someone report an issue when adding power management (PM) tasks via the FOG API where hour was sent as “0” but ended up in the DB as empty value. We found and fixed what was causing this in the API as well as in FOG Cron class. Now I am wondering if the fix in FOG Cron class would also fix things in your case. Would you try applying it manually and restarting the whole FOG server (just to make sure)?

            If this still doesn’t help I need to ask you to provide the full powerManagement table you have in your database so I can try to replicate the issue on my side as well. Use mysqldump to export this single table, upload somewhere and post a link here (or send it to me via PM).

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • K
              KaiHerlemann
              last edited by KaiHerlemann

              Problem is solved.
              There were 24 rows in the table powerManagement like this:

              +------+----------+-------+--------+-------+---------+-------+----------+------------+
              | pmID | pmHostID | pmMin | pmHour | pmDom | pmMonth | pmDow | pmAction | pmOndemand |
              +------+----------+-------+--------+-------+---------+-------+----------+------------+
              |  510 |      106 | 7     | 30     | *     | *       | *     | wol      | 0          |
              

              This is obviously nonsense, a day doesn’t have 30 hours. The hours and minutes were probably mixed up.

              I said we had no performance problems – we had, I notice it now.

              Thanks for your help!

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @KaiHerlemann Great you figured it out. Still something we should prevent from happening in the code.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • K KaiHerlemann referenced this topic on
                • 1 / 1
                • First post
                  Last post

                179

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project