Announcement

Collapse
No announcement yet.

Are these log entries indicating a problem?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Are these log entries indicating a problem?

    Michael,

    I've started getting new HS log entries by mcsSprinklersP starting a few days ago. PI ver. 2.21.4.3, HS ver. 4.2.5.0 on Win10 Pro. See attached. Do they indicate an issue with the plugin database? Let me know if you need a debug log from the plugin.

    log (1).txt

    Thank you.
    -Wade

    #2
    You log starts with four startup messages of mcsSprinklers spanning a four hour period. Why was it starting multiple times during the day?

    It also shows SQLite issues at somewhat random times where the failure was thread being aborted. These are associated with recording information used by the Run Log mcsSprinklers page and should occur at each time a valve state changes. It means that no scheduling issues will result from these, but the Run Log page may not be accurate.

    There is no explicit thread management associate wit this so I do not know why a tread was being aborted. It could be a thread internal to SQLite itself.

    You can take a look at the SQLite database \data\mcsSprinklers.db and in particular the table called 'log'. I use DB Browser for SQLite for this. If there are errors or something looks strange then you can delete the table and let mcsSprinklers recreate it on next start. You could also just use the Clear button on the Run Log page to accomplish the same thing if the database is healthy enough to respond to this command.

    Comment


      #3
      Thank you Michael, I'll have a look at the log.

      The reason for the 4 starts within a few hours is that I was doing maintenance on my HS server as well as troubleshooting HS's built-in backup utility, and I restarted HS several times. Despite the first entries being 12/3/21, the date range for this filtered (type: "mcsSprinklers") log was set to start 11/1/21 so I could be sure this was a new issue. It does appear something may have gone awry during one of those restarts.
      -Wade

      Comment


        #4
        I checked the log table in mcsSprinklers.db earlier this morning and didn't see anything obviously wrong. I then went ahead and deleted it (using Clear on the Run Log page) and confirmed the table was then empty. During irrigation operation a few minutes later, the table was populated--for the most part--but another aborted thread was logged. As expected, that entry is missing from the table.

        Any other suggestions for troubleshooting?

        Click image for larger version

Name:	Capture1.JPG
Views:	81
Size:	89.8 KB
ID:	1513090

        Click image for larger version

Name:	Capture.JPG
Views:	90
Size:	88.3 KB
ID:	1513089
        -Wade

        Comment


          #5
          In the attached I changed the SQLite timeout from the default of 30 seconds to 60 seconds. See it that makes any difference. It seems 30 seconds should have been plenty of time, but worth a try. Unzip into \bin\mcsSprinklers folder to replace file of same name.

          Attached Files

          Comment


            #6
            Originally posted by Michael McSharry View Post
            In the attached I changed the SQLite timeout from the default of 30 seconds to 60 seconds. See it that makes any difference. It seems 30 seconds should have been plenty of time, but worth a try. Unzip into \bin\mcsSprinklers folder to replace file of same name.
            Done, and I'll report back after irrigation runs again.

            That .dll was previously in my HS4 root folder rather than \binj\mcsSprinklers. I assume it works in either place but I should delete it from the root folder?
            -Wade

            Comment


              #7
              Correct. It was originally in root in the original HS days and then as more structure developed it was moved to the \bin. It will use whatever is in the root and then look in \bin\mcsSprinklers if it cannot find it. You will need to restart the plugin after renaming the one in the root folder.

              Comment


                #8
                Installed the new .dll in \bin\mcsSprinklers, deleted the old one from HS root, and restarted the PI. Still getting the aborted thread messages. Any other ideas? Thanks.
                -Wade

                Comment


                  #9
                  Another guess is use of a more current version of the SQLite/.NET connector to be the same as the one used by HS. The attached has three files that go into \bin\mcsSprinklers. I removed the explicit command timeout that was tried in the prior attempt.

                  Another thought is a disk issue with bad sectors that are causing the timeout. Perhaps moving the file to a different place on the disk. Copy the file. Rename the original, then rename the copy to the original name should accomplish the move.

                  Use of a more robust database such as MySQL or SQLServer should overcome the issue, but does require more effort to setup an independent database.
                  Attached Files

                  Comment


                    #10
                    I've copied in the new files and will report back. Will hold off moving the file until after this test.

                    Thank you.
                    -Wade

                    Comment


                      #11
                      Originally posted by Michael McSharry View Post
                      Another guess is use of a more current version of the SQLite/.NET connector to be the same as the one used by HS. The attached has three files that go into \bin\mcsSprinklers. I removed the explicit command timeout that was tried in the prior attempt.

                      Another thought is a disk issue with bad sectors that are causing the timeout. Perhaps moving the file to a different place on the disk. Copy the file. Rename the original, then rename the copy to the original name should accomplish the move.

                      Use of a more robust database such as MySQL or SQLServer should overcome the issue, but does require more effort to setup an independent database.
                      The SQLite/.NET update didn't fix it. I've now moved the database file on the disk to rule that out. Will report back after scheduled irrigation tomorrow.
                      -Wade

                      Comment


                        #12
                        Moving the database file also didn't fix it.

                        Studying the log entries a bit further, the only consistency I pick up on is that it seems to always be an "off" command that is issued simultaneous with another zone being commanded "on". I know almost nothing of database structure and operation, but is it possible two entries being committed simultaneously is the cause?
                        -Wade

                        Comment


                          #13
                          What type of valve interface hardware are you using? I see where GoControl is being managed asynchronously in a separate thread.

                          Databases are designed to queue requests and in general handle multiple queries so I do not think it is a ON followed by an OFF milliseconds later is an issue. Something like this would have shown up many years ago if it was a problem.

                          I also see where the same exception of thread being aborted is issued at two procedures. One as ExecuteCommand and another at LogAction procedures. I think the implication of this is that it is a mcsSprinklers thread that is being aborted and not a SQLite thread.

                          Comment


                            #14
                            Originally posted by Michael McSharry View Post
                            What type of valve interface hardware are you using?
                            GoControl
                            -Wade

                            Comment


                              #15
                              I separated logging from control in the GoControl thread. Confirm the results are as expected.

                              http://mcsSprinklers.com/MCSSPRINKLERS_22149.zip

                              Comment

                              Working...
                              X