Using PM2 to deploy Sails App on multiple cores

259 views
Skip to first unread message

Markus Padourek

unread,
Sep 5, 2014, 11:08:26 AM9/5/14
to sai...@googlegroups.com
We have recently started using PM2: https://github.com/Unitech/PM2, which offers some really simple support to run your node app on multiple processes. Simple start with `pm2 start app.js -i max -- --prod`. But I seem to run in an issue, that I now have two processes (or more) that try to access/modify the same `.tmp` folder and this is throwing me errors.

So I suppose one solution would be to change the grunt tasks, that it doesn't copy stuff to the `.tmp` folder, which right now seems to me like the only quick solution. Is there anything else though, that I might be not considering? Or could there be a different way to handle this issue?

Ambroise Dhenain

unread,
Sep 5, 2014, 11:11:53 AM9/5/14
to Markus Padourek, sai...@googlegroups.com
Copy the stuff in a .tmp-xxx depending on the process to make sure there is no conflicts?


2014-09-05 17:08 GMT+02:00 Markus Padourek <markus....@gmail.com>:
We have recently started using PM2: https://github.com/Unitech/PM2, which offers some really simple support to run your node app on multiple processes. Simple start with `pm2 start app.js -i max -- --prod`. But I seem to run in an issue, that I now have two processes (or more) that try to access/modify the same `.tmp` folder and this is throwing me errors.

So I suppose one solution would be to change the grunt tasks, that it doesn't copy stuff to the `.tmp` folder, which right now seems to me like the only quick solution. Is there anything else though, that I might be not considering? Or could there be a different way to handle this issue?



--
Cordialement,

M. Ambroise Dhenain.

Markus Padourek

unread,
Sep 7, 2014, 5:34:27 PM9/7/14
to sai...@googlegroups.com, markus....@gmail.com
Could you expand on this a bit more? Where/how could I set this?

Ambroise Dhenain

unread,
Sep 7, 2014, 5:42:44 PM9/7/14
to Markus Padourek, sai...@googlegroups.com
Using 0.10 I don't know anymore. But it's related to the grunt task.
Reply all
Reply to author
Forward
0 new messages