Increasing GWT Timeout on JBoss Server - gwt

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)

Related

Chrome Lighthouse 403 forbidden on production server

I am trying to run Chrome lighthouse on my production server. It stops returning error saying Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: 403).
It is working fine in my local and staging setup servers. Servers hosted on AWS and cloudflare as firewall
As stated on this page
A common cause of failures is Lighthouse being blocked by bot detection or DDOS protection software, resulting in a 403 error. This can be resolved by allowing web traffic with the "Chrome-Lighthouse" user-agent string.
This is kind of frequent problem developers faces during production on a server with higher loading time, to summarize:
It occurs because of the following issues:
Unresponsive server
Unstable/Slow internet connection.
Please try to rerun the test then it will work.

PUT requests in Wildfly respond with 500

I have an app with a backend and a frontend that communicate with each other, and is developed on Wildfly.
When I make a PUT request from the backend to the frontend, these requests do not arrive and they return a 500 error. However, POST requests work correctly and do not generate problems.
I have checked the configuration of the wildfly, ficher or configuration server (standalone.xml), but I do not fall where the problem may be.
How can I fix this?
So you say when the backend sends a PUT request the response has status 500, while when the backend sends a POST request to the same URL the response has status 2XX?
That does not smell like a connectivity issue. It seems more that your PUT request gets blocked somewhere. Try to find out where that error 500 is coming from. It could be a proxy or firewall inbetween client and server, it could be even that Wildfly or the application are not configured to respond to PUT.

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.

Can my Web Server Issue a Client Rest Request to another REST Server

I have a web server that handles configuration set-up for various IO devices. I need to get some data from a REST server that is running on a different server. Can that web server code issue a client REST GET command to a REST server running on a different server? I tried it but I get a http 500 error. The server code is failing on the REST server request code.
I am closing out this question. Yes, your server can issue http requests to other services. I was having another problem with a self-signed certificate and the error made it look like their was a problem with my http request service.

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.