1 of 2

Have to guess that you are running out of some kind of resource (although you probably are already guessing that). Maybe max files open, or mysql, or salesforce. Don't know.

But one way you might be able to resolve it is instead of that bash script with a ton of those mf-sync things, put mf-sync in a module and use a controlling Node script that uses a queue to run this mf-sync thing sort of in controlled batches with the queue. Try something like https://github.com/learnboost/kue

Seems kind of crazy the way you are doing it. But if it is just running out of files, maybe you can get away with just increasing the limit. http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

Or if you really want to do it in the shell, maybe you can use the batch command to handle the queue. http://pubs.opengroup.org/onlinepubs/009695399/utilities/batch.html