The DeferredResult works on my local machine, but not work on the server machine.
On my local machine when a DeferredResult called setResult, the response will return immediately. But on remote server machine, it only return the response to client after 30s (default timeout is 30s).
According to above posts, it may be caused by earlier version tomcat 8 issue.
Then I tried jetty on remote server machine, it works. Next I checked the version by running CATALINA_BASE/bin/version.sh, it’s displaying
Server version: Apache Tomcat/8.0.14 (Debian)
And my local tomcat version is 8.0.36
Then I upload my local tomcat to remote server and try DeferredResult again, it works!