From 6077e73dd65bb4439522347a87247cec7c5be8f8 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Mon, 29 May 2023 11:59:29 -0400 Subject: [PATCH] Merge pull request #13253 from overleaf/em-revert-leaked-socket-detection Revert leaked socket detection GitOrigin-RevId: 0f17864122a17fc69d0dac1ad5e2775805639871 --- services/chat/app/js/server.js | 2 -- services/clsi/app.js | 1 - services/docstore/app.js | 1 - services/filestore/app.js | 1 - services/history-v1/app.js | 1 - services/project-history/app/js/server.js | 1 - services/real-time/app.js | 1 - services/spelling/app/js/server.js | 1 - services/web/app.js | 1 - 9 files changed, 10 deletions(-) diff --git a/services/chat/app/js/server.js b/services/chat/app/js/server.js index f388ab3336..28f7b6f1b6 100644 --- a/services/chat/app/js/server.js +++ b/services/chat/app/js/server.js @@ -13,8 +13,6 @@ metrics.initialize('chat') logger.initialize('chat') metrics.open_sockets.monitor() -metrics.leaked_sockets.monitor(logger) - export async function createServer() { const app = express() diff --git a/services/clsi/app.js b/services/clsi/app.js index b9a70316f0..44e1e5c4d4 100644 --- a/services/clsi/app.js +++ b/services/clsi/app.js @@ -18,7 +18,6 @@ const Path = require('path') Metrics.open_sockets.monitor(true) Metrics.memory.monitor(logger) -Metrics.leaked_sockets.monitor(logger) const ProjectPersistenceManager = require('./app/js/ProjectPersistenceManager') const OutputCacheManager = require('./app/js/OutputCacheManager') diff --git a/services/docstore/app.js b/services/docstore/app.js index 1fb11d3589..f8e83fb4ec 100644 --- a/services/docstore/app.js +++ b/services/docstore/app.js @@ -23,7 +23,6 @@ logger.initialize('docstore') if (Metrics.event_loop != null) { Metrics.event_loop.monitor(logger) } -Metrics.leaked_sockets.monitor(logger) Metrics.open_sockets.monitor() const app = express() diff --git a/services/filestore/app.js b/services/filestore/app.js index 807c86bcea..a0406fac1c 100644 --- a/services/filestore/app.js +++ b/services/filestore/app.js @@ -27,7 +27,6 @@ Metrics.memory.monitor(logger) if (Metrics.event_loop) { Metrics.event_loop.monitor(logger) } -Metrics.leaked_sockets.monitor(logger) app.use(function (req, res, next) { Metrics.inc('http-request') diff --git a/services/history-v1/app.js b/services/history-v1/app.js index 391551f632..9f1033c041 100644 --- a/services/history-v1/app.js +++ b/services/history-v1/app.js @@ -29,7 +29,6 @@ logger.initialize('history-v1') Metrics.open_sockets.monitor() Metrics.injectMetricsRoute(app) app.use(Metrics.http.monitor(logger)) -Metrics.leaked_sockets.monitor(logger) // We may have fairly large JSON bodies when receiving large Changes. Clients // may have to handle 413 status codes and try creating files instead of sending diff --git a/services/project-history/app/js/server.js b/services/project-history/app/js/server.js index c583f55927..d7b83975a4 100644 --- a/services/project-history/app/js/server.js +++ b/services/project-history/app/js/server.js @@ -16,7 +16,6 @@ if (Settings.sentry.dsn) { Metrics.initialize('project-history') Metrics.event_loop.monitor(logger) Metrics.memory.monitor(logger) -Metrics.leaked_sockets.monitor(logger) Metrics.open_sockets.monitor() // log updates as truncated strings diff --git a/services/real-time/app.js b/services/real-time/app.js index 9e802464e3..295cdede39 100644 --- a/services/real-time/app.js +++ b/services/real-time/app.js @@ -6,7 +6,6 @@ const async = require('async') const logger = require('@overleaf/logger') logger.initialize('real-time') Metrics.event_loop.monitor(logger) -Metrics.leaked_sockets.monitor(logger) Metrics.open_sockets.monitor() const express = require('express') diff --git a/services/spelling/app/js/server.js b/services/spelling/app/js/server.js index ba5ba8e0e8..50ac2420d1 100644 --- a/services/spelling/app/js/server.js +++ b/services/spelling/app/js/server.js @@ -12,7 +12,6 @@ if (Settings.sentry?.dsn != null) { logger.initializeErrorReporting(Settings.sentry.dsn) } metrics.memory.monitor(logger) -metrics.leaked_sockets.monitor(logger) metrics.open_sockets.monitor() export const app = express() diff --git a/services/web/app.js b/services/web/app.js index 148f9df730..28068c90bb 100644 --- a/services/web/app.js +++ b/services/web/app.js @@ -34,7 +34,6 @@ http.globalAgent.maxSockets = Settings.limits.httpGlobalAgentMaxSockets https.globalAgent.maxSockets = Settings.limits.httpsGlobalAgentMaxSockets metrics.memory.monitor(logger) -metrics.leaked_sockets.monitor(logger) metrics.open_sockets.monitor() const Server = require('./app/src/infrastructure/Server')