Git Product home page Git Product logo

Comments (9)

luckman212 avatar luckman212 commented on May 26, 2024

Looking for some info on this myself. I am having a problem on macOS where I wind up with 2 daemons running (LaunchServices keeps trying to start a 2nd instance, causing excessive CPU usage and flooding the syncthing log...)

I am trying to come up with the right combo of settings for launchd so that 1 (and only 1) instance of syncthing will run, and it will gracefully recover from a crash, and also properly respond to the "restart" and "shutdown" commands from the Web GUI.

from docs.

canton7 avatar canton7 commented on May 26, 2024

@lukehamburg https://github.com/syncthing/syncthing/tree/master/etc/macosx-launchd ?

from docs.

luckman212 avatar luckman212 commented on May 26, 2024

I know about that, but TBH for some reason those settings do not work very well. As I wrote, I frequently wind up with 2 instances of syncthing running for some reason.

from docs.

calmh avatar calmh commented on May 26, 2024

There can only be one, per config directory. Locking ensures this.

When STNORESTART is not set, you will see two syncthing processes. One manages the other. This is normal. It is still just one syncthing instance.

When STNORESTART is set, there is only one syncthing process, managed by something like launchd. (Those launchd settings work perfectly for me by the way :)

from docs.

luckman212 avatar luckman212 commented on May 26, 2024

Thanks for the reply. Yes I understand that, however the behavior I am seeing is that under some unpredictable situations, LaunchD thinks that Syncthing is not running anymore even though it is and endlessly attempts to spawn a new instance, which floods the log and causes high CPU and battery drain. The only way out that I have found is to sudo kill <pid_of_syncthing>

from docs.

calmh avatar calmh commented on May 26, 2024

That's odd indeed.

from docs.

luckman212 avatar luckman212 commented on May 26, 2024

Agreed. Normally I would chalk it up to being a one-off type of issue but it has happened to me multiple times now on 2 different Macs (both running 10.12.1 and the latest syncthing). I am not sure what could cause it, are there any extra debug options I can enable to get more info on internals?

from docs.

calmh avatar calmh commented on May 26, 2024

Lots of them, but none that relate to launching more than one instance - that sounds like you want to debug launchd instead. See https://docs.syncthing.net/dev/debugging.html and syncthing -help, and this is now a support discussion way unrelated to this issue, so lets take it to the forum for any continuation.

from docs.

imsodin avatar imsodin commented on May 26, 2024

Fixed by #278

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.