Похожие чаты

Does anyone uses pm2 (node)? Why are the logs printed

multiple times even though if I were to start the application normally (node app.js) it's logged one time?

And it's just a simple console log that says the app has successfully started, but in pm2 logs, there are at least 10 of these

Also it's running in fork mode if it matters

8 ответов

4 просмотра

Does the app run normally after this log?

pm2 is process manager AND load balancer

Anon- Автор вопроса
elo
Does the app run normally after this log?

The app works just fine I'm just not sure why it logs the same thing multiple times, and I wasn't able to find anything regarding this issue The only issue I found was on GitHub and it was about the logs being printed two times, not multiple times

To troubleshoot: Run pm2 list to ensure you have only one instance of the application running. Use pm2 logs <app-name> to view the logs and check if the logs are consistently duplicated. Review your ecosystem.config.js or PM2 startup script to ensure no unintended configurations are causing multiple instances or restarts.

Multiple Instances: Ensure that only one instance of the application is running in PM2. Even though you're running in fork mode, if you accidentally started multiple processes, each would generate its own log entries. You can check the number of processes with pm2 list. Application Restart: If your app is set to auto-restart on crashes or if you manually restart it multiple times, this could lead to multiple log entries. Check the restart policy in your ecosystem.config.js or the PM2 command used to start the app.

i also first think it might be multiple instances or this but that doesn't seem to be the case may be this issue is regarding PM2 log rotation or logging configuration on the other thought

Anon- Автор вопроса
Udaykiran Avvaru
To troubleshoot: Run pm2 list to ensure you have ...

Yup There are at least three logs printed to the console I ditched using the pm2.json and just directly launched my app just to see the same thing happening

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта