How to set custom timeout duration?
See original GitHub issueDescribe the issue
I am hitting a timeout error when performing a put request. I would like to tweak the timeout duration to be much more than 20 seconds.
Steps to Reproduce
- Make a put request last more than 20 seconds.
Current behavior
The app crashes
ERROR aws.smithy.kotlin.runtime.http.engine.ktor.KtorEngine - throwing
java.util.concurrent.CancellationException: Timed out waiting for 20000 ms
at aws.smithy.kotlin.runtime.http.engine.CoroutineUtilsKt$attachToOuterJob$cleanupHandler$1.invoke(CoroutineUtils.kt:39)
at aws.smithy.kotlin.runtime.http.engine.CoroutineUtilsKt$attachToOuterJob$cleanupHandler$1.invoke(CoroutineUtils.kt:37)
at kotlinx.coroutines.InvokeOnCancelling.invoke(JobSupport.kt:1457)
AWS Kotlin SDK version used
0.14.0-beta
Platform (JVM/JS/Native)
JVM
Operating System and version
Ubuntu 20.04.3 LTS
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
Custom Timeout Times - Discord Support
For example, the server I help moderate in handles moderation actions like this: - 2 hours - 6 hours - 12 hours -...
Read more >Better Timeout Time - Discord Bot - Disforge
This bot allows you to set a timeout anywhere from 1 second to 28 days! This can be done via the /timeout length...
Read more >Change Volley timeout duration - android - Stack Overflow
Volley sets default Socket & ConnectionTImeout to 5 secs for all requests. ... here you can write a custom retry policy and return...
Read more >telnet command with custom timeout duration
Oracle enterprise linux. And this is for some big company. They won't easily allow to install new tools. Need to use some thing...
Read more >Set Custom Timeout Property - VMware Docs
When vCenter is overloaded, it takes more time to return the response to the vRealize Orchestrator server than the 20000 milliseconds set by ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for investigating @aajtodd , I am pretty sure the json file we upload is much lighter than 500MB (maybe 25MB at most would be my guess) that being said it is in a highly concurrent environment therefore it might be that the request is not given high priority since we have a lot of coroutines running on the Dispatchers.IO.
I will continue to investigate to seek a better understanding but it’s good that at least you’re able to reproduce, we’ll be waiting for a fix in the meantime.
Thanks a lot
I’ve been able to reproduce this with a very large upload (1GB). The 20 sec timeout is coming from the retry middleware which is erroneously applying timeouts to the whole request (including upload time).
I’m a little surprised the size document you are dealing with is causing this though. I couldn’t reproduce this under 500MB but that could also of course just be differences in upload speed or possibly if you have a highly concurrent environment the request is getting starved.