using with pm2 #26

Закрыто
открыт 2020-01-13 08:46:51 +00:00 пользователем Ghost · комментариев: 2
Ghost прокомментировал(а) 2020-01-13 08:46:51 +00:00

sorry for asking here
is it possible to use on windows with pm2 cluster mode ?

sorry for asking here is it possible to use on windows with pm2 cluster mode ?
coolaj86 прокомментировал(а) 2020-01-13 18:36:42 +00:00
Владелец

This is actually the perfect place to ask that.

Short answer

I don't know.

If you turn off clustering in pm2 and turn on clustering in Greenlock Express, that may work.

It will not work with pm2s limited built-in cluster support. You could probably hack it together somehow, but you're probably better off using more standard tools.

Alternatives

You could use something like:

  • nssm or serviceman on Windows
  • systemd on Linux
  • launchctl on macOS

Long Answer

Greenlock Express cannot work in cluster mode with only partial support. It needs to have access to the master process and needs to have direct communication with each worker process.

pm2s built-in clustering spawns worker processes, but since it doesn't know about Greenlock, and Greenlock doesn't know about it, there's no way for the servers to communicate.

I'd be happy to create a custom "Greenlock PM2" module as contract work, but it's not something that I personally use.

This is actually the perfect place to ask that. # Short answer I don't know. If you turn off clustering in pm2 and turn on clustering in Greenlock Express, that may work. It will not work with `pm2`s limited built-in cluster support. You could probably hack it together somehow, but you're probably better off using more standard tools. # Alternatives You could use something like: * `nssm` or [`serviceman`](https://git.rootprojects.org/root/serviceman) on Windows * `systemd` on Linux * `launchctl` on macOS # Long Answer Greenlock Express cannot work in `cluster` mode with only partial support. It needs to have access to the `master` process and needs to have direct communication with each `worker` process. `pm2`s built-in clustering spawns worker processes, but since it doesn't know about Greenlock, and Greenlock doesn't know about it, there's no way for the servers to communicate. I'd be happy to create a custom "Greenlock PM2" module as contract work, but it's not something that I personally use.
coolaj86 прокомментировал(а) 2020-01-13 18:57:47 +00:00
Владелец

PM2 Docs

Based on what I see here ( https://pm2.keymetrics.io/docs/usage/process-management/#process-configuration ) it seems like you should be able to have it treat Greenlock the same as it would treat an external python or ruby process and run an external version of node rather than doing internal forking.

# PM2 Docs Based on what I see here ( https://pm2.keymetrics.io/docs/usage/process-management/#process-configuration ) it seems like you should be able to have it treat Greenlock the same as it would treat an external `python` or `ruby` process and run an external version of `node` rather than doing internal forking.
coolaj86 закрыл(а) эту задачу 2020-01-16 19:31:01 +00:00
Войдите, чтобы присоединиться к обсуждению.
Нет меток
Нет этапа
Нет назначенных лиц
2 участников
Уведомления
Срок выполнения
Срок действия недействителен или находится за пределами допустимого диапазона. Пожалуйста, используйте формат 'гггг-мм-дд'.

Срок выполнения не установлен.

Зависимости

Зависимостей нет.

Ссылка: root/greenlock-express.js#26
Описание отсутствует.