Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Request timeout issue with the post jersey rest API request  RSS feed

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application environment is Tomcat 7.0, JDK 1.7. I am using Jersey for the REST API. One of our post type REST API request takes the processing more than 3 minutes, and it is just approx time, it can be more than 3 minutes. Then we send the response back to the client when our request processing is completed. but here request processing take 3 minutes so I got the request time out at the client side , and I do not get any response from the server , as I expected to success response

Request processing at server is like below:

Start the request

Insert details to db table [this process taking time in seconds]
Copying files to remote computer server [this process taking 3 minutes]
Update/active the files [this process taking time in seconds]
Send response to the client

End the request processing

All the above process must be in transaction , so we can not remove any of the above process,

We had already improve the best performance for Step 2 of the process , and it only happens, when we request with the more than 1 gb size file.

As of now for the temporary solution we had increase the timeout value which is configured in the Apache server.

Now I am looking for the solution of my issue, with any of the following approach:

Suggest me any development or implementation strategies which can resolve the my issue and it should be expected as described me?
How do I tackle the request time out issue?
Looking for the solution which notify the client from the server side , when the response is done?
Looking for the solution which can not close the connection between client and the server with the Jersey REST API implementation?

Thanks & regards
Yatin Baraiya
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!