update backend stuck/stall
This commit is contained in:
11
backend/src/config/httpClient.ts
Normal file
11
backend/src/config/httpClient.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import axios from 'axios';
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
|
||||
const httpClient = axios.create({
|
||||
timeout: 10_000,
|
||||
httpAgent: new http.Agent({ keepAlive: true, maxSockets: 20 }),
|
||||
httpsAgent: new https.Agent({ keepAlive: true, maxSockets: 20 }),
|
||||
});
|
||||
|
||||
export default httpClient;
|
||||
Reference in New Issue
Block a user