it is a new install with no extensions and unchanged skin.
i banged my head against this problem all day yesterday, and today it works 
fine and i can’t reproduce it :-/

an example syslog extract from yesterday using ‘/etc/init.d/weewx stop'. note 
that weewx does not report receiving SIGTERM:
Jul  7 22:48:05 dizzy systemd[1]: Stopping LSB: weewx weather system...
Jul  7 22:48:05 dizzy weewx[3561]: Stopping weewx weather system: 
weewxstart-stop-daemon: matching only on non-root pidfile 
/opt/weewx/var/run/weewx.pid is insecure
Jul  7 22:48:57 dizzy systemd[1]: Started Session c5 of user graham.
Jul  7 22:50:06 dizzy weewx[3561]: ........................ failed!
Jul  7 22:50:06 dizzy systemd[1]: weewx.service: Control process exited, 
code=exited, status=1/FAILURE
Jul  7 22:50:06 dizzy systemd[1]: weewx.service: Failed with result 'exit-code'.
Jul  7 22:50:06 dizzy systemd[1]: Stopped LSB: weewx weather system.
Jul  7 22:50:15 dizzy weewx[605] INFO weewx.manager: Added record 2020-07-07 
22:50:00 AEST (1594126200) to database 'weewx.sdb'
Jul  7 22:50:15 dizzy weewx[605] INFO weewx.manager: Added record 2020-07-07 
22:50:00 AEST (1594126200) to daily summary in 'weewx.sdb'
Jul  7 22:50:16 dizzy weewx[605] INFO weewx.cheetahgenerator: Generated 8 files 
for report SeasonsReport in 0.87 seconds

maybe all my fiddling put it (or me!) into a strange state...
now that i know ‘systemctl stop weewx’, i will give that a try next time

i mount weewx/public_html as tmpfs, so weewx re-generates images etc after a 
reboot.
maybe some of my tests, where i stopped weewx very soon after reboot, were done 
while that re-generation was occurring so the reporting threads were busy. but 
the example above was when system was idle

Q: does weewx log the received SIGTERM when it arrives (as i assume) or when it 
is ready to deal with it?

will report in when i can reproduce the problem again...
thanks
g-eddy

> On 8 Jul 2020, at 9:37 pm, mwall <[email protected]> wrote:
> 
> when you do '/etc/init.d/weewx stop' or 'systemctl stop weewx', does weewx 
> eventually stop?
> 
> when you do either of these commands, this sends a SIGTERM to weewx, which 
> tells the main thread to stop.  however, weewx will not actually stop until 
> all of its threads have completed.  so if you have a report that takes a long 
> time to run then weewx may not shut down until well after you send the 
> SIGTERM.
> 
> this is often noticeable on rpi with a weewx configuration that has many 
> compute-intensive reports
> 
> if you have an extension with misbehaving threads or forked processes, then 
> you might also end up with zombie threads/processes that prevent weewx from 
> shutting down properly.
> 
> m
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/5942bce7-b168-433e-ae2e-71fe10f78f31o%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/5942bce7-b168-433e-ae2e-71fe10f78f31o%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/753E06CF-497D-4860-AA5D-0B0EC1E031CF%40gmail.com.

Reply via email to