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

Nothing happen after starting the script and adding new files #59

Open
iostrym opened this issue Jan 2, 2024 · 8 comments
Open

Nothing happen after starting the script and adding new files #59

iostrym opened this issue Jan 2, 2024 · 8 comments
Assignees

Comments

@iostrym
Copy link

iostrym commented Jan 2, 2024

Hello,

Using DSM6:

I launch manually the following script in ssh:

sudo python3.8 -m synoindexwatcher /volume1/photo/photo_toto/synchro_portable/sd_card_camera
Password:
2024-01-02 21:35:39,080 INFO Adding watch for path: /volume1/photo/photo_toto/synchro_portable/sd_card_camera
2024-01-02 21:35:39,324 INFO Waiting for media file changes...

and then if I add new files in the sd_card_camera folder, nothing happen.

I tried with several file creation including :

XXX@YYY:/volume1/photo/photo_toto/synchro_portable/sd_card_camera$ touch test2.txt

please note that it worked month/weeks ago maybe a package on my side broke the script ? I used task manager to start the script on startup.

@iostrym
Copy link
Author

iostrym commented Jan 3, 2024

no idea ? or maybe is there a way to help understanding where could be the problem ?

@iostrym
Copy link
Author

iostrym commented Jan 27, 2024

hello, I tryied the debug option and now I have this when I launch the command line:

[...]
2024-01-27 21:12:02,446 DEBUG Added watch 33
2024-01-27 21:12:02,446 DEBUG Added info for watch 33: {'children': {}, 'filter': <function build_filter..filter at 0x7f9813076ee0>, 'ma sk': 970, 'name': "2024-01-01 jour de l'an", 'parent': 2}
2024-01-27 21:12:02,447 DEBUG Name has been filtered, not adding watch: @eadir
2024-01-27 21:12:02,462 DEBUG Name has been filtered, not adding watch: @eadir
2024-01-27 21:12:02,462 INFO Waiting for media file changes...

Then I open my folder on windows and just reading the folder make it appears (Thumbs.db file are updated when reading on windows) and it is great because it means the python script is working:

2024-01-27 21:13:09,311 DEBUG Calling 'synoindex -a /volume1/photo/photo_toto/synchro_portable/sd_card_camera/Thumbs.db'
2024-01-27 21:13:09,718 DEBUG Calling 'synoindex -a /volume1/photo/photo_toto/synchro_portable/sd_card_camera/Thumbs.db'

also after adding some files, I have:

2024-01-27 21:26:16,932 DEBUG Calling 'synoindex -a /volume1/photo/photo_toto/synchro_portable/IMG_20220108_151401 - Copie - Copie - Copie.jpg'
2024-01-27 21:26:16,955 DEBUG Calling 'synoindex -a /volume1/photo/photo_toto/synchro_portable/IMG_20220108_151401 - Copie (2) - Copie - Copie.jpg'
2024-01-27 21:26:16,978 DEBUG Calling 'synoindex -a /volume1/photo/photo_toto/synchro_portable/IMG_20220108_151401 - Copie (3) - Copie.jpg'
2024-01-27 21:26:17,003 DEBUG Calling 'synoindex -a /volume1/photo/photo_toto/synchro_portable/IMG_20220108_151401 - Copie - Copie (2).jpg'

I can also see in DSM 6.X in the GUI that there is some quick indexing currently done (on these files) but I can't see them on photostation or moment.

there is a problem elsewhere or maybe the synoindex command no more works on DSM 6.X ?

@letorbi
Copy link
Owner

letorbi commented Jan 28, 2024

Hi @iostrym, sorry for the late reply. I will investigate into the issue next week. Thanks for your efforts to add more details.

Just to be sure: You are not using Synology Photo, so your problems are not related to issue #51, right?

@letorbi letorbi self-assigned this Jan 28, 2024
@iostrym
Copy link
Author

iostrym commented Jan 28, 2024

I don't think this is related and also I use DSM 6.X

it is strange because I have the feeling it is working when I type directly this in ssh (mobaxterm for instance) :

sudo python3.8 -m synoindexwatcher /volume1/photo/photo_armand/synchro_portable/

but if I type this command with "&" at the end using the task manager:

sudo python3.8 -m synoindexwatcher /volume1/photo/photo_armand/synchro_portable/ &

it seems it doesn't work.

I can also check if process exist using the command:

ps -aux | grep synoindexwatcher

using mobaxterm I can see the process
using task manager I can't see the process

maybe there is a problem with taskmanager or with the & at the end of the command ?

@iostrym
Copy link
Author

iostrym commented Jan 29, 2024

in fact my complete command has several path like this :

sudo python3.8 -m synoindexwatcher path1 path2 path3 path4, etc.

and I got the following error message:

2024-01-29 07:48:55,756 ERROR No inode watchers left (see https://github.com/letorbi/synoindexwatcher#faq)

does the command complete anyway ? if can't set several path, then can I launch the script several path, one for each path ?

@iostrym
Copy link
Author

iostrym commented Jan 29, 2024

using sysctl -w fs.inotify.max_user_watches=204800 resolve the problem. but the other problem I have is that the process is killed when I quit the terminal. even if I add "&" at the end of my command.

@iostrym
Copy link
Author

iostrym commented Jan 29, 2024

problem seems to be resolved now because if I launch the process from DSM task manager then the process is kept alive... I will keep informed but currently it is working.

@gitraphha
Copy link

using sysctl -w fs.inotify.max_user_watches=204800 resolve the problem. but the other problem I have is that the process is killed when I quit the terminal. even if I add "&" at the end of my command.

the & will only put your process in the background. It will die if you leave the shell (quit the terminal).
Try "disown" after putting your process in the background. This will detach it from the current shell/terminal, so it shouldn't be killed.

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

3 participants