@heliyos/heliyos-api-core 1.0.55 → 1.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/app.js +5 -0
  2. package/package.json +1 -1
package/dist/app.js CHANGED
@@ -56,6 +56,11 @@ const coreApp = (app, routes, options) => __awaiter(void 0, void 0, void 0, func
56
56
  const PORT = process.env.PORT || 3030;
57
57
  // Create HTTP server.
58
58
  const server = http_1.default.createServer(newApp);
59
+ // Configure server timeouts to prevent ECONNRESET errors
60
+ // Keep-alive timeout must be longer than client's keep-alive
61
+ server.keepAliveTimeout = 65000; // 65 seconds (ALB default is 60s)
62
+ server.headersTimeout = 66000; // Must be higher than keepAliveTimeout
63
+ server.setTimeout(60000); // Request timeout: 60 seconds
59
64
  // Initialize mongoose database connections
60
65
  yield (0, mongoose_1.initializeDatabase)();
61
66
  // Graceful shutdown handler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heliyos/heliyos-api-core",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "Heliyos's core api functions and middlewares. Its a private package hosted on npm.",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {