And there is the crux of the issue: Nov 8 20:03:39 raspberrypi weewx[6055] INFO weewx.engine: Using archive interval of 60 seconds (software record generation)
Lesser RPis are just fine when used with a reasonable archive interval. Cutting it to the minimum 60 seconds is asking for trouble. Gary On Tuesday, 9 November 2021 at 11:56:10 UTC+10 tke...@gmail.com wrote: > There are lots of ways this can happen. Things to try (or, at least, think > about): > > 1. I would think that an RPi2 would be enough to run WeeWX + Belchertown. > Check by running a tool such as htop or top. How busy is the processor? > > Along the same line, what is your archive interval? If it is short (1 > minute), and your reports are complex, it is possible you are asking too > much of an RPi2. > > 2. Database locked errors can be as simple as having an open instance of > sqlite3 or SQLite DB Browser, which are contending for the locks. Running > weewxd and another weewx utility simultaneously can cause this. You can > check to see if more than one process is using the database by using the > "fuser" command: > > fuser -v /var/lib/weewx/weewx.sdb > > 3. Older versions of the underlying "C" library would wait for a full > second if the database was locked. It wouldn't take too many attempts to > exceed the typical 5 second timeout limit. However, I think this has been > fixed in newer versions. Still, it's worth an "apt update", followed by > "apt upgrade" to be sure you're up to date. > > 4. I am not very familiar with the Belchertown skin, so it's possible that > it's creating this problem internally by holding open two connections > simultaneously, without an intervening commit. Don't know. > > 5. It's also possible that your SD card is failing, and SQLite is > struggling to finalize the commits, leading to lock contention. The tool > fsck can help to determine the health of your card. Use the utility "top", > and look at the "wa" field (2nd line) while WeeWX is generating reports. > > > > > > On Mon, Nov 8, 2021 at 5:21 PM Doug Jenkins <do...@dougjenkins.com> wrote: > >> Rpi2 with the latest O/S version is probably not enough to run both >> belchertown and weewx together. Especially if you have a lot of archive >> records to generate the NOAA reports on the first go. >> >> The RPI 4 is readily available and will be a good investment for a >> nominal fee. It has at least 2GB (vs 512mb) of RAM and a 4 core processor >> instead of the single core Broadcom chip that came on that pi. >> >> The bus is a lot better for I/O and you will have a lot less of an issue >> with SD card corruption with RPi4 than with RPi2. >> >> Trust me, I started my weewx 3.x site 3 years ago in on a RPi 2 and >> struggled with stability with the pi itself. Now I run on a RPi4 with a >> portable SSD drive to store my data with no issues. >> >> Just my $0.02.... >> >> >> >> On Mon, Nov 8, 2021, 8:02 PM vince <vince...@gmail.com> wrote: >> >>> I bet if you turn Belchertown off (temporarily) and enable just the >>> Standard or Seasons skin that it'll work just fine. >>> >>> Sometimes you need to throw more compute at the problem. >>> >>> On Monday, November 8, 2021 at 4:40:00 PM UTC-8 bchap...@gmail.com >>> wrote: >>> >>>> Raspberry Pi 2 with raspbian buster >>>> >>>> This runs in a cycle of approximately every 6 minutes. Nothing else >>>> running on this machine. >>>> >>>> On Monday, November 8, 2021 at 7:35:14 PM UTC-5 tke...@gmail.com wrote: >>>> >>>>> Yes, tell us what computer you are using. Also, the operating system >>>>> and version. >>>>> >>>>> On Mon, Nov 8, 2021 at 4:32 PM vince <vince...@gmail.com> wrote: >>>>> >>>>>> Your database is locked :-) >>>>>> >>>>>> Typically this is when you're trying to do too much too fast on a >>>>>> very slow box like a pi-zero or the like. >>>>>> >>>>>> On Monday, November 8, 2021 at 4:06:48 PM UTC-8 bchap...@gmail.com >>>>>> wrote: >>>>>> >>>>>>> Nov 8 18:53:35 raspberrypi weewx[5618] INFO weewx.engine: Main loop >>>>>>> exiting. Shutting engine down. >>>>>>> Nov 8 18:53:35 raspberrypi weewx[5618] INFO weewx.engine: Shutting >>>>>>> down StdReport thread >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR weewx.reportengine: >>>>>>> Caught unrecoverable exception in generator >>>>>>> 'user.belchertown.HighchartsJsonGenerator' >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** database is locked >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** Traceback (most recent call last): >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** File >>>>>>> "/usr/share/weewx/weedb/sqlite.py", line 30, in guarded_fn >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** return fn(*args, **kwargs) >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** File >>>>>>> "/usr/share/weewx/weedb/sqlite.py", line 219, in execute >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** return >>>>>>> sqlite3.Cursor.execute(self, >>>>>>> *args, **kwargs) >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** sqlite3.OperationalError: database is >>>>>>> locked >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** During handling of the above >>>>>>> exception, >>>>>>> another exception occurred: >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** Traceback (most recent call last): >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** File >>>>>>> "/usr/share/weewx/weewx/reportengine.py", line 196, in run >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** obj.start() >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** File >>>>>>> "/usr/share/weewx/weewx/reportengine.py", line 281, in start >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** self.run() >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** File >>>>>>> "/usr/share/weewx/user/belchertown.py", line 1550, in run >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** start_ts = >>>>>>> archive.firstGoodStamp() >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** File >>>>>>> "/usr/share/weewx/weewx/manager.py", line 247, in firstGoodStamp >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** _row = self.getSql("SELECT >>>>>>> MIN(dateTime) FROM %s" % self.table_name) >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** File >>>>>>> "/usr/share/weewx/weewx/manager.py", line 449, in getSql >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** _cursor.execute(sql, sqlargs) >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** File >>>>>>> "/usr/share/weewx/weedb/sqlite.py", line 44, in guarded_fn >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** raise weedb.OperationalError(e) >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** weedb.OperationalError: database is >>>>>>> locked >>>>>>> Nov 8 18:53:44 raspberrypi weewx[5618] ERROR >>>>>>> weewx.reportengine: **** Generator terminated >>>>>>> Nov 8 18:53:45 raspberrypi weewx[5618] INFO user.gw1000: >>>>>>> Gw1000Collector thread has been terminated >>>>>>> Nov 8 18:53:45 raspberrypi weewx[5618] CRITICAL __main__: Database >>>>>>> OperationalError exception: database is locked >>>>>>> Nov 8 18:53:45 raspberrypi weewx[5618] CRITICAL __main__: **** >>>>>>> Waiting 2 minutes then retrying... >>>>>>> Nov 8 18:55:45 raspberrypi weewx[5618] INFO __main__: retrying... >>>>>>> >>>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "weewx-user" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to weewx-user+...@googlegroups.com. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/weewx-user/005fa296-d595-4f83-9626-1d6f45ccf251n%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/weewx-user/005fa296-d595-4f83-9626-1d6f45ccf251n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "weewx-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to weewx-user+...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/weewx-user/b3bd61f2-c6a1-4a39-bf90-6e4dabcf2e70n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/weewx-user/b3bd61f2-c6a1-4a39-bf90-6e4dabcf2e70n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "weewx-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to weewx-user+...@googlegroups.com. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/CACC0i0wp62Vji_7dd%3Drbn1UzoczcPUw2z1siMib7psAuhxb9gA%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/weewx-user/CACC0i0wp62Vji_7dd%3Drbn1UzoczcPUw2z1siMib7psAuhxb9gA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/42f732ac-5e0f-4921-9ae6-8eb54c5a0534n%40googlegroups.com.