I host my site on NodeJitsu and am having memory issues with file uploads. My app crashes with this log message:
{ [Error: spawn ENOMEM] code: 'ENOMEM', errno: 'ENOMEM', syscall: 'spawn' }
It never actually gets to my controller so it's not an issue there. I am currently uploading the file using jQuery POST Ajax. I have also tried chunk uploading using the BlueImp plugin. The files in question are not that big - jpg images, 1000x1000, normal Kbs, nothing unusual.
I wonder if there is anything I can do to make this work? Some alternate way to upload bypassing Express's standard way, or some setting.
UPDATE: I have tried standard html forms, jquery ajax, blueimp jquery plugin, using native express bodyparser, using formidable. It's a no go. I'm assuming you just can't upload files to nodejitsu that are anything beyond small in size.
Actually, I was getting the same problem, but I'd changed my default upload directory. So, I changed it back that to default in express i.e. I changed
app.use(express.bodyParser({
uploadDir: __dirname + "/public/images/tmp"
}));
to
app.use(express.bodyParser());
Then, I deployed the app, and it worked for me.
You might also want to look at the dependencies in your package.json file. You can consult this link for detail http://blog.nodejitsu.com/package-dependencies-done-right