diff --git a/libraries/metrics/open_sockets.coffee b/libraries/metrics/open_sockets.coffee index d4a6eb6c8d..9af019dfc8 100644 --- a/libraries/metrics/open_sockets.coffee +++ b/libraries/metrics/open_sockets.coffee @@ -1,6 +1,12 @@ URL = require "url" 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 = monitor: (logger) -> interval = setInterval () -> diff --git a/libraries/metrics/package.json b/libraries/metrics/package.json index 69fe375357..1f5214c3d4 100644 --- a/libraries/metrics/package.json +++ b/libraries/metrics/package.json @@ -1,6 +1,6 @@ { "name": "metrics-sharelatex", - "version": "1.2.0", + "version": "1.3.0", "description": "A drop-in metrics and monitoring module for node.js apps", "repository": { "type": "git",