diff --git a/packages/api/src/proc/databaseConnectionProcess.js b/packages/api/src/proc/databaseConnectionProcess.js index 88f5ef8d9..ca652b5c6 100644 --- a/packages/api/src/proc/databaseConnectionProcess.js +++ b/packages/api/src/proc/databaseConnectionProcess.js @@ -335,11 +335,11 @@ function start() { setInterval(() => { const time = new Date().getTime(); - if (time - lastPing > 120 * 1000) { + if (time - lastPing > 40_000) { console.log('Database connection not alive, exiting'); process.exit(0); } - }, 60 * 1000); + }, 10_000); process.on('message', async message => { if (handleProcessCommunication(message)) return; diff --git a/packages/api/src/proc/serverConnectionProcess.js b/packages/api/src/proc/serverConnectionProcess.js index 592071040..43cbcca97 100644 --- a/packages/api/src/proc/serverConnectionProcess.js +++ b/packages/api/src/proc/serverConnectionProcess.js @@ -111,11 +111,11 @@ function start() { setInterval(() => { const time = new Date().getTime(); - if (time - lastPing > 120 * 1000) { + if (time - lastPing > 40_000) { console.log('Server connection not alive, exiting'); process.exit(0); } - }, 60 * 1000); + }, 10_000); process.on('message', async message => { if (handleProcessCommunication(message)) return; diff --git a/packages/api/src/proc/sessionProcess.js b/packages/api/src/proc/sessionProcess.js index d61f08d4b..41d8502ed 100644 --- a/packages/api/src/proc/sessionProcess.js +++ b/packages/api/src/proc/sessionProcess.js @@ -292,13 +292,15 @@ async function handleMessage({ msgtype, ...other }) { function start() { childProcessChecker(); + lastPing = new Date().getTime(); + setInterval(() => { const time = new Date().getTime(); - if (time - lastPing > 30_000) { + if (time - lastPing > 25_000) { console.log('Session not alive, exiting'); process.exit(0); } - }, 30_000); + }, 10_000); process.on('message', async message => { if (handleProcessCommunication(message)) return; diff --git a/packages/web/src/utility/connectionsPinger.js b/packages/web/src/utility/connectionsPinger.js index c37b5c8d9..526e1add1 100644 --- a/packages/web/src/utility/connectionsPinger.js +++ b/packages/web/src/utility/connectionsPinger.js @@ -29,12 +29,12 @@ export function subscribeConnectionPingers() { openedConnections.subscribe(value => { doServerPing(value); if (openedConnectionsHandle) window.clearInterval(openedConnectionsHandle); - openedConnectionsHandle = window.setInterval(() => doServerPing(value), 30 * 1000); + openedConnectionsHandle = window.setInterval(() => doServerPing(value), 30_000); }); currentDatabase.subscribe(value => { doDatabasePing(value); if (currentDatabaseHandle) window.clearInterval(currentDatabaseHandle); - currentDatabaseHandle = window.setInterval(() => doDatabasePing(value), 30 * 1000); + currentDatabaseHandle = window.setInterval(() => doDatabasePing(value), 30_000); }); }