Parcourir la source

fix: increase request timeout from 5 minutes to 30 minutes (#2766)

since node 18 the default request timeout was changed from unlimited to 5 minutes
Zack Pollard il y a 2 ans
Parent
commit
1cbf9ff621
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      server/src/immich/main.ts

+ 2 - 1
server/src/immich/main.ts

@@ -28,7 +28,8 @@ export async function bootstrap() {
   useSwagger(app, isDev);
   useSwagger(app, isDev);
 
 
   await app.get(AppService).init();
   await app.get(AppService).init();
-  await app.listen(port);
+  const server = await app.listen(port);
+  server.setTimeout(1800000);
 
 
   logger.log(`Immich Server is listening on ${port} [v${SERVER_VERSION}] [${envName}] `);
   logger.log(`Immich Server is listening on ${port} [v${SERVER_VERSION}] [${envName}] `);
 }
 }