Recently a bug in the project I’m working on almost drove me crazy. I’m using express.js with multer to handle file upload. When I tried to upload a pretty large file, the operation would always fail. At first, I thought it was some body content or file size limit but no matter how I tweaked the settings of these libraries, I just couldn’t fix it.
After some experimenting, I found that it had nothing to do with file size limit. The connection was reset after 1 minute automatically. This really puzzled me because I then thought it was related to Axios, the front end library I am using. Tweaking Axios also did not help.
Then I noticed that our lab server was running Node.js v13 and it suddenly occurred to me that this might be a bug of Node itself. After reverting to the latest stable of v12 the bug was fixed. Apparently there is some bug or undesired behavior of Node.js v13 which caused the built-in HTTP server or socket to drop connection right after 1 minute. That exactly why the LTS is on v12 and the nightly is on v14, I could not even remember how this v13 got into the place.