playframework / playframework/play1

WS timeout has no effect if more than 60 seconds

Open
#1,185 2 comments 1 reaction 0 assignees View on GitHub

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.

job-long-async.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.