TritonDataCenter / node-manta

Node.js SDK for Manta
75 stars 54 forks source link

intermittent request failures with Node 0.10 #342

Closed davepacheco closed 1 year ago

davepacheco commented 6 years ago

For the full background, see joyent/manta-mlive#10. The summary is that prior to v3.0.0, node-manta would use a value for http.maxSockets from the environment, or else a pretty large default. After v3.0.0, because the way we pulled in restify-clients, these settings were ignored. On Node 0.12 and later, the default http.maxSockets is a pretty large value, but on Node 0.10, it's only set to 5. With much concurrency, this causes heavy queueing of requests on the client and all manner of nasty failure modes.

The fix appears to be pretty straightforward -- in lib/create_client.js, we need to move the bit that sets maxSockets to appear before restify-clients is required.

bahamat commented 1 year ago

Many of the dependencies we rely on don't support node 0.10 anymore, so this seems kind of moot now.

The engines will be bumped to >=6.0 with the next release.