Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchdog ocassionally stops reacting to changes on filesystems #3

Open
pulpul-s opened this issue Dec 6, 2023 · 4 comments
Open

Watchdog ocassionally stops reacting to changes on filesystems #3

pulpul-s opened this issue Dec 6, 2023 · 4 comments

Comments

@pulpul-s
Copy link
Owner

pulpul-s commented Dec 6, 2023

After running the script for longer times e.g. three days, watchdog does not react to filesystem changes anymore. This seems like an issue with the watchdog library itself rather than a problem with watchertoucher.

At the moment the only reasonable fix is to run the script as a systemd service and have it restart every 24 hours. This does not cause any downtime.

Any help on the issue is appreciated, since I have been unable to fix it completely.

@adobito
Copy link

adobito commented Mar 6, 2024

@pulpul-s Has this solution been adequate for you for the past few months? I'm running my Jellyfin scans every 15 mins but this seems like a better solution, though I do not want to tinker around much. If setting this as a service with auto restart has been flawless for the past few months I think I'd bite the bullet.

@pulpul-s
Copy link
Owner Author

pulpul-s commented Mar 7, 2024

@pulpul-s Has this solution been adequate for you for the past few months? I'm running my Jellyfin scans every 15 mins but this seems like a better solution, though I do not want to tinker around much. If setting this as a service with auto restart has been flawless for the past few months I think I'd bite the bullet.

Yes.

I have been running it as once a day restarting service for quite some time now and have not observed any times that the library would not update like it is supposed to.

@adobito
Copy link

adobito commented Mar 8, 2024

The python script takes quite a while for it to fully boot up for me and I'm not sure why. It also never seems to start with systemd. This is my config:

Description=Watchertoucher Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/python3 /etc/watchertoucher/watchertoucher.py
Restart=always
RestartSec=24h

[Install]
WantedBy=default.target

I'm running this on an ubuntu 22.04 install that just has docker, and a jellyfin container.

@pulpul-s
Copy link
Owner Author

pulpul-s commented Mar 8, 2024

The python script takes quite a while for it to fully boot up for me and I'm not sure why. It also never seems to start with systemd. This is my config:

Description=Watchertoucher Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/python3 /etc/watchertoucher/watchertoucher.py
Restart=always
RestartSec=24h

[Install]
WantedBy=default.target

I'm running this on an ubuntu 22.04 install that just has docker, and a jellyfin container.

Try to make sure you don't have any problems with the configuration options in the start of the script. Also try to run it normally without it being a service first to check that it works like it is supposed to. You can just try to create files to the watched filesystem with: touch test.mkv and see if the scripts sees it.

This is the systemd service I'm using currently:

[Unit]
Description=watchertoucher for jellyfin service
After=systemd-networkd-wait-online.service mediaserver-libraries-null\x2dnull.mount

[Service]
Restart=always
RestartSec=1
RuntimeMaxSec=1d
User=root
ExecStart=nice -n 17 /usr/sbin/watchertoucher.py

[Install]
WantedBy=multi-user.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants