mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 23:47:00 +03:00
Add logging when too many active connections
This commit is contained in:
@@ -183,7 +183,7 @@ if (config.redis?.enabled) {
|
|||||||
const getRead = readClient?.get?.bind(readClient);
|
const getRead = readClient?.get?.bind(readClient);
|
||||||
exportClient.get = (key) => new Promise((resolve, reject) => {
|
exportClient.get = (key) => new Promise((resolve, reject) => {
|
||||||
if (config.redis.maxConnections && activeRequests > config.redis.maxConnections) {
|
if (config.redis.maxConnections && activeRequests > config.redis.maxConnections) {
|
||||||
reject(new TooManyActiveConnectionsError("Too many active requests in general"));
|
reject(new TooManyActiveConnectionsError(`Too many active requests in general: ${activeRequests} over ${config.redis.maxConnections}`));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user