Skip to content

Commit

Permalink
chore: try keepalive false
Browse files Browse the repository at this point in the history
  • Loading branch information
bryn-pins committed Nov 7, 2024
1 parent 4b46ff4 commit 09b4210
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/appeals-service-api/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ require('express-async-errors');
require('./controllers/appeals-for-submission-to-horizon-scheduler')();
const app = express();

const https = require('https');
const http = require('http');
https.globalAgent = new https.Agent({ keepAlive: false });
http.globalAgent = new http.Agent({ keepAlive: false });

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

Expand Down
5 changes: 5 additions & 0 deletions packages/auth-server/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import * as otp from './grants/otp-grant-handler.js';
import * as ropc from './grants/ropc-grant-handler.js';
import apiErrorHandler from './errors/api-error-handler.js';

import https from 'https';
import http from 'http';
https.globalAgent = new https.Agent({ keepAlive: false });
http.globalAgent = new http.Agent({ keepAlive: false });

const app = express();

const oidc = new OIDC(`${oidcConfig.host}:${config.server.port}`, oidcConfig.configuration);
Expand Down
6 changes: 5 additions & 1 deletion packages/document-service-api/src/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const config = require('./configuration/config');
const http = require('http');
const express = require('express');
const bodyParser = require('body-parser');
const { pinoHttp } = require('pino-http');
Expand All @@ -9,6 +8,11 @@ const routes = require('./routes');
require('express-async-errors');
const app = express();

const https = require('https');
const http = require('http');
https.globalAgent = new https.Agent({ keepAlive: false });
http.globalAgent = new http.Agent({ keepAlive: false });

app
.use(bodyParser.json())
.use(
Expand Down
5 changes: 5 additions & 0 deletions packages/forms-web-app/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const { spoolRoutes } = require('@pins/common');

const app = express();

const https = require('https');
const http = require('http');
https.globalAgent = new https.Agent({ keepAlive: false });
http.globalAgent = new http.Agent({ keepAlive: false });

app.use(
pinoHttp({
logger,
Expand Down
6 changes: 6 additions & 0 deletions packages/pdf-service-api/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ const {
} = config;

const app = express();

const https = require('https');
const http = require('http');
https.globalAgent = new https.Agent({ keepAlive: false });
http.globalAgent = new http.Agent({ keepAlive: false });

app
.use(
cors({
Expand Down

0 comments on commit 09b4210

Please sign in to comment.