diff --git a/packages/instanceserver/src/channels.ts b/packages/instanceserver/src/channels.ts index fc584f61e7..38f141ed79 100755 --- a/packages/instanceserver/src/channels.ts +++ b/packages/instanceserver/src/channels.ts @@ -410,6 +410,7 @@ const updateInstance = async ({ instanceStarted = true const initialized = await initializeInstance({ app, status, headers, userId }) if (initialized) await loadEngine({ app, sceneId, headers }) + else instanceStarted = false return true } else { try { diff --git a/packages/server-core/src/networking/instance-provision/instance-provision.class.ts b/packages/server-core/src/networking/instance-provision/instance-provision.class.ts index 459cbb8e36..78c2cc89aa 100755 --- a/packages/server-core/src/networking/instance-provision/instance-provision.class.ts +++ b/packages/server-core/src/networking/instance-provision/instance-provision.class.ts @@ -87,7 +87,7 @@ export async function getFreeInstanceserver({ query: { assigned: true, assignedAt: { - $lt: toDateTimeSql(new Date(new Date().getTime() - 30000)) + $lt: toDateTimeSql(new Date(new Date().getTime() - 60000)) } }, headers @@ -510,7 +510,7 @@ export class InstanceProvisionService implements ServiceInterface