Comments (6)
Would love to see this feature. Right now we're using pm2, which does display memory usage.
from forever.
As a current forever
user, I'm looking at switching to using systemd
as a process supervisor to address this in the need in the future.
First, if you are already on a system that has systemd
running, it's one less dependency. systemd
will be default on a Ubuntu LTS release in a just a few months.
Second, systemd
can supervise processes for users, not just for root, if you have that need.
Third, to address the memory use question here, systemd
supports "cgroups" which allow to specify memory limits for your app (as well as CPU limits and blkio limits).
systemd
has other benefits as well that apply to Node such as "socket activated processes". Your Node.js app can be off until a request comes in on port 80, at which point it's spun up. With a couple more lines of Node.js code, you could even have your server shutdown if there are no requests in X minutes. (until the next request comes in). That would be another way to reclaim memory when the server is idle. This is an appealing feature for cases like a developer server that might have lots of Node processes running that are infrequently used or for a rarely-used backend service with a memory leak.
Finally, if you are managing Linux servers based on systemd
, you are going to have to learn it support it anyway. If the OS already has a good at process manager, why add another layer to do it?
Some resources:
- Deploying Node.js with systemd
- Managing resources with systemd introduces the cgroups memory management feature of systemd.
from forever.
+1 that would be rad. tho paired with a notification system would go perfect with this so that you'd know that you actually have a memory problem (otherwise i'd probably never bother to debug if it was always magic all the time)
from forever.
This has been possible via custom forever hooks since [email protected]
. A pull-request exposing CLI options would be welcome
from forever.
Just wanted to chime in and say this would be nice.
from forever.
👍
from forever.
Related Issues (20)
- Windows 10: current version of forever ? HOT 1
- forever/bin/monitor still keep the output log File descriptor in memory although i deleted them HOT 1
- Vulnerable dependencies on [email protected] HOT 3
- Run forever script on Windows, show processing but not forever processes running
- [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1505) HOT 3
- security fix: pin or replace `colors` dependency HOT 14
- Running the "forever list" on ubuntu showing the following output HOT 3
- stopall gets stuck sometimes
- --plain flag is ignored/does not work in forever 4.0.3 HOT 2
- latest version has vulnarable dependencies HOT 1
- Uptime format
- Issue starting multiple servers in one command
- any guide for next js 13?
- how to find the exit reason of process HOT 1
- AIX 7.3 TL 1 forever errors
- how to save old history log instead of delete.. HOT 1
- forever --version Can run, but there are errors(v4.0.3) HOT 1
- redhat 9 enterprise clean install, getting Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
- uptime format
- Log Bigsize
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forever.