504 Gateway timeout when using Azure Service Bus relay - service

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.

Related

Connect HttpResolver to API using custom port

Hello: I'm creating an Appsync endpoint to gradually upgrade all of our old Rest API to GraphQL. In our API we aggregate data from some third party services (also REST).
One of those services has an endpoint running in a custom port (let's say 8050) and while our initial idea was to use Appsync HTTP Resolvers to connect to it we've been experiencing timeout problems. Our provider says there is nothing wrong with it's service but I've searched Amazon Appsync docs and there's nothing there about ports.
Has anyone else experienced this issue and knows how to solve it?
Thanks in advance.
When configuring your HTTP Data source, you can append the port to the HTTP Endpoint URL. See below.
As of May 2021, I tried to specify the port number in HTTP Endpoint URL in the Data Source configuration UI, it didn't work. I still received the timeout error.
Since I have control to the HTTP API server, I changed the server to listen on port 80, removed port number from the datasource HTTP endpoint config, and things start to work. It seems as of now, appsync does not support listening on ports other than 80 for http.

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.

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.

Azure Appfabric + WCF REST + Comet concurrent service connection

I have a problem with my azure appfabric local development server. I'm using WCF REST and Comet architecture on my server. I have a service method calling "GetUpdates". When a client sends a GET request to this method, it waits until a server-side update notification releases it.
There are no problem with this azure server on the cloud, but my local development server does not respond to all requests after sending two concurrent open requests to "GetUpdates" method. (html pages, js files, images, webservice requests.. etc.)
How can I solve this issue on local development server. Any idea what is causing it?