Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bucket-processor: add timeout on s3 client #2452

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion extensions/lifecycle/management.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const werelogs = require('werelogs');

const config = require('../../lib/Config');
const management = require('../../lib/management/index');
const { TIMEOUT_MS } = require('../../lib/clients/utils');

const logger = new werelogs.Logger('mdManagement:lifecycle');

Expand All @@ -18,7 +19,7 @@ function getS3Client(endpoint) {
credentials,
s3ForcePathStyle: true,
signatureVersion: 'v4',
httpOptions: { timeout: 0 },
httpOptions: { timeout: TIMEOUT_MS },
maxRetries: 3,
});
return s3Client;
Expand Down
2 changes: 1 addition & 1 deletion lib/clients/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function createS3Client(params) {
sslEnabled: transport === 'https',
s3ForcePathStyle: true,
signatureVersion: 'v4',
httpOptions: { agent, timeout: 0 },
httpOptions: { agent, timeout: TIMEOUT_MS },
maxRetries: 0,
});
}
Expand Down
Loading