-
Notifications
You must be signed in to change notification settings - Fork 863
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
S3Exception when uploading - "The difference between the request time and the current time is too large" #4122
Comments
@tom-smalls Can you provide the CRT verbose wirelogs? Please refer to our Developer Guide for instructions on how to enable the wirelogs: |
It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it. |
@debora-ito Yes, I can do this but will require me to do a patch release to production so will take a few days |
@tom-smalls we don't recommend using verbose wirelogs in production, it can impact the application's performance and it will log sensitive data. Can you reproduce the error in a non-prod environment? |
@debora-ito understood. Before trying to replicate in an environment, I am just testing the logging locally. Is this the sort of output you would be expecting?
|
Yes, that looks like the CRT logs. |
I've compressed the file but it's too large for github (50MB with 25MB limit), I could upload to google drive or s3 if that works for you? |
Yes, both options are good. Make sure they are securely shared and there's no sensitive data on the logs. |
@tom-smalls thank you for the logs, and sorry for the silence. Yes, I can see there's a delay between the request for partNumber=31 being prepared:
and effectively being sent:
I'll raise this to the CRT team. Preparing the request immediately before sending would avoid this kind of error. |
Hi, to unblock specific to your use case. I recommend to lower the With the restricted bandwidth (100Mb/s), we can see from the log, one single request took 16 mins to finishes, that's causing the next request waits in the line for too long and result in the So, simply set Besides of the settings to tweak, we are also adding a retry for the |
We are going to try your recommended settings. Do you have an idea of when awslabs/aws-c-s3#343 might be merged? Thanks |
I just merged the PR, do you still have the issue after changing the configuration? |
I haven't tested yet, planning on testing this week |
It worked with the config changes. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
When trying to upload a large file from a box with restricted bandwidth (100Mb/s) using multiple parts to S3 we receive an S3Exception with reason "The difference between the request time and the current time is too large. "
We checked the clocks on the server and clock sync was fine (under 2 seconds with S3 clock from what we can tell).
We believe the issue is that the upload is being split into multiple parts and at this point the headers for the upload are being generated but the actual uploading of the some of the parts is being delayed by up to 15 minutes (believe the timeout is 15 minutes https://web.archive.org/web/20170606231417/http://www.bucketexplorer.com/documentation/amazon-s3--difference-between-requesttime-currenttime-too-large.html) due to the restricted bandwidth, resulting in the upload to fail.
Expected Behavior
We would expect the upload to succeed rather than fail due to "The difference between the request time and the current time is too large"
Current Behavior
The below exception is thrown and the upload fails
Reproduction Steps
This is the code we use to upload the file. Note that we run this code on 2 boxes in parallel
Possible Solution
Don't create the headers for each part of an upload until it's actually being uploaded.
Additional Information/Context
No response
AWS Java SDK version used
2.20.67
JDK version used
openjdk 17.0.6 2023-01-17 LTS OpenJDK Runtime Environment Corretto-17.0.6.10.1 (build 17.0.6+10-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.6.10.1 (build 17.0.6+10-LTS, mixed mode, sharing)
Operating System and version
AlmaLinux 8.8 (Sapphire Caracal) Kernel: Linux 4.18.0-425.19.2.el8_7.x86_64
The text was updated successfully, but these errors were encountered: