Set maxSockets to Infinity for all services

This commit is contained in:
James Allen 2015-08-31 14:02:03 +01:00
parent 0215b12a5f
commit 738363a6de
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,12 @@
URL = require "url" URL = require "url"
seconds = 1000 seconds = 1000
# In Node 0.10 the default is 5, which means only 5 open connections at one.
# Node 0.12 has a default of Infinity. Make sure we have no limit set,
# regardless of Node version.
require("http").globalAgent.maxSockets = Infinity
require("https").globalAgent.maxSockets = Infinity
module.exports = OpenSocketsMonitor = module.exports = OpenSocketsMonitor =
monitor: (logger) -> monitor: (logger) ->
interval = setInterval () -> interval = setInterval () ->

View file

@ -1,6 +1,6 @@
{ {
"name": "metrics-sharelatex", "name": "metrics-sharelatex",
"version": "1.2.0", "version": "1.3.0",
"description": "A drop-in metrics and monitoring module for node.js apps", "description": "A drop-in metrics and monitoring module for node.js apps",
"repository": { "repository": {
"type": "git", "type": "git",