playframework / playframework/play1
WS timeout has no effect if more than 60 seconds
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 671
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
see https://stackoverflow.com/q/45961070/1566975
response = WS.url(url).timeout("170s").postAsync() seems to fail: If your WS at url lasts more than 60 seconds and less than 170s, then response.onRedeem() call back is never called, response.isDone() is true and response.getOrNull() is null
I have attached a simple application that shows the problem (java8, play 1.4.4)
Execution logs:
10:07:06,542 INFO ~ start JOB
10:07:06,552 INFO ~ longTask called
10:08:06,776 INFO ~ done onRedeem not called, isDone=true but response.get() is null
...
10:08:36,898 INFO ~ done onRedeem not called, isDone=true but response.get() is null
10:08:36,898 ERROR ~ nothing under the sun after 90 seconds.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached job-long-async.zip application and the WS.url(url).timeout("170s").postAsync() entry point using Java 8 and Play 1.4.4. Reproduce a request lasting between 60 and 170 seconds, then trace why response.onRedeem() is not called despite isDone() being true. Done means the configured 170-second timeout governs the request and the callback receives the completed result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100