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

    Huge database entries number

    Scheduled Pinned Locked Moved Unsolved FOG Problems
    11 Posts 3 Posters 428 Views
    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.
    • Tom ElliottT
      Tom Elliott @siarkowski
      last edited by

      @siarkowski I’m not aware of anything that might be causing this.

      The fact that your taskTypeID == 0 in these cases is interesting.

      FOG doesn’t have a ā€œcreate a new taskā€ from Checking in or anything which makes me think what you’re seeing is a symptom, not a cause.

      The way tasks get created is either via UI, API, or (similar to UI/API pair) by having a scheduled task.

      We have (although it may need more refinement) checks to make sure that type of task that does get created are valid (of which taskTypeID 0 != valid task)

      Can you check your scheduled tasks table and see if maybe something there is doing this at some time?

      The fact the task was created at 2026-01-02 09:52:02 looks like it could be a schedule task that somehow has a now invalid task type id that’s just managing to get through.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      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

      S 1 Reply Last reply Reply Quote 0
      • S
        siarkowski @Tom Elliott
        last edited by

        @Tom-Elliott
        Thanks for replay.

        In the tasks menu, scheduled Tasks there are no entries. However but in database table scheduledTasks the are two entries:

        ±-----±------------±-------±-------±-------------±---------±-------±------±--------±------±----------±--------------±----------±-----------±---------±---------±---------±---------±---------±-----------±---------+
        | stID | stName | stDesc | stType | stTaskTypeID | stMinute | stHour | stDOM | stMonth | stDOW | stIsGroup | stGroupHostID | stImageID | stShutDown | stOther1 | stOther2 | stOther3 | stOther4 | stOther5 | stDateTime | stActive |
        ±-----±------------±-------±-------±-------------±---------±-------±------±--------±------±----------±--------------±----------±-----------±---------±---------±---------±---------±---------±-----------±---------+
        | 1 | Deploy Task | | S | 1 | | | | | | 1 | 6 | 0 | | | -1 | fog | 1 | | 1681921800 | 0 |
        | 2 | Deploy Task | | S | 1 | | | | | | 1 | 8 | 0 | | | -1 | fog | 1 | | 1741105800 | 0 |
        ±-----±------------±-------±-------±-------------±---------±-------±------±--------±------±----------±--------------±----------±-----------±---------±---------±---------±---------±---------±-----------±---------+

        Tom ElliottT 1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott @siarkowski
          last edited by

          @siarkowski Thanks, the scheduledTasks you’re showing aren’t showing anything out of the ordinary other than these were ā€œDelayedā€ tasks

          First was delayed to run at 2023-04-19 16:30:00 (UTC)
          Second was delayed to run at 2025-03-04 16:30:00 (UTC)

          I am pretty sure, this isn’t the issue you’re seeing at least.

          So I wonder if there’s some corruption due to running out of disk space that’s causing this?

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          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

          S 1 Reply Last reply Reply Quote 0
          • S
            siarkowski @Tom Elliott
            last edited by

            @Tom-Elliott
            I finished all running deploy tasks, cleaned task table.
            At this moment partition was over 5GiB free disk space.
            I started 37PCs deploy task and the story is same again. Database tasks table files were 40kB before I started the task and after 30 minutes database tasks table files are over 4MB.
            Services work fine, tasks are processed, but tasks table is over 26000 records long and it’s increasing.
            I’m pretty sure if I start task for 200 PCs disk will run out of space after few hours šŸ˜•

            Tom ElliottT 1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott @siarkowski
              last edited by

              @siarkowski I understand what you’re saying, what I don’t understand is why this is happening at all. If this was a normal issue, we’d have been notified of this issue probably many many times.

              I’m not saying this couldn’t be a bug, I just have no way to replicate the issue in a consistent manner.

              Might you be able to pull a backup of your database using FOG Configuration -> Configuration Save -> Export

              (After cleaning up the Task issue) and see if you can use a secondary system to import that DB and (as a test) and ensure all the data you require is there (not necessarily the physical images)).

              I don’t know what to suggest or say here other than I suspect the database is corrupted and it’s that corruption adding and exploding task records. This (again) isn’t to say there isn’t a bug, but I want try to start with a clean baseline and see if things worked properly under ā€œsanitizedā€ environment.

              If a fresh server (if you can share your images that much better) works without adding/exploding the task table, that at least proves it’s a DB Corruption issue. If it, too, starts exploding in task table records, then it shows there’s something in the code that’s doing this unexpectedly but at least we narrowed the scope to exactly where to being looking (somewhere in the task checkin process it seems?)

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              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
              • S
                siarkowski @siarkowski
                last edited by

                @siarkowski
                Corrupeted DB or schema is highly possible.
                I’ll backup tables: users, hosts, groups and images data and make a fresh FOG install.
                I"ll let you know as soon as I’ll do it. It will be no sooner then next week I’m afraid.

                Tom ElliottT 1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott @siarkowski
                  last edited by

                  @siarkowski That’s perfectly understandable and much appreciated. Sorry I don’t have a simple ā€œhere’s what to doā€ right now, and maybe a fresh install will fix the issue altogether, but right now it we have limited information. Thank you again for your understanding a patience with this as well.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  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

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    siarkowski @Tom Elliott
                    last edited by

                    @Tom-Elliott
                    As a curiosity, after two hours of 37 PCs deployment , 10 are finished, 10 are rolling, 17 are waiting. Tasks table is 815000 records long and tasks db files are 138MiB total.
                    Don’t get me wrong, FOG is awesome tool - seriously.

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      siarkowski @siarkowski
                      last edited by

                      @siarkowski

                      Hello All,

                      First hit.
                      I uninstalled FOG, dropped database, installed FOG again, imported users, hosts, images, started task for 31 PCs and records with taskimageID equal to 0 are being inserted again. šŸ˜ž

                      Second hit.
                      I imaged OS disk, installed fresh operating system, installed FOG, imported users, hosts, images, started task for 31 PCs and records with taskimageID equal to 0 are being inserted again. šŸ˜ž šŸ˜ž

                      Third hit.
                      I reverted all changes, installed FOG but rev. 1.5.10.1622, imported users, hosts, images, started task for 31 PCs and no records with taskimageID equal to 0 are being inserted šŸ™‚ Not to be so happy another issue appeared, tasks do not start automatically I have to force it to start, but it’s different story.

                      1 Reply Last reply Reply Quote 0
                      • JJ FullmerJ
                        JJ Fullmer Testers @siarkowski
                        last edited by JJ Fullmer

                        @siarkowski I believe I have found the cause of this.
                        A while back, right after the version you reverted too, we added an improved queueing system. It was a simple syntax error (the wrong $task->id vs $task->get('id') ).

                        This should also greatly improve the experience of the imaging task queue (see also https://github.com/FOGProject/fogproject/issues/736 and https://github.com/FOGProject/fogproject/issues/691) I thought I also wrote a post somewhere in the forum walking through the updated process that fixed some longstanding date math issues, but I can’t find that now.

                        Point being, if you would be so kind as to update to the latest dev-branch version and see if it fixes the issue, that would be very helpful.

                        Have you tried the FogApi powershell module? It's pretty cool IMHO
                        https://github.com/darksidemilk/FogApi
                        https://fogapi.readthedocs.io/en/latest/
                        https://www.powershellgallery.com/packages/FogApi
                        https://forums.fogproject.org/topic/12026/powershell-api-module

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        89

                        Online

                        12.5k

                        Users

                        17.5k

                        Topics

                        156.1k

                        Posts
                        Copyright Ā© 2012-2026 FOG Project