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

SeaweedS3 API: Setting timeout on S3 APIs and S3 Client is not working as expected #5577

Open
nithinks21 opened this issue May 10, 2024 · 0 comments

Comments

@nithinks21
Copy link

Sponsors SeaweedFS via Patreon https://www.patreon.com/seaweedfs

Describe the bug
I am using the SeaweedS3 URLs/APIs to access, manage the Seaweed storage.
Few Actions like copying large files within the seaweed storage, requires an increased timeout(default timeout is 120 seconds on S3 APIs)
Setting a custom timeout on the Seaweed S3 APIs or S3 Client, doesn't seem to work.

ex:

  • Copying a 6 GB file within the Seaweed storage (using S3 APIs) takes 4 seconds to complete.
  • Since the default timeout is 120 seconds, the S3 API to copy it fails.
  • I am setting a apiCallAttemptTimeout of 600 seconds for this S3 API request.
  • But the API still fails with "Read Time out error" after 120 seconds, while the file copy continues in the background and completes.

Observation:- S3 API ignores the timeout configuration set at the S3 client and S3 API.
Error: "Unable to execute HTTP request: Read timed out"

System Setup

  • List the command line to start "weed master", "weed volume", "weed filer", "weed s3", "weed mount":
    Setup has master, volume (3 instances), filer(with S3)
  • OS version: Linux, MacOS
  • output of weed version: version 30GB 3.65 0edc5aa linux amd64
  • if using filer, show the content of filer.toml

Expected behavior
Setting a timeout on S3 Client or S3 API, should be honoured and the API should timeout and fail, only after set duration is lapsed.

How timeout is set. Source Code:

CopyObjectRequest copyObjectRequest = CopyObjectRequest.builder().sourceBucket(sourceBucketName).sourceKey(sourceKey).destinationBucket(destinationBucketName).destinationKey(destinationKey)
.overrideConfiguration(AwsRequestOverrideConfiguration.builder().apiCallAttemptTimeout(timeoutDuration).build())
.build();
CopyObjectResponse copyObjectResponse = s3Client.copyObject(copyObjectRequest);

Error thrown by s3Client.copyObject: "Unable to execute HTTP request: Read timed out".

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant