Skip to main content

IN-002 — PM2 Process Management

FieldValue
PriorityInfrastructure
CategoryInfrastructure
Gap itemPM2 Process Management
DescriptionNode process manager configuration, restart policies, logging
Documentation statusDocumented
Code locationOutside codebase / server
Assigned to
  • docs/infrastructure/IN-002-PM2-PROCESS-MANAGEMENT.md
  • docs/infrastructure/IN-002-PM2-PROCESS-MANAGEMENT-STAGING.md

Documentation

This topic was added to Developer Docs and is shown here so the team can review the documented coverage for this gap in one place.


Developer Docs — docs/infrastructure/IN-002-PM2-PROCESS-MANAGEMENT.md

IN-002 — PM2 Process Management

Confirmed production findings for processes managed by PM2 on web.rahvaraamat.ee.

Source: Zone.ee portal screenshots, 31 July 2026.

PM2 managed processes

ProcessStatusMemory (observed)
elasticsearch-7.16.2Active~204 MiB
kafka-event-consumerActive~1200 MiB
queue-listenerActive~1024 MiB

PM2 configuration files

The following PM2 config files are in use:

  • elasticsearch-7.16.2.pm2.config.js
  • kafka-event-consumer.pm2.config.js
  • queue-listener.pm2.config.js

Observations

PM2 currently manages:

  • Elasticsearch service (7.16.2)
  • Kafka Event Consumer
  • Queue Listener

Zone notes applications should listen on localhost (127.0.0.1) with port forwarding or mod_proxy.

Summary

Three long-running production services run under PM2 and are reported as Active: Elasticsearch, the Kafka event consumer, and the queue listener. Each has a dedicated .pm2.config.js file.


Developer Docs — docs/infrastructure/IN-002-PM2-PROCESS-MANAGEMENT-STAGING.md

IN-002 — PM2 Process Management (Staging)

Confirmed staging findings for processes managed by PM2 on dev.rahvaraamat.ee.

Source: Zone.ee portal screenshots, 31 July 2026.

PM2 managed processes

ProcessStatusMemory (observed)Config file
rahvaraamat-webActive~200 MiBrahvaraamat-main-web.pm2.config.js
queue-listenerActive~200 MiBqueue-listener.pm2.config.js
elasticsearch-7.16.2Active~200 MiBelasticsearch.pm2.config.js
rahvaraamat-outlet-webInactive~201 MiBrahvaraamat-outlet-web.pm2.config.js
elastic-search-audioInactive~200 MiBelastic-search-audio.pm2.config.js

Observations

PM2 currently manages:

  • Main web frontend (rahvaraamat-web)
  • Queue listener
  • Elasticsearch
  • Outlet web application (inactive)
  • Audio Elasticsearch instance (inactive)

Inactive applications appear to be retained for optional or environment-specific use. Related staging port forwards for outlet/main web are documented in IN-005 Staging Server Architecture.

Summary

Staging PM2 runs three Active processes (rahvaraamat-web, queue-listener, elasticsearch-7.16.2) and keeps two Inactive apps (rahvaraamat-outlet-web, elastic-search-audio) with dedicated config files.