Multiple issues on Windows

Open
#5,914 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, node.js

Research direction

Start by reproducing the shutdown, cron_restart, and daemon-detachment behaviors on Windows 11 or Windows Server with PM2 5.4.2, comparing them with the shutdown_with_message workaround. Trace the process-management entry points involved and verify that old processes close, the daemon retains control, and pm2 stop works before and after extended runtime.

Written by the indexing model from the issue text.

Description

You should do more testing in windows, there are quite a few bugs, which seems weird for a library this popular.

These are some of the issues that are occurring to me:

  1. Shutting down an app in windows doesn't work at all, your process killing system is buggy in windows. After spending some time, I found out that the only thing that works is the shutdown_with_message option. Wouldn't it be better to actually fix the process management in Windows, instead of providing a workaround that needs additional work?
  2. Even with the shutdown_with_message option, the cron_restart option still doesn't work, it will not close old processes and leave them detached, just popping up more instances of the app.
  3. And another issue, after a few days running, for some reason, the PM2 daemon gets detached from the app somehow, the app is still running but the PM2 doesn't have any control over it, sometimes it just shows "stopped" while the app is still running and even outputting logs, and calling "pm2 stop" won't do anything.
This behavior is seen in:

Windows 11, Windows Server. Latest PM2 version (5.4.2).

I like this library and all the efforts put into it, but it has been a bit annoying to deal with these issues, but I guess it's because it's mainly tested on Linux systems, and that's where most people use it.

But how are you even offering a premium plan when this doesn't even work properly on different operating systems?

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Unitech/pm2

All issues in Unitech/pm2

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.