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

Which is the alternative to id/uid (which are marked as DEPRECATED)? #949

Open
ibc opened this issue Sep 6, 2017 · 7 comments
Open

Which is the alternative to id/uid (which are marked as DEPRECATED)? #949

ibc opened this issue Sep 6, 2017 · 7 comments

Comments

@ibc
Copy link

ibc commented Sep 6, 2017

According to the doc, both --id and --uid are DEPRECATED. So, in case I want to assign "ids" to my daemons to easily manage them via CLI, which is the proper alternative? AFAIS the documentation does not provide any other way.

@NullDev
Copy link

NullDev commented Sep 8, 2017

I don't think there is an actual alternative for now.
It might be --pidFile but I'm not entirely sure.
For now I just keep using --uid

You're also not the only one wondering about this:

16c5933#diff-04c6e90faac2675aa89e2176d2eec7d8

#917

@aviramartac
Copy link

Ditto on this...?

@koshyviv
Copy link

I'm observing weird terminations when using forever with -uid, and there's not any log too. Is there an alternative yet?

@anistark
Copy link

Just found it's deprecated. Any alternative yet?

@NullDev
Copy link

NullDev commented Jul 18, 2020

I'm probably gonna get hate for this because I recommend another tool in this repo but:

Just use pm2 (repo)

It supports ID's, names and tons of other things such as load-balancing and monitoring. Also, it has an amazing (and documented) API for controlling scripts via NodeJS (e.g. use PM2 as a dependency rather than a CLI tool). Had absolutely no issues since I've switched.

@anistark
Copy link

@nldev I don't remember exactly but I had a few serious issues with pm2 around 4 years ago leading me to switch to forever. The servers just kept quitting and forever handled it all pretty well. Maybe the bugs have ironed out by now, but I can't have so much time stuck on monitoring again.

@ken-do
Copy link

ken-do commented Feb 5, 2021

I'm getting the same issue as @anistark , which took me a while to figure out (thought it was something with the Jenkins server...), it was fixed after I switched to forever.
My current approach is to launch each instance of my application on a dedicate PORT, like this:
PORT=${portNumber} npx forever start my_app.js

Then save the pid of the process running on that port somewhere using this command
lsof -t -i:${portNumber} ( save this as processId)

And kill it later with
npx forever stop ${processId}

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

6 participants