Skip to content

fix: run indexer reliably under pm2#59

Open
Snepsid wants to merge 2 commits into
Ethereum-Phunks:developmentfrom
nakamingos:fix/indexer-pm2-restart-logging
Open

fix: run indexer reliably under pm2#59
Snepsid wants to merge 2 commits into
Ethereum-Phunks:developmentfrom
nakamingos:fix/indexer-pm2-restart-logging

Conversation

@Snepsid
Copy link
Copy Markdown

@Snepsid Snepsid commented Apr 11, 2026

Summary

  • use a project-local PM2 dependency for the indexer engage scripts
  • point PM2 at the actual Nest build outputs and align copied static assets with the runtime path
  • log unhandled promise rejections before exiting so PM2 can restart with a useful error trail

Why

When the indexer was running through a long backlog, an unhandled promise rejection would terminate the process. The existing PM2 workflow also depended on a global PM2 install and pointed at build output paths that did not match the actual Nest artifact layout.

This change intentionally makes the existing engage, engage:mainnet, and engage:sepolia scripts self-contained and reproducible instead of relying on an undocumented global PM2 installation.

Dependency note

PM2 was added as a project dependency on purpose rather than assuming a global install.

Benefits:

  • reproducible PM2 version across machines
  • no pm2: not found setup failures on fresh environments
  • the existing package scripts work without additional machine-specific setup
  • easier debugging because the repo controls the PM2 version in use

The large yarn.lock diff is the expected result of adding PM2's transitive dependency tree, not unrelated lockfile churn.

Testing

  • NETWORK=sepolia yarn build:sepolia
  • started the sepolia app with PM2
  • verified the process came online and resumed queueing blocks

@chopperdaddy
Copy link
Copy Markdown
Member

what kind of temu chinese version of claude are you using to submit these PRs.

@Snepsid
Copy link
Copy Markdown
Author

Snepsid commented Apr 12, 2026

ah crap! I just realized I'm on Auto agent mode in copilot for this project. 💀

thanks for pointing that out. lol

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

Successfully merging this pull request may close these issues.

2 participants