Thanks Thomas,

I found a parameter I can set in the service file which I am currently 
testing. Should know in a day or 2 if it has worked

[Service]
Restart=always
RestartSec=30




On Monday, March 16, 2020 at 12:33:15 PM UTC, Thomas Keffer wrote:
>
> I would suggest looking directly at the log at /var/log/syslog, rather 
> than rely on status commands. This may give you clues. For example, systemd 
> may be harvesting weewxd for memory. 
>
> 'Enabling' a process means it will get started *when the system boots,* not 
> after a crash.
>
> -tk
>
> On Mon, Mar 16, 2020 at 1:02 AM Mike Revitt <[email protected] 
> <javascript:>> wrote:
>
>> I am running weewx as a service on my Raspberry Pi and have been having 
>> problems with durability.
>>
>> Having been running weewx for several years on my Mac I know that from 
>> time to time the service will stop,  but on my Mac they are always 
>> restarted by the daemon service.
>>
>> But on the Raspberry Pi, whenever it stops it just stays stopped.
>>
>> I originally followed the directions in the Debian section of WeeWX: 
>> Installation using setup.py but when this stopped it gave no useful 
>> information. I then found a method for using systems.service at 
>> https://github.com/weewx/weewx/wiki/systemd and gave that a goe.
>>
>> This has also failed to keep the service running but has a little more 
>> info to go on.
>>
>> pi@raspberrypi:/var/www/html/MountWeather $ sudo systemctl status weewx
>> ● weewx.service - weewx weather system
>>    Loaded: loaded (/etc/systemd/system/weewx.service; enabled; vendor 
>> preset: enabled)
>>    Active: inactive (dead) since Sat 2020-03-14 02:51:14 GMT; 2 days ago
>>  Main PID: 25401
>>
>> Mar 14 02:50:14 raspberrypi weewxd[25401]: weewx[25401] INFO 
>> weewx.manager: Added record 2020-03-14 02:50:00 GMT (1584154200) to dai
>> Mar 14 02:50:16 raspberrypi weewxd[25401]: weewx[25401] INFO 
>> weewx.cheetahgenerator: Generated 7 files for report SeasonsReport in 1
>> Mar 14 02:50:17 raspberrypi weewxd[25401]: weewx[25401] INFO 
>> weewx.imagegenerator: Generated 9 images for report SeasonsReport in 0.
>> Mar 14 02:50:17 raspberrypi weewxd[25401]: weewx[25401] INFO 
>> weewx.reportengine: Copied 0 files to /var/www/html/MountWeather
>> Mar 14 02:50:17 raspberrypi weewxd[25401]: weewx[25401] INFO 
>> botocore.credentials: Found credentials in shared credentials file: ~/.
>> Mar 14 02:50:20 raspberrypi weewxd[25401]: weewx[25401] INFO 
>> user.s3upload: S3UploadGenerator: AWS-S3 copied 16 files to S3 in 3.32 
>> Mar 14 02:50:21 raspberrypi weewxd[25401]: weewx[25401] INFO 
>> botocore.credentials: Found credentials in shared credentials file: ~/.
>> Mar 14 02:51:14 raspberrypi systemd[1]: weewx.service: Killing process 
>> 25401 (weewxd) with signal SIGKILL.
>> Mar 14 02:51:14 raspberrypi systemd[1]: weewx.service: Killing process 
>> 25401 (weewxd) with signal SIGKILL.
>> Mar 14 02:51:14 raspberrypi systemd[1]: weewx.service: Succeeded.
>>
>>
>> The process has died during the boto copy to S3, and I am wondering if 
>> this is a network timeout or something, and this does appear to be where it 
>> normally stops.
>>
>> However I am also using the command sudo systemctl enable weewx which is 
>> supposed to restart dead processes, but as you can see it isn't.
>>
>> If I restart it it works perfectly for the next several hours then does 
>> this again.
>>
>> Anyone got any experience of setting this up on a Raspberry Pi
>>
>> pi@raspberrypi:/var/www/html/MountWeather $ sudo systemctl start weewx
>> pi@raspberrypi:/var/www/html/MountWeather $ sudo systemctl status weewx
>> ● weewx.service - weewx weather system
>>    Loaded: loaded (/etc/systemd/system/weewx.service; enabled; vendor 
>> preset: enabled)
>>    Active: active (running) since Mon 2020-03-16 08:01:30 GMT; 1s ago
>>  Main PID: 18479 (weewxd)
>>     Tasks: 1 (limit: 2200)
>>    Memory: 7.5M
>>    CGroup: /system.slice/weewx.service
>>            └─18479 /usr/bin/python /home/weewx/bin/weewxd --daemon 
>> --pidfile=/run/weewx.pid /home/weewx/weewx.conf
>>
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO weewx.restx: 
>> Wunderground: Posting not enabled.
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO weewx.restx: 
>> PWSweather: Posting not enabled.
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO weewx.restx: 
>> CWOP: Posting not enabled.
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO weewx.restx: 
>> WOW: Posting not enabled.
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO weewx.restx: 
>> AWEKAS: Posting not enabled.
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO __main__: 
>> Starting up weewx version 4.0.0b14
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO 
>> weewx.engine: Clock error is -0.12 seconds (positive is fast)
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO 
>> weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO 
>> weewx.manager: Starting backfill of daily summaries
>> Mar 16 08:01:31 raspberrypi weewxd[18479]: weewx[18479] INFO 
>> weewx.engine: Starting main packet loop.
>>
>>
>>
>> -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/c6468f7d-83fd-4acf-b8a9-828af09239e9%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/c6468f7d-83fd-4acf-b8a9-828af09239e9%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/d25471c2-d201-4f66-a5e1-16245d05f124%40googlegroups.com.

Reply via email to