Skip to content

Commit a7e6f8d

Browse files
authored
Merge pull request #32 from render-examples/et/keepalive
In order to avoid race conditions with the render reverse proxy, we should set the keepAlive to be longer than 60s. Setting it to 2 minutes here just in case.
2 parents e7a5c56 + ee972be commit a7e6f8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ const port = process.env.PORT || 3001;
44

55
app.get("/", (req, res) => res.type('html').send(html));
66

7-
app.listen(port, () => console.log(`Example app listening on port ${port}!`));
7+
const server = app.listen(port, () => console.log(`Example app listening on port ${port}!`));
88

9+
server.keepAliveTimeout = 120 * 1000;
10+
server.headersTimeout = 120 * 1000;
911

1012
const html = `
1113
<!DOCTYPE html>

0 commit comments

Comments
 (0)