mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Merge pull request #4306 from overleaf/jpa-http-sockets-limit
[misc] migrate setting of limit for http/https sockets into entrypoint GitOrigin-RevId: 2ff568bf89d3175b48246db3645a91428624b31f
This commit is contained in:
@@ -23,6 +23,11 @@ if ((Settings.sentry != null ? Settings.sentry.dsn : undefined) != null) {
|
||||
logger.initializeErrorReporting(Settings.sentry.dsn)
|
||||
}
|
||||
|
||||
const http = require('http')
|
||||
const https = require('https')
|
||||
http.globalAgent.maxSockets = Settings.limits.httpGlobalAgentMaxSockets
|
||||
https.globalAgent.maxSockets = Settings.limits.httpsGlobalAgentMaxSockets
|
||||
|
||||
metrics.memory.monitor(logger)
|
||||
|
||||
const Server = require('./app/src/infrastructure/Server')
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const { merge } = require('@overleaf/settings/merge')
|
||||
|
||||
let defaultFeatures, siteUrl
|
||||
const http = require('http')
|
||||
http.globalAgent.maxSockets = 300
|
||||
|
||||
// Make time interval config easier.
|
||||
const seconds = 1000
|
||||
@@ -74,6 +72,11 @@ const parseTextExtensions = function (extensions) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
limits: {
|
||||
httpGlobalAgentMaxSockets: 300,
|
||||
httpsGlobalAgentMaxSockets: 300,
|
||||
},
|
||||
|
||||
allowAnonymousReadAndWriteSharing:
|
||||
process.env.SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING === 'true',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user