lein-daemon icon indicating copy to clipboard operation
lein-daemon copied to clipboard

Placing pidfile outside of project root causes startup to hang

Open MaxMartin opened this issue 11 years ago • 2 comments

If you configure your pidfile to be located anywhere outside of the project directory (for instance, /tmp/app.pid), the startup script will hang indefinitely waiting for the pidfile to appear, even though the pidfile has been created correctly.

MaxMartin avatar May 15 '13 22:05 MaxMartin

This is happening to me too ([lein-daemon "0.5.4"]). It occurs even when the pid file is in the project root directory. When I run lein daemon run myapp, I get the following error.

java.lang.Exception: myapp failed to start in 300 seconds
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
    sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:57)
    ...
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)

I've also tried putting it in the background, with lein daemon start myapp &. I think this error has to do with slow JVM startup times. It's also mentioned in this irc log. Any insights here appreciated.

twashing avatar Oct 03 '14 14:10 twashing

Sorry for the neglect of the project. I'd recommend using https://github.com/circleci/lein-jarbin rather than lein-daemon.

arohner avatar Oct 03 '14 15:10 arohner