Attempt to fix 408 errors from the cueball connection pool. The pool now

regularly pings cloudapi's /. Also (temporarily) silenced cueball noise.
This commit is contained in:
Marsell Kukuljevic 2021-04-11 00:07:01 +02:00
parent 3c38a932ed
commit db8758cc30
1 changed files with 19 additions and 2 deletions

View File

@ -110,6 +110,20 @@ function login(req, res, cb) {
}
// Logging function useful to silence bunyan-based logging systems
function silentLogger() {
let stub = function () {};
return {
child: silentLogger,
warn: stub,
trace: stub,
info: stub,
debug: stub
}
}
// Start up HTTP server and pool of cloudapi clients.
//
// Read from config file, establish crypto singer needed for requests to
@ -132,8 +146,11 @@ function main() {
CLOUDAPI = mod_restify.createStringClient({
url: CONFIG.urls.cloudapi,
agent: new mod_cueball.HttpsAgent({
spares: 0,
maximum: 4,
log: silentLogger(), // temporary
spares: 2,
maximum: 5,
ping: '/',
pingInterval: 5000, // in ms
recovery: {
default: {
timeout: 2000,