Announcement

Collapse
No announcement yet.

HSTV 3 database size.

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

    HSTV 3 database size.

    Just checking to see if anyone else has been noticing the size of the HSTV database growing to well over 1gb and then topping out at 2gb. I have had it happen several times now where it hits 2gb and then I start getting errors in the log when the import runs.

    I then have to use Access to compact and repair and the size goes back down to around 22mb.

    Then as the imports and updates run the next few days the size continues to increase again. Lately I have been trying to catch it when it hits around 1 to 1.5 gb and do the compact/repair. I have not seen many errors and normally when I do the database is at 2gb or so. Everything else seems to be working great and the reminders and such all appear to be working.

    Thanks,
    Jeff

    #2
    Yeah, the import causes the db to grow and Access does not automatically release that growth.
    When I was working on HSTV 3, I tried to build in the automatic running of the compact function. I could never figure out how to get Access to release the db and let the compact function run.
    --
    Jeff Farmer
    HS 3, HSPhone
    My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
    Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

    Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

    Comment


      #3
      Jeff,

      You probably already tried this, but thought I would check. Could the compact maybe run on HS startup before the rest of HSTV opens the database?

      I don't have a problem shutting it down and compact/repairing every so often, but it does grow rather quickly. I ran the compact yesterday before the imports ran and I think it jumped from 22mb to around 171mb or so in just that one run.

      Thanks,
      Jeff
      Last edited by cerjzc; November 14, 2007, 03:28 AM.

      Comment


        #4
        This thread has shed some light on problems I've had from the beginning.
        Each night, when HSTV did it's import, although I didn't make the connection at hte time, Homeseer would totally hang up requiring me to reboot the system in the morning. I installed Jon00's Watchdog to keep an eye on HS and since then, each night, the system reboots when HS fails to respond. When I did make the connection to HSTV, realizing the time of the reboot corresponded to the data import I reduced the number of days ahead to download to 2 which seemed to help some but not completely so I've learned to just put up with it.
        After reading this thread, I cleaned up the HSTV database using Access and lo and behold, no reboot last night.
        I'd certainly like to have HS run without having to intervene. There are times when I travel and depend on HS to keep things like the security system running.
        Now, I know this will be of little help, but, where it is possible to Compact and Repair an open database using Access the facility must exist. Alternatively, wouldn't it be possible to copy existing records to a new database, delete the old and rename the new periodically as part of the nightly maintenance?
        Real courage is not securing your Wi-Fi network.

        Comment


          #5
          I'm hardly an expert so maybe someone else can speak up with a way to do it.

          I know the compact and repair can be run command line.
          I tried running the code that would close the connection to the db, then run the compact. It would not work. Apparently it has to be closed for a while before it can be compacted.
          --
          Jeff Farmer
          HS 3, HSPhone
          My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
          Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

          Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

          Comment


            #6
            Sounds like you're on the right track anyway.
            Real courage is not securing your Wi-Fi network.

            Comment


              #7
              Placing the shortcut:

              "C:\Program Files\Microsoft Office\Office10\MSACCESS.exe" "C:\Program Files\Homeseer 2\Data\HSTV\hstv.mdb" /compact

              in the startup folder does help so long as the cleanup completes before HSTV starts up. At least when HS crashes due to the HSTV import, the database is cleaned up automatically on restart and HS runs a few more days without issue.

              I tried the same aproach in the autoexec without success.
              Real courage is not securing your Wi-Fi network.

              Comment


                #8
                homeseer script will do the trick

                I made a homeseer script that will do the mdb compacting

                put this script in the scripts folder of homeseer
                then add the following line in startup.txt (also in scripts folder)

                hs.run "compactdb.txt"

                I justed tested it, works fine.
                Attached Files

                Comment


                  #9
                  I still get an error:

                  1/14/2008 8:14:50 PM Startup Start remoting
                  1/14/2008 8:14:50 PM Startup Start event processing
                  1/14/2008 8:14:50 PM Info This version of HomeSeer is registered.
                  1/14/2008 8:14:50 PM Startup Scripting is OK
                  1/14/2008 8:14:50 PM HSTV Compact HSTV database: C:\Program Files\HomeSeer 2\data\hstv\hstv.mdb.
                  1/14/2008 8:14:50 PM Error Running script, script run or compile error in file: compactdb.txt-2147467259:You attempted to open a database that is already opened exclusively by user 'Admin' on machine 'HP'. Try again when the database is available. in line 14 More info: You attempted to open a database that is already opened exclusively by user 'Admin' on machine 'HP'. Try again when the database is available.
                  1/14/2008 8:14:50 PM Info Finished initializing scripting
                  1/14/2008 8:14:50 PM Startup Starting scheduler
                  1/14/2008 8:14:50 PM Startup Start up complete.


                  Any ideas?

                  Thanks,
                  Steve

                  Comment


                    #10
                    how did you restart homeseer?

                    I noticed when you stop the homeseerservice it stays active for about 10 seconds. stop the service, wait about 20 secs and then start it.

                    if you create a command file to restart homeseer:

                    net stop homeseerservice
                    sleep 20
                    net start homeseerservice

                    Comment


                      #11
                      I did not set up Homeseer as a service. I just exited out of the program, put your code in the startup.txt file and restarted Homeseer. Do I need to be running a service? If so, what do I need to do to setup a service?(Not familiar in setting one up)

                      Thanks,
                      Steve

                      Comment


                        #12
                        I think the problem is the database connection does not close quick enough to just stop and restart HomeSeer. So HomeSeer starts up and the db connection is still there.
                        --
                        Jeff Farmer
                        HS 3, HSPhone
                        My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                        Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                        Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                        Comment


                          #13
                          Jeff:

                          What about the error message I am getting when importing the data that I reported in the other thread the other day. You said you know what the error was but you did not tell me what it was. Can you elaborate the error message from the data importing.

                          Thanks,
                          Steve

                          Comment


                            #14
                            I know what the error means.

                            It was saying that one of the queries failed.

                            What I don't know is why that particular query would fail. It was a pretty simple Select. Unless it was related to the size of the database I'm at a loss.
                            --
                            Jeff Farmer
                            HS 3, HSPhone
                            My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                            Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                            Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                            Comment


                              #15
                              Well I will compress the database again before I import the data and let you know if I get that error message.

                              Thanks,
                              Steve

                              Comment

                              Working...
                              X