FreeBSD directory watching causing issues

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
Hey guys,

I have not been able to figure out a reason for my issue via googling around. I believe via info I got from a friend that FreeNAS (and thus freeBSD) can't watch a folder for changes, or at least specifically in a jailed environment at least. I was told that things like Plex for example wouldn't be able to monitor a directory and upon changes re-scan the library. Now the reason I am asking is because it seems as though a new update to Syncthing gave it the ability to watch a directory, and this wasn't just on freebsd, I just got the same change on my windows installs as well.

This new feature seems to totally grenade my freenas box, causes SSH hangs, makes the webUI go slow, all sorts of issue. Is this possibly due to FreeBSD itself, how jails work (I am using warden as I created them in the old school GUI on 11.1U4), or a syncthing issue?

I am not sure where to go from here except post here and hope someone has an answer or can lead me to my next step.

Thanks!
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What mechanism are they using?
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Well, the proper way of implementing this is with kqueue, but there are a number of alternatives with various degrees of brokenness that I can really see some misguided Linux developer trying t cram into the FreeBSD version.
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
Well, the proper way of implementing this is with kqueue, but there are a number of alternatives with various degrees of brokenness that I can really see some misguided Linux developer trying t cram into the FreeBSD version.

I suppose I can post on syncthing forum and try and get answers, they are typically pretty useful.

Would it make sense for that "degree of brokenness" manifest via SSH hanging, and I am talking upwards of 10 seconds just to get a user input line on initial connection.... It was SLOW. ls -la on a large directory took laughably long, it seemed like an IO issue to me, since CPU wasn't seemingly being hit hard, it seemed like trying to do things just took forever. As soon as I killed the plugin via
Code:
service sycthing stop
in the jail ssh resumed to perfect working order. That is thus far the only real evidence I have that syncthing caused the issue, but that seems pretty solid to me.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
Yes, it's possible.


Well, they have told me it is using kqueue. I will attempt to enable debugging and see what it results in. They don’t seem to have any idea why this would happen.


Sent from my iPhone using Tapatalk
 

Brad1976

Dabbler
Joined
Mar 31, 2015
Messages
40
These same symptoms happened to me on Friday last week. It took me until late Saturday evening to figure out... Had to hard boot my server many, many, MANY times before I was able to deduct that Syncthing was slowing my entire server to a standstill; either through Putty, WebGui and even every Plugin's web access installed (Couch, Sickrage, Transmission and Plex). I started with disabling unrequired services and then plugins. Eventually I got to disabling Syncthing then presto my server was functional! As long as Syncthing is running, I only have about 60-90 seconds of normal usage of anything and then the entire system hangs... Oh, I did manage to disable the watch checkbox from within Advanced Settings on the FreeNAS plugin as well as all other nodes (all Windoze machines), but still to no avail...

Why I comment? 1) letting you know I'm watching the thread with anticipation of a solution and 2) You're not alone. Sadly, I don't have the time nor the experience to dive into the level of troubleshooting to be of assistance. Especially when I won't be able to directly access my server until Wednesday night... :-( Best of luck!
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
Yea, 11.1 is only causing issues for me. I just posted in the other thread that you commented on, and somehow I have got syncthing on, and file watcher on, and all is fine. I only have the watcher running in syncthing and not plex as I did when everything took a shit. It’s possible plex’s implementation is bad, or having multiple watchers at once causes some strange IO conflict as it felt like IO issues to me.

I really don’t know, but I am having so many issues with 11.1 I am honestly surprised more people haven’t had them/a mass exodus of 11.1 hasn’t happened. Still trying to work through the issues, but I having some horrible luck.


Sent from my iPhone using Tapatalk
 

Brad1976

Dabbler
Joined
Mar 31, 2015
Messages
40
Yea, 11.1 is only causing issues for me. I just posted in the other thread that you commented on, and somehow I have got syncthing on, and file watcher on, and all is fine. I only have the watcher running in syncthing and not plex as I did when everything took a crap. It’s possible plex’s implementation is bad, or having multiple watchers at once causes some strange IO conflict as it felt like IO issues to me.

I really don’t know, but I am having so many issues with 11.1 I am honestly surprised more people haven’t had them/a mass exodus of 11.1 hasn’t happened. Still trying to work through the issues, but I having some horrible luck.


Sent from my iPhone using Tapatalk

Knock on wood this has been my only issue with 11.1, but I also upgraded from 9.10 straight to 11.1-U4... I made sure that the watcher was disabled on all my syncthing devices, inc the server itself, and all appears to be normal again... Now to start learning the ins and outside of iocage!!! *sigh* lol
 

paulhaig

Dabbler
Joined
Dec 19, 2018
Messages
14
I believe I am experiencing this same issue with Syncthing on FreeNAS-11.2-RELEASE. I used the FreeNAS web interface to install Syncthing plugin (I am not linux savvy and did not manually install)

My FreeNAS syncthing has 1 folder (receive only) with another Windows PC (send only) on the same local network.
Things worked fairly well initially but then as I added more data to the Windows PC my FreeNAS would become unusable.
- Web to FreeNAS unresponsive
- Web to Syncthing Jail unresponsive
- SSH attempts unresponsive
- FreeNAS keyboard/monitor would show me the initial menu you see on bootup, but when I enter "9" for Shell - unresponsive.

I am forced to physically reset the FreeNAS.
Upon reboot the FreeNAS web, SSH, and Syncthing Web are accessible but quickly become unusable within a few minutes or less.

I have tried to disable "Watch for Changes" within FreeNAS Syncthing plugin.

Appears this thread captures workaround of disable "Watch for Changes"
https://forums.freenas.org/index.ph...nal-when-running-syncthing.64044/#post-459750
 
Top