0

I've been using LearnBoost's Up for Node.js as a way for me to have zero-downtime when I'm changing or uploading new code for my projects. Because my projects are using web sockets (via Socket.io) I don't want my app to cold reload as those real-time connections will be lost.

I'm using LearnBoost's Up as it says to offer "zero-downtime reloads", but it never seems to reload my apps correctly once I've changed code and I always need to exit my Node app and restart it again manually to get it to run the new code.

I have the latest version of Up running (which is 0.2.1 as of writing) on both my local Mac machine and my Linux server.

I use this on my local dev to run my Node app:

NODE_ENV=development up --watch --port 9001 init.js

But say I do something simple (but drastic) like change the static media folder for the app or alter some of the routing (for example) in the Terminal it looks like it's restarted my app, but the actual change doesn't happen. The only way is for me to exit and restart the Node app manually. It's the same on my remote server too and obviously this isn't right.

Am I using this correctly?

littlejim84
  • 9,071
  • 15
  • 54
  • 77
  • @cuzzea Yes, that code is run in the working directory. The app runs fine, it restarts fine, it seems to watch the directory for code changes fine, but it just doesn't seem to do the code changes, so to speak. It's strange! – littlejim84 Jun 29 '12 at 21:21

1 Answers1

0

From the docs:

The discarded workers could have been processing requests, so they only truly die after the configured workerTimeout, which defaults to 10 minutes in production

Have you configured workerTimeout?

Gates VP
  • 44,957
  • 11
  • 105
  • 108
  • Hello. Yes, I've tried to adjust this, as from the docs also: "Defaults to '10m', or '500ms' if NODE_ENV is development." so it should be pretty quick anyhow. But yes, still doesn't do much it seems. – littlejim84 Jun 30 '12 at 09:24
  • How are you managing your sessions? If you have a memory store your session to the server will be lost on every code change. – sharky101 Oct 05 '12 at 09:27