Replies: 3 comments
-
maybe try to use a script like this. It helped me to actually get the console output
|
Beta Was this translation helpful? Give feedback.
-
@jimboolio is it confirmed that it was Directus that stopped running? The part of the message |
Beta Was this translation helpful? Give feedback.
-
This is most likely the issue. With the server.js script from @eikaramba I managed to find out that the other instances get terminated because the directus port is already in use It looks like that in the pm2 ecosystem.config.js should point to an actual directus startup script/file, not npm or npx - I will update/reply here if I manage to figure that out... Update:With So PM2 works as supposed with the following ecosystem.config.js
Thanks for all help! |
Beta Was this translation helpful? Give feedback.
-
I'm trying to set up directus to run on PM2 load balanced cluster which would utilize all available cpu cores, but additional instances of Directus exit with
App [directus:1] exited with code [1] via signal [SIGINT]
There are no error messages on the console so I guess this could be as designed, if this is the case, it could be beneficial to include this information in the documentation
To Reproduce
My ecosystem.config.js:
Caching is disabled on .env:
Running
pm2 restart ecosystem.config.js --attach
outputs the following:And when running
pm2 list
all but the first directus processes are stoppedExpected behaviour
Directus would run in as many processes as defined in PM2 ecosystem.config.js
Actual behaviour
Only the proces with PM2 id 0 will run, other processes exit
Beta Was this translation helpful? Give feedback.
All reactions