Belchertown Error - Any idea what is wrong?

150 views
Skip to first unread message

bchap...@gmail.com

unread,
Nov 8, 2021, 7:06:48 PM11/8/21
to weewx-user
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...

vince

unread,
Nov 8, 2021, 7:32:08 PM11/8/21
to weewx-user
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.

Tom Keffer

unread,
Nov 8, 2021, 7:35:14 PM11/8/21
to weewx-user
Yes, tell us what computer you are using. Also, the operating system and version.

--
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.

bchap...@gmail.com

unread,
Nov 8, 2021, 7:40:00 PM11/8/21
to weewx-user
Raspberry Pi 2 with raspbian buster

This runs in a cycle of approximately every 6 minutes.  Nothing else running on this machine.

vince

unread,
Nov 8, 2021, 8:02:35 PM11/8/21
to weewx-user
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.

gjr80

unread,
Nov 8, 2021, 8:18:47 PM11/8/21
to weewx-user
Would like to see a more extensive log extract, I wouldn’t have though a RPi2 would have that much of a problem with just WeeWX and Belchertown using a GW1000.

Gary

Doug Jenkins

unread,
Nov 8, 2021, 8:21:11 PM11/8/21
to weewx...@googlegroups.com
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....



bchap...@gmail.com

unread,
Nov 8, 2021, 8:37:09 PM11/8/21
to weewx-user
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.gw1000: driver version is 0.4.1
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.gw1000: GW1000 address is 192.168.20.222:45000
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.gw1000: poll interval is 15 seconds
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.engine: StdConvert target unit is 0x1
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.engine: Archive will use data binding wx_binding
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.engine: Record generation will be attempted in 'software'
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.engine: Using archive interval of 60 seconds (software record generation)
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.restx: StationRegistry: Registration not requested.
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Data for station KNYGRANV5 will be posted
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Data for station KNYGRANV5 will be posted
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.restx: CWOP: Data for station EW5855 will be posted
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.wcloud: service version is 0.13
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.wcloud: Data will be uploaded for id=efad7e92b2c1e3bd
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.windy: version is 0.7
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.windy: Data will be uploaded to https://stations.windy.com/pws/update
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.owm: service version is 0.9
Nov  8 20:03:39 raspberrypi weewx[6055] ERROR user.owm: Data will not be posted: Missing option 'OpenWeatherMap'
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.rainmachine: service version is 0.5
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.rainmachine: Data will be uploaded for RainMachine located at 192.168.20.155 ssl: False
Nov  8 20:03:39 raspberrypi weewx[6055] INFO __main__: Starting up weewx version 4.5.1
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.manager: Starting backfill of daily summaries
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.manager: Daily summaries up to date
Nov  8 20:03:39 raspberrypi weewx[6055] INFO weewx.engine: Starting main packet loop.
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.gw1000: Using 'rainyear' for rain total
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.gw1000: skipping rain measurement of 292.9: no last rain
Nov  8 20:03:39 raspberrypi weewx[6055] INFO user.gw1000: Skipping lightning count of 0: no last count
Nov  8 20:04:25 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:04:00 EST (1636419840) to database 'weewx.sdb'
Nov  8 20:04:25 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:04:00 EST (1636419840) to daily summary in 'weewx.sdb'
Nov  8 20:04:25 raspberrypi weewx[6055] INFO weewx.restx: RainMachine: Published record 2021-11-08 20:04:00 EST (1636419840)
Nov  8 20:04:25 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:04:00 EST (1636419840)
Nov  8 20:04:25 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:04:00 EST (1636419840)
Nov  8 20:04:25 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:04:00 EST (1636419840)
Nov  8 20:04:25 raspberrypi weewx[6055] INFO weewx.restx: CWOP: Published record 2021-11-08 20:04:00 EST (1636419840)
Nov  8 20:04:26 raspberrypi weewx[6055] INFO weewx.restx: WeatherCloud: Published record 2021-11-08 20:04:00 EST (1636419840)
Nov  8 20:04:30 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 5.18 seconds
Nov  8 20:04:36 raspberrypi weewx[6055] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 5.53 seconds
Nov  8 20:04:36 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 5 files to /var/www/html/weewx
Nov  8 20:04:37 raspberrypi weewx[6055] INFO paramiko.transport: Connected (version 2.0, client OpenSSH_7.9p1)
Nov  8 20:04:37 raspberrypi weewx[6055] INFO paramiko.transport: Authentication (password) successful!
Nov  8 20:04:37 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] Opened sftp connection (server version 3)
Nov  8 20:04:47 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] sftp session closed.
Nov  8 20:04:47 raspberrypi weewx[6055] INFO user.sftp: sftpgenerator: transferred 41 files in 10.57 seconds
Nov  8 20:04:53 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 6.58 seconds
Nov  8 20:04:54 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 37 files to /var/www/html
Nov  8 20:05:23 raspberrypi crontab[6326]: (pi) REPLACE (pi)
Nov  8 20:05:23 raspberrypi crontab[6326]: (pi) END EDIT (pi)
Nov  8 20:05:25 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:05:00 EST (1636419900) to database 'weewx.sdb'
Nov  8 20:05:25 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:05:00 EST (1636419900) to daily summary in 'weewx.sdb'
Nov  8 20:05:27 raspberrypi weewx[6055] INFO weewx.engine: Launch of report thread aborted: existing report thread still running
Nov  8 20:05:28 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:05:00 EST (1636419900)
Nov  8 20:05:28 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:05:00 EST (1636419900)
Nov  8 20:05:28 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:05:00 EST (1636419900)
Nov  8 20:05:34 raspberrypi crontab[6351]: (pi) LIST (pi)
Nov  8 20:06:01 raspberrypi cron[263]: (pi) RELOAD (crontabs/pi)
Nov  8 20:06:22 raspberrypi systemd[1]: Started Session 763 of user pi.
Nov  8 20:06:26 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:06:00 EST (1636419960) to database 'weewx.sdb'
Nov  8 20:06:26 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:06:00 EST (1636419960) to daily summary in 'weewx.sdb'
Nov  8 20:06:26 raspberrypi systemd[1]: Started Session 764 of user pi.
Nov  8 20:06:26 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:06:00 EST (1636419960)
Nov  8 20:06:26 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:06:00 EST (1636419960)
Nov  8 20:06:27 raspberrypi systemd[1]: session-764.scope: Succeeded.
Nov  8 20:06:27 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:06:00 EST (1636419960)
Nov  8 20:06:32 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 5.27 seconds
Nov  8 20:06:37 raspberrypi weewx[6055] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 5.55 seconds
Nov  8 20:06:37 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Nov  8 20:06:38 raspberrypi weewx[6055] INFO paramiko.transport: Connected (version 2.0, client OpenSSH_7.9p1)
Nov  8 20:06:38 raspberrypi weewx[6055] INFO paramiko.transport: Authentication (password) successful!
Nov  8 20:06:38 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] Opened sftp connection (server version 3)
Nov  8 20:06:57 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] sftp session closed.
Nov  8 20:06:57 raspberrypi weewx[6055] INFO user.sftp: sftpgenerator: transferred 78 files in 20.32 seconds
Nov  8 20:07:04 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 6.63 seconds
Nov  8 20:07:05 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 2 files to /var/www/html
Nov  8 20:07:26 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:07:00 EST (1636420020) to database 'weewx.sdb'
Nov  8 20:07:27 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:07:00 EST (1636420020) to daily summary in 'weewx.sdb'
Nov  8 20:07:27 raspberrypi weewx[6055] INFO weewx.engine: Launch of report thread aborted: existing report thread still running
Nov  8 20:07:27 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:07:00 EST (1636420020)
Nov  8 20:07:28 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:07:00 EST (1636420020)
Nov  8 20:07:28 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:07:00 EST (1636420020)
Nov  8 20:08:27 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:08:00 EST (1636420080) to database 'weewx.sdb'
Nov  8 20:08:27 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:08:00 EST (1636420080) to daily summary in 'weewx.sdb'
Nov  8 20:08:28 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:08:00 EST (1636420080)
Nov  8 20:08:28 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:08:00 EST (1636420080)
Nov  8 20:08:28 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:08:00 EST (1636420080)
Nov  8 20:08:33 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 5.10 seconds
Nov  8 20:08:38 raspberrypi weewx[6055] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 5.50 seconds
Nov  8 20:08:38 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Nov  8 20:08:39 raspberrypi weewx[6055] INFO paramiko.transport: Connected (version 2.0, client OpenSSH_7.9p1)
Nov  8 20:08:39 raspberrypi weewx[6055] INFO paramiko.transport: Authentication (password) successful!
Nov  8 20:08:39 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] Opened sftp connection (server version 3)
Nov  8 20:08:52 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] sftp session closed.
Nov  8 20:08:52 raspberrypi weewx[6055] INFO user.sftp: sftpgenerator: transferred 43 files in 13.08 seconds
Nov  8 20:08:58 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 6.71 seconds
Nov  8 20:08:58 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 2 files to /var/www/html
Nov  8 20:09:28 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:09:00 EST (1636420140) to database 'weewx.sdb'
Nov  8 20:09:28 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:09:00 EST (1636420140) to daily summary in 'weewx.sdb'
Nov  8 20:09:32 raspberrypi weewx[6055] INFO weewx.engine: Launch of report thread aborted: existing report thread still running
Nov  8 20:09:32 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:09:00 EST (1636420140)
Nov  8 20:09:33 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:09:00 EST (1636420140)
Nov  8 20:09:33 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:09:00 EST (1636420140)
Nov  8 20:10:28 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:10:00 EST (1636420200) to database 'weewx.sdb'
Nov  8 20:10:28 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:10:00 EST (1636420200) to daily summary in 'weewx.sdb'
Nov  8 20:10:29 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:10:00 EST (1636420200)
Nov  8 20:10:29 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:10:00 EST (1636420200)
Nov  8 20:10:29 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:10:00 EST (1636420200)
Nov  8 20:10:34 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 5.13 seconds
Nov  8 20:10:39 raspberrypi weewx[6055] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 5.57 seconds
Nov  8 20:10:39 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Nov  8 20:10:40 raspberrypi weewx[6055] INFO paramiko.transport: Connected (version 2.0, client OpenSSH_7.9p1)
Nov  8 20:10:40 raspberrypi weewx[6055] INFO paramiko.transport: Authentication (password) successful!
Nov  8 20:10:40 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] Opened sftp connection (server version 3)
Nov  8 20:10:52 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] sftp session closed.
Nov  8 20:10:52 raspberrypi weewx[6055] INFO user.sftp: sftpgenerator: transferred 43 files in 12.91 seconds
Nov  8 20:10:59 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 6.61 seconds
Nov  8 20:10:59 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 2 files to /var/www/html
Nov  8 20:11:29 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:11:00 EST (1636420260) to database 'weewx.sdb'
Nov  8 20:11:29 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:11:00 EST (1636420260) to daily summary in 'weewx.sdb'
Nov  8 20:11:34 raspberrypi weewx[6055] INFO weewx.engine: Launch of report thread aborted: existing report thread still running
Nov  8 20:11:34 raspberrypi systemd[1]: Started Session 765 of user pi.
Nov  8 20:11:34 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:11:00 EST (1636420260)
Nov  8 20:11:34 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:11:00 EST (1636420260)
Nov  8 20:11:34 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:11:00 EST (1636420260)
Nov  8 20:11:38 raspberrypi systemd[1]: session-765.scope: Succeeded.
Nov  8 20:12:29 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:12:00 EST (1636420320) to database 'weewx.sdb'
Nov  8 20:12:29 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:12:00 EST (1636420320) to daily summary in 'weewx.sdb'
Nov  8 20:12:30 raspberrypi weewx[6055] INFO weewx.restx: Windy: Published record 2021-11-08 20:12:00 EST (1636420320)
Nov  8 20:12:30 raspberrypi weewx[6055] INFO weewx.restx: PWSWeather: Published record 2021-11-08 20:12:00 EST (1636420320)
Nov  8 20:12:30 raspberrypi weewx[6055] INFO weewx.restx: Wunderground-PWS: Published record 2021-11-08 20:12:00 EST (1636420320)
Nov  8 20:12:35 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 5.13 seconds
Nov  8 20:12:40 raspberrypi weewx[6055] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 5.54 seconds
Nov  8 20:12:40 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Nov  8 20:12:41 raspberrypi weewx[6055] INFO paramiko.transport: Connected (version 2.0, client OpenSSH_7.9p1)
Nov  8 20:12:41 raspberrypi weewx[6055] INFO paramiko.transport: Authentication (password) successful!
Nov  8 20:12:41 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] Opened sftp connection (server version 3)
Nov  8 20:12:53 raspberrypi weewx[6055] INFO paramiko.transport.sftp: [chan 0] sftp session closed.
Nov  8 20:12:53 raspberrypi weewx[6055] INFO user.sftp: sftpgenerator: transferred 43 files in 12.11 seconds
Nov  8 20:13:00 raspberrypi weewx[6055] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 6.88 seconds
Nov  8 20:13:00 raspberrypi weewx[6055] INFO weewx.reportengine: Copied 2 files to /var/www/html
Nov  8 20:13:15 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:13:00 EST (1636420380) to database 'weewx.sdb'
Nov  8 20:13:15 raspberrypi weewx[6055] INFO weewx.manager: Added record 2021-11-08 20:13:00 EST (1636420380) to daily summary in 'weewx.sdb'
Nov  8 20:13:20 raspberrypi weewx[6055] INFO weewx.engine: Main loop exiting. Shutting engine down.
Nov  8 20:13:20 raspberrypi weewx[6055] INFO weewx.engine: Shutting down StdReport thread
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'user.belchertown.HighchartsJsonGenerator'
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  database is locked
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 30, in guarded_fn
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****      return fn(*args, **kwargs)
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 219, in execute
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****      return sqlite3.Cursor.execute(self, *args, **kwargs)
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  sqlite3.OperationalError: database is locked
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  During handling of the above exception, another exception occurred:
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 196, in run
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****      obj.start()
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 281, in start
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****      self.run()
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 1833, in run
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****      series_data = self.get_observation_data(binding, archive, observation_type, minstamp, maxstamp, aggregate_type, aggregate_interval, time_length, xAxis_groupby, xAxis_categories, mirrored_value, weatherRange_obs_lookup, wind_rose_color)
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 2314, in get_observation_data
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****      for row in query:
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/manager.py", line 460, in genSql
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****      for _row in _cursor.execute(sql, sqlargs):
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 44, in guarded_fn
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****      raise weedb.OperationalError(e)
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  weedb.OperationalError: database is locked
Nov  8 20:13:27 raspberrypi weewx[6055] ERROR weewx.reportengine:         ****  Generator terminated
Nov  8 20:13:28 raspberrypi weewx[6055] INFO user.gw1000: Gw1000Collector thread has been terminated
Nov  8 20:13:28 raspberrypi weewx[6055] CRITICAL __main__: Database OperationalError exception: database is locked
Nov  8 20:13:28 raspberrypi weewx[6055] CRITICAL __main__:     ****  Waiting 2 minutes then retrying...
Nov  8 20:15:28 raspberrypi weewx[6055] INFO __main__: retrying...
Nov  8 20:15:28 raspberrypi weewx[6055] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Nov  8 20:15:28 raspberrypi weewx[6055] INFO __main__: Debug is 0
Nov  8 20:15:28 raspberrypi weewx[6055] INFO weewx.engine: Loading station type GW1000 (user.gw1000)
Nov  8 20:15:28 raspberrypi weewx[6055] INFO user.gw1000: field map is {'co2': 'co2', 'co2_24h_avg': 'co2_24h_avg', 'dateTime': 'datetime', 'daymaxwind': 'daymaxwind', 'dayRain': 'rainday', 'dewpoint': 'dewpoint', 'extraHumid1': 'humid1', 'extraHumid2': 'humid2', 'extraHumid3': 'humid3', 'extraHumid4': 'humid4', 'extraHumid5': 'humid5', 'extraHumid6': 'humid6', 'extraHumid7': 'humid7', 'extraHumid8': 'humid8', 'extraHumid17': 'humid17', 'extraTemp1': 'temp1', 'extraTemp2': 'temp2', 'extraTemp3': 'temp3', 'extraTemp4': 'temp4', 'extraTemp5': 'temp5', 'extraTemp6': 'temp6', 'extraTemp7': 'temp7', 'extraTemp8': 'temp8', 'extraTemp9': 'temp9', 'extraTemp10': 'temp10', 'extraTemp11': 'temp11', 'extraTemp12': 'temp12', 'extraTemp13': 'temp13', 'extraTemp14': 'temp14', 'extraTemp15': 'temp15', 'extraTemp16': 'temp16', 'extraTemp17': 'temp17', 'heatindex': 'heatindex', 'hourRain': 'rainhour', 'inHumidity': 'inhumid', 'inTemp': 'intemp', 'leafWet1': 'leafwet1', 'leafWet2': 'leafwet2', 'leafWet3': 'leafwet3', 'leafWet4': 'leafwet4', 'leafWet5': 'leafwet5', 'leafWet6': 'leafwet6', 'leafWet7': 'leafwet7', 'leafWet8': 'leafwet8', 'leak1': 'leak1', 'leak2': 'leak2', 'leak3': 'leak3', 'leak4': 'leak4', 'lightning_distance': 'lightningdist', 'lightning_last_det_time': 'lightningdettime', 'lightning_strike_count': 'lightning_strike_count', 'lightningcount': 'lightningcount', 'luminosity': 'light', 'monthRain': 'rainmonth', 'outHumidity': 'outhumid', 'outTemp': 'outtemp', 'pm2_5': 'pm251', 'pm2_51_24h_avg': 'pm251_24h_avg', 'pm2_52': 'pm252', 'pm2_52_24h_avg': 'pm252_24h_avg', 'pm2_53': 'pm253', 'pm2_53_24h_avg': 'pm253_24h_avg', 'pm2_54': 'pm254', 'pm2_54_24h_avg': 'pm254_24h_avg', 'pm2_55': 'pm255', 'pm2_55_24h_avg': 'pm255_24h_avg', 'pm10': 'pm10', 'pm10_24h_avg': 'pm10_24h_avg', 'pressure': 'absbarometer', 'rain': 'rain', 'rainRate': 'rainrate', 'relbarometer': 'relbarometer', 'soilMoist1': 'soilmoist1', 'soilMoist2': 'soilmoist2', 'soilMoist3': 'soilmoist3', 'soilMoist4': 'soilmoist4', 'soilMoist5': 'soilmoist5', 'soilMoist6': 'soilmoist6', 'soilMoist7': 'soilmoist7', 'soilMoist8': 'soilmoist8', 'soilMoist9': 'soilmoist9', 'soilMoist10': 'soilmoist10', 'soilMoist11': 'soilmoist11', 'soilMoist12': 'soilmoist12', 'soilMoist13': 'soilmoist13', 'soilMoist14': 'soilmoist14', 'soilMoist15': 'soilmoist15', 'soilMoist16': 'soilmoist16', 'soilTemp1': 'soiltemp1', 'soilTemp2': 'soiltemp2', 'soilTemp3': 'soiltemp3', 'soilTemp4': 'soiltemp4', 'soilTemp5': 'soiltemp5', 'soilTemp6': 'soiltemp6', 'soilTemp7': 'soiltemp7', 'soilTemp8': 'soiltemp8', 'soilTemp9': 'soiltemp9', 'soilTemp10': 'soiltemp10', 'soilTemp11': 'soiltemp11', 'soilTemp12': 'soiltemp12', 'soilTemp13': 'soiltemp13', 'soilTemp14': 'soiltemp14', 'soilTemp15': 'soiltemp15', 'soilTemp16': 'soiltemp16', 'stormRain': 'rainevent', 'totalRain': 'raintotals', 'UV': 'uvi', 'uvradiation': 'uv', 'weekRain': 'rainweek', 'wh24_batt': 'wh24_batt', 'wh24_sig': 'wh24_sig', 'wh25_batt': 'wh25_batt', 'wh25_sig': 'wh25_sig', 'wh26_batt': 'wh26_batt', 'wh26_sig': 'wh26_sig', 'wh31_ch1_batt': 'wh31_ch1_batt', 'wh31_ch1_sig': 'wh31_ch1_sig', 'wh31_ch2_batt': 'wh31_ch2_batt', 'wh31_ch2_sig': 'wh31_ch2_sig', 'wh31_ch3_batt': 'wh31_ch3_batt', 'wh31_ch3_sig': 'wh31_ch3_sig', 'wh31_ch4_batt': 'wh31_ch4_batt', 'wh31_ch4_sig': 'wh31_ch4_sig', 'wh31_ch5_batt': 'wh31_ch5_batt', 'wh31_ch5_sig': 'wh31_ch5_sig', 'wh31_ch6_batt': 'wh31_ch6_batt', 'wh31_ch6_sig': 'wh31_ch6_sig', 'wh31_ch7_batt': 'wh31_ch7_batt', 'wh31_ch7_sig': 'wh31_ch7_sig', 'wh31_ch8_batt': 'wh31_ch8_batt', 'wh31_ch8_sig': 'wh31_ch8_sig', 'wh35_ch1_batt': 'wh35_ch1_batt', 'wh35_ch1_sig': 'wh35_ch1_sig', 'wh35_ch2_batt': 'wh35_ch2_batt', 'wh35_ch2_sig': 'wh35_ch2_sig', 'wh35_ch3_batt': 'wh35_ch3_batt', 'wh35_ch3_sig': 'wh35_ch3_sig', 'wh35_ch4_batt': 'wh35_ch4_batt', 'wh35_ch4_sig': 'wh35_ch4_sig', 'wh35_ch5_batt': 'wh35_ch5_batt', 'wh35_ch5_sig': 'wh35_ch5_sig', 'wh35_ch6_batt': 'wh35_ch6_batt', 'wh35_ch6_sig': 'wh35_ch6_sig', 'wh35_ch7_batt': 'wh35_ch7_batt', 'wh35_ch7_sig': 'wh35_ch7_sig', 'wh35_ch8_batt': 'wh35_ch8_batt', 'wh35_ch8_sig': 'wh35_ch8_sig', 'wh40_batt': 'wh40_batt', 'wh40_sig': 'wh40_sig', 'wh41_ch1_batt': 'wh41_ch1_batt', 'wh41_ch1_sig': 'wh41_ch1_sig', 'wh41_ch2_batt': 'wh41_ch2_batt', 'wh41_ch2_sig': 'wh41_ch2_sig', 'wh41_ch3_batt': 'wh41_ch3_batt', 'wh41_ch3_sig': 'wh41_ch3_sig', 'wh41_ch4_batt': 'wh41_ch4_batt', 'wh41_ch4_sig': 'wh41_ch4_sig', 'wh45_batt': 'wh45_batt', 'wh45_sig': 'wh45_sig', 'wh51_ch1_batt': 'wh51_ch1_batt', 'wh51_ch1_sig': 'wh51_ch1_sig', 'wh51_ch2_batt': 'wh51_ch2_batt', 'wh51_ch2_sig': 'wh51_ch2_sig', 'wh51_ch3_batt': 'wh51_ch3_batt', 'wh51_ch3_sig': 'wh51_ch3_sig', 'wh51_ch4_batt': 'wh51_ch4_batt', 'wh51_ch4_sig': 'wh51_ch4_sig', 'wh51_ch5_batt': 'wh51_ch5_batt', 'wh51_ch5_sig': 'wh51_ch5_sig', 'wh51_ch6_batt': 'wh51_ch6_batt', 'wh51_ch6_sig': 'wh51_ch6_sig', 'wh51_ch7_batt': 'wh51_ch7_batt', 'wh51_ch7_sig': 'wh51_ch7_sig', 'wh51_ch8_batt': 'wh51_ch8_batt', 'wh51_ch8_sig': 'wh51_ch8_sig', 'wh51_ch9_batt': 'wh51_ch9_batt', 'wh51_ch9_sig': 'wh51_ch9_sig', 'wh51_ch10_batt': 'wh51_ch10_batt', 'wh51_ch10_sig': 'wh51_ch10_sig', 'wh51_ch11_batt': 'wh51_ch11_batt', 'wh51_ch11_sig': 'wh51_ch11_sig', 'wh51_ch12_batt': 'wh51_ch12_batt', 'wh51_ch12_sig': 'wh51_ch12_sig', 'wh51_ch13_batt': 'wh51_ch13_batt', 'wh51_ch13_sig': 'wh51_ch13_sig', 'wh51_ch14_batt': 'wh51_ch14_batt', 'wh51_ch14_sig': 'wh51_ch14_sig', 'wh51_ch15_batt': 'wh51_ch15_batt', 'wh51_ch15_sig': 'wh51_ch15_sig', 'wh51_ch16_batt': 'wh51_ch16_batt', 'wh51_ch16_sig': 'wh51_ch16_sig', 'wh55_ch1_batt': 'wh55_ch1_batt', 'wh55_ch1_sig': 'wh55_ch1_sig', 'wh55_ch2_batt': 'wh55_ch2_batt', 'wh55_ch2_sig': 'wh55_ch2_sig', 'wh55_ch3_batt': 'wh55_ch3_batt', 'wh55_ch3_sig': 'wh55_ch3_sig', 'wh55_ch4_batt': 'wh55_ch4_batt', 'wh55_ch4_sig': 'wh55_ch4_sig', 'wh57_batt': 'wh57_batt', 'wh57_sig': 'wh57_sig', 'wh65_batt': 'wh65_batt', 'wh65_sig': 'wh65_sig', 'wh68_batt': 'wh68_batt', 'wh68_sig': 'wh68_sig', 'windchill': 'windchill', 'windDir': 'winddir', 'windGust': 'gustspeed', 'windSpeed': 'windspeed', 'ws80_batt': 'ws80_batt', 'ws80_sig': 'ws80_sig', 'yearRain': 'rainyear'}
Nov  8 20:15:28 raspberrypi weewx[6055] INFO user.gw1000: driver version is 0.4.1
Nov  8 20:15:28 raspberrypi weewx[6055] INFO user.gw1000: GW1000 address is 192.168.20.222:45000
Nov  8 20:15:28 raspberrypi weewx[6055] INFO user.gw1000: poll interval is 15 seconds
Nov  8 20:15:28 raspberrypi weewx[6055] INFO weewx.engine: StdConvert target unit is 0x1
Nov  8 20:15:28 raspberrypi weewx[6055] INFO weewx.engine: Archive will use data binding wx_binding
Nov  8 20:15:28 raspberrypi weewx[6055] INFO weewx.engine: Record generation will be attempted in 'software'

Tom Keffer

unread,
Nov 8, 2021, 8:56:10 PM11/8/21
to weewx-user
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.





gjr80

unread,
Nov 8, 2021, 9:03:20 PM11/8/21
to weewx-user
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

vince

unread,
Nov 8, 2021, 9:07:57 PM11/8/21
to weewx-user
There is a LOT enabled on that box if you look at the logs.    Long sftp session, Windy, PWS, Wunderground, CWOP,  Seasons, Rain Machine extension, owmap, and the like.   You just can't run all that stuff and a too-quick archive interval on something as weak as a model-B.

bchap...@gmail.com

unread,
Nov 8, 2021, 10:10:34 PM11/8/21
to weewx-user
Ok...I changed the archive interval to 120...looks good so far.  Might be time for a hardware upgrade.

Thanks for the help!
Reply all
Reply to author
Forward
0 new messages