Spring boot API timeout and HTTP timeout in weblogic - rest

I am in the process of setting up a spring rest api using spring boot.
This will be deployed on weblogic server.
this api will perform a db operation which can potentially take anywhere between a few seconds to an hour.
Am planning to use spring's 'DeferredResult' and 'ForkJoinPool' to trigger the database operation asynchronously.
I would like to perform a timeout and inform the end user if I dont get a response from the db operation after lets say 30 seconds.
So I will be setting this configuration for my rest api to timeout after 30 seconds.
My question : are there any weblogic http timeouts that could occur ?
If yes then my api configured timeout would need to be less than the server timeout
or
I would need to increase the server timeout such that it is greater than the API timeout .
Any thoughts on the approach would be great .

Related

Dynamic timeout for each api in spring eureka

I am facing timeout problem while downloading excel reports from my web application. The application is follows microservices archtecture build using spring-cloud. The Api timed out as i had set the ribbon timeout to
ribbon.ReadTimeout= 40000
ribbon.ConnectTimeout= 40000
Now if i increase the timeout in application.properties, then it will be reflected in entire application. I need different timeout for UI and downloading reports.
Is there a way to set dynamic timeouts for different api's in spring cloud? Please guide

Jersey server is disconnecting the client after 2 minutes

Jersey REST API is disconcerting client after exact 2 mins however client is not configured for any kind of timeout.
To avoid the issue i am using Jersey Async API that helps me.
But my problem is why jersey is disconnecting the client. Does Jersey has 2 mins timeout configured in it, that i don't know and couldn't find that on Google.
I tried via cURL, postman etc, everywhere client is disconnecting.
I got the fix of my problem.
The issue was due to DoS (Denial of Service) filter configuration. That was configured with 2 mins timeout. I changed that to extended value and so my REST API is working for long run processes.

Increasing GWT Timeout on JBoss Server

We are working on a GWT based web application hosted on JBoss 5.2.0.1. We are using Java/Spring on the server side.
One of the Async services takes more than 5 minutes to return the response from the server, and this leads to error (on production environment):
com.google.gwt.user.client.rpc.StatusCodeException: 504
Gateway Time-out
The gateway did not receive a timely response from the upstream server or application.
The issue doesn't occur when the JBoss is hosted on my local machine. I am suspecting this is some server side setting on production environment which is causing the timeout.
I referred to a couple of questions on SO and the solutions are related to setting timeout with RequestBuilder.setTimeoutMillis(). However, I am not completely convinced that this is related to changes on client side (since the code works fine on my local, where only JBoss configuration may differ from the production)
Any pointers are appreciated. TIA.
It turned out that the there was a timeout set on the gateway. The gateway would return HTTP 504 error in case there is no response returned by the server withing the set timeout (which was 5 minutes)

spring cloud configuration client spamming our configuration server

We have a set of micro services which obtain their configuration from a configuration server that we have created. Our configuration server uses mongo as the backing store for configuration files and we run it in a redundant configuration so that if any of the configuration servers fail then we can fail over to another.
Now the configuration for each service is that it uses discovery to get the location of the configuration server. We can see that each service obtains a reference ants the proper configuration data for the server and that all services start correctly with this data.
Now one thing that we noticed is that the services regularly request their configurations from the configuration server every 3 mins. This is being done at the configuration client level and not in our code base.
This get request from every service at that rate is causing quite a bit of load on the configuration service. Is this expected and if so how can be lower the rate of these pings?
One additional issue is that if we make a health request to any service, this triggers a request to get the services configuration from the remote configuration service.
The combination of both of these elements is driving our configuration server into the ground since they are 5 requests/sec on the server.

504 Gateway timeout when using Azure Service Bus relay

I'm using Windows Azure Service Bus relay to expose a WCF service that lives on premises using basicHttpRelayBinding.
For every request, the web service will just get some data out of a SQL Database using entity framework, then convert the results to an IEnumerable and finally send the response to the client.
Everything works just fine and I'm able to consume this web service from our web and worker roles hosted in the cloud, but every once in a while I'm getting the 504 Gateway timeout error while waiting for a response from the service, Typically this only happens with queries that take more than 30 - 40 seconds to execute.
Been doing some research and I've find out that this might be due to slow communication between a server acting as a gateway/proxy and some server upstream in the chain, but I'm not sure if there's any way to increase the timeout value so we don't get the 504 error.
Any help would be really appreciated.