Skip to content

Commit 5ea0ef0

Browse files
authored
Merge pull request #262 from akkeris/keep-alive-timeout-increase
increase keep alive timeout to 6 minutes
2 parents b5d0cc0 + b248faf commit 5ea0ef0

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ ready.catch((e) => {
114114
process.exit(1);
115115
});
116116

117-
118117
// -- apps
119118
routes.add.get('/apps$')
120119
.run(alamo.apps.http.list.bind(alamo.apps.http.list, pg_pool))
@@ -168,7 +167,6 @@ routes.add.delete('/apps/([A-z0-9\\-\\_\\.]+)/filters/([A-z0-9\\-\\_\\.]+)$')
168167
.run(alamo.filters.http.attach.delete.bind(alamo.filters.http.attach.delete, pg_pool))
169168
.and.authorization([simple_key]); // jwt tokens may not delete filter attachments.
170169

171-
172170
// -- dynos
173171
// Get dyno sizes
174172
routes.add.get('/sizes$')
@@ -314,7 +312,6 @@ routes.add.delete('/apps/([A-z0-9\\-\\_\\.]+)/log-drains/([A-z0-9\\-\\_\\.]+)$')
314312
.run(alamo.log_drains.http.delete.bind(alamo.log_drains.http.delete, pg_pool))
315313
.and.authorization([simple_key, jwt_key]);
316314

317-
318315
routes.add.post('/sites/([A-z0-9\\-\\_\\.]+)/log-sessions$')
319316
.run(alamo.logs.http.create.bind(alamo.logs.http.create, pg_pool))
320317
.and.authorization([simple_key, jwt_key]);
@@ -339,7 +336,6 @@ routes.add.get('/apps/([A-z0-9\\-\\_\\.]+)/previews/([A-z0-9\\-\\_\\.]+)$')
339336
.run(alamo.previews.http.get.bind(alamo.previews.http.get, pg_pool))
340337
.and.authorization([simple_key, jwt_key]);
341338

342-
343339
// -- addons
344340
routes.add.post('/apps/([A-z0-9\\-\\_\\.]+)/addons$')
345341
.run(alamo.addons.http.create.bind(alamo.addons.http.create, pg_pool))
@@ -388,7 +384,6 @@ routes.add.put('/apps/([A-z0-9\\-\\_\\.]+)/addons/([A-z0-9\\-\\_\\.]+)/actions/(
388384
.run(alamo.addons.http.actions.bind(alamo.addons.http.actions, pg_pool))
389385
.and.authorization([simple_key, jwt_key]);
390386

391-
392387
// GET /apps/{app_name_or_id}/addons/{addon_name_or_id}/config ?
393388

394389
// webhooks
@@ -473,7 +468,6 @@ routes.add.get('/addon-services/([A-z0-9\\-\\_\\.]+)/plans/([A-z0-9\\-\\_\\.\\:]
473468
.run(alamo.addon_services.plans.get.bind(alamo.addon_services.plans.get, pg_pool))
474469
.and.authorization([simple_key, jwt_key]);
475470

476-
477471
// -- ssl endpoint and orders, requires ssl plugin
478472
routes.add.get('/ssl-orders$')
479473
.run(alamo.certificates.orders.list.bind(alamo.certificates.orders.list, pg_pool))
@@ -616,7 +610,6 @@ routes.add.delete('/stacks/([A-z0-9\\-\\_\\.]+)$')
616610
.run(alamo.stacks.http.delete.bind(alamo.stacks.http.delete, pg_pool))
617611
.and.authorization([simple_key, jwt_key]);
618612

619-
620613
routes.add.get('/pipeline-promotions$')
621614
.run(alamo.pipelines.promotions.http.list.bind(alamo.pipelines.promotions.http.list, pg_pool))
622615
.and.authorization([simple_key, jwt_key]);
@@ -758,7 +751,6 @@ routes.add.post('/clusters/([A-z0-9_.-]+)/consumer-groups/([A-z0-9_.-]+)/seek$')
758751
.run(alamo.consumer_groups.seek.bind(null, pg_pool))
759752
.and.authorization([simple_key, jwt_key]);
760753

761-
762754
// Schemas
763755
routes.add.get('/clusters/([A-z0-9_.-]+)/schemas$')
764756
.run(alamo.topic_schemas.list_schemas.bind(null, pg_pool))
@@ -844,6 +836,8 @@ const server = http.createServer((req, res) => {
844836
}
845837
});
846838

839+
server.keepAliveTimeout = 1000 * (60 * 6); // 6 minutes
840+
847841
process.on('uncaughtException', (e) => {
848842
console.error(e.message);
849843
console.error(e.stack);

0 commit comments

Comments
 (0)