Request aborted, Apache2, Pm2, Formidable

Viewed 70

I have a vm that I use to upload video files to. I created a web application that acts as an upload service, using formidable on Node.js with an express framework, and AJAX UI on the front end that monitors progress of the upload with a progress bar. My reverse proxy is Apache2 and my process manager is pm2.

Unfortunately, my uploads keep terminating, often within less than 10% of the upload completed. Here is the error log in Pm2:

0|main  | Error: Request aborted
0|main  |     at IncomingMessage.<anonymous> (/home/myWebApp/node_modules/formidable/lib/incoming_form.js:122:19)
0|main  |     at IncomingMessage.emit (events.js:198:13)
0|main  |     at abortIncoming (_http_server.js:462:9)
0|main  |     at socketOnClose (_http_server.js:455:3)
0|main  |     at Socket.emit (events.js:203:15)
0|main  |     at TCP._handle.close (net.js:607:12)

PM2     | App [main:0] exited with code [1] via signal [SIGINT]
PM2     | App [main:0] starting in -fork mode-
PM2     | App [main:0] online
0|main  | Example app listening at http://localhost:3000

I have tried increasing the keepalive timeout on apache to 30 seconds and reducing them to 1 second, as well as increasing the max time requests to 200, and it still crashes the uploads. Even weirder is that one in every half dozen uploads goes through without a problem.

0 Answers
Related