Increasing timeout for vetx server - vert.x

I am using a vertx server v3.7.0 as a gateway for my application.I have one service which takes more than 2 min to process data( I have few other services which takes more than 2 min ) . When I directly call that service using endpoint of the services it works fine. But similar thing when I try from vertx gateway it times out and gives 504 Gateway Time-out.
I read on the vertx documentation section that default timeout is 30 sec. ( https://vertx.io/docs/vertx-core/java/#_sending_with_timeouts ). Do we have same for vertx gateway ? I tried to look for similar property to put into json configuration but could not find any relevant documentation for the same.
How can we configure the value of this timeout ?

Related

Gatling with load balanced IP hash Nginx

I'm load testing a Tomcat web application with 4 nodes. Those nodes are configured through Nginx with ip_hash:
ip_hash;
server example:8888 weight=2 max_fails=3 fail_timeout=10s;
server example:8888 weight=4 max_fails=3 fail_timeout=10s;
server example:8888 weight=2 max_fails=3 fail_timeout=10s;
server example:8888 weight=2 max_fails=3 fail_timeout=10s;
Anyway, I use Gatling for load and performance testing but everytime when I start a test all traffic is routed to one node.. Only when I change the load balance node to least_conn of round robin then the traffic is divided. But this application needs a persistent node to do the work.
Is there any way to let Gatling route the traffic to all 4 nodes during a run? Maybe with a setup configuration? I'm using this setUp right now:
setUp(scenario1.inject(
atOnceUsers(50),
rampUsers(300) over (1800 seconds),
).protocols(httpConf)
)
Thank you!
ip_hash;
Specifies that a group should use a load balancing method where requests are distributed between servers based on client IP addresses.
You should use sticky:
Enables session affinity, which causes requests from the same client to be passed to the same server in a group of servers.
Edit:
Right, I didn't see that it's for nginx plus only :(
I found this post (maybe it helps...):
https://serverfault.com/questions/832790/sticky-sessions-with-nginx-proxy
Reference to: https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng
There is also a version of the module for older versions of nginx:
http://dgtool.treitos.com/2013/02/nginx-as-sticky-balancer-for-ha-using.html
Reference to: https://code.google.com/archive/p/nginx-sticky-module/

load balancing wcf service with basichttp binding

I am having a wcf service which is hosted on iis, when 10 to 15 users accessing the service at a time, it is ends with an exception stating httprequesttimedoutwithoutdetails. I have increased the send, receive, open, closed timeout configuration but still in getting the issue. Can anyone please suggest any idea.

How to connect to a SVC endpoint?

Given a URL that ends with .svc and that is supposed to run a SOAP web service, how can I get some data from it?
I tried:
to access it via a web browser
to access it via the Python's library Zeep
to access it via the Microsoft utilitary svcutil.exe
In all cases, I get a timeout error:
Failed to establish a new connection: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time.
Does it mean that the web service does not work, or that I do things the wrong way?
Importantly - there is a big distinction between "service not active" (and by that I mean no listener on port 80), and "port not open in firewall".
If the problem were simply that you didn't have a service listening on port 80, you would have gotten something like "connection reset" or "connection rejected" as an error.
Instead, you appear to have gotten a timeout, which implies that either the SYN from the client doesn't reach the server, or the SYN/ACK from the server doesn't reach the client. [ You could verify this by doing a packet capture for port 80 on both client and server ]
I would be tempted to check any firewall in front of the server to see that it's letting port 80 traffic through from your client.
Diagnosing Connectivity Issues
Without more details it is difficult to say, but given your timeout error:
Failed to establish a new connection: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time.
This indicates a network connectivity error at the TCP level, so it is likely web service is not active on the port your are using (default of 80 for http, 443 for https).
In a comment you said you pinged the URL and it responded normally - I assume this means you pinged the hostname. If this is responding normally it means the server is active, but that doesn't tell you anything about the availability of the web service on that server.
telnet %hostname% %port%
where %port% is 80 for http or 443 for https, or something else if there is a port number in the URL you are using (e.g. http://somehost.somewhere.com:port/path.scv)
If ping works and telnet does not connect, then the service is not active.
I suspect this is the case. If the service was active and it was simply that you requesting the data incorrectly, I believe you'd get a different error message - e.g. a valid HTTP response with status code 500 or 404 or similar.
Getting Data from a Web Service
As to your original question as to how to get data from it - once you verify that the service is active, the method to get the data will depend on the specification of the service - i.e.:
which HTTP methods (GET, POST, etc.) does it support
what parameters it requires
what format it requires the parameters in
are the parameters in the query string or POST body.
To interact with a web service there are many command line tools that can be used, as well as the options you have tried, including:
POSTMan Google Chrome Plugin
curl
wget
In windows Powershell, the Invoke-WebRequest
Getting Data from a SOAP Web Service
As you have said it is a SOAP web service, if you have the URL for the wsdl, you can often interract with it using Powershell SOAP WebService Proxies.
The wsdl location varies, but is often at a URL that looks something like.
http://host/path.svc?wsdl
http://host/path.svc/?wsdl
http://host/path/?wsdl
Also if it's configured correctly, just loading the URL in a browser will present a page with a link to the wsdl.
The general idea is:
$URI="http://hostname/path.svc?wsdl"
$Proxy = New-WebserviceProxy $URI –Namespace X
$Proxy | get-member -MemberType Method
This will return a list of methods on the proxy that you can invoke as powershell methods. Any types defined in the wsdl that are needed for arguments, or returned from methods will be available within the namespace X. Invoking the methods will proxy the request to the service, taking care of serializing parameters and serializing results into powershell objects.

Problems with configuration of Bluemix server

I'm trying to increase timeouts in Bluemix. I've set all the timeout settings to 5 min. But after 2 min of a request I got an error:
500 Error: Failed to establish a backside connection
How do I solve this problem?
"This particular message probably comes from the L1 load balancer in Bluemix when it fails to get a timely response from the application it tries to route to. One of the possible cause here is because your application does not send any response back before the load balancer times out, which is 2 minutes if my memory serves me well."
https://developer.ibm.com/answers/questions/25439/bluemix-500-error-failed-to-establish-a-backside-connection-on-web-service-call.html
I would open up a support ticket if you need any additional help.

With Spring Cloud - Brixton.M1, random port not registered with Eureka

With Angel.SR3, assigning server.port: 0 would assign a random port to embedded Tomcat instance and use that port when registering with Eureka (using random instance ID as well in order to run more than one instance of a service on my dev machine).
I want to use the new Spring Cloud Sleuth for automatic tracing so first I just tried using spring-cloud-starter-sleuth at 1.0.0.M1 but trace and span didn't show up in log files when using the logging pattern in the example app. I thought it might be related to the versions of the other libraries that I was picking up with Angel.SR3 so I tried experimenting with Brixton.M1. With Brixton.M1, trace and span are now being set correctly but my service no longer registers its random port with Eureka - port 0 is registered instead. Tomcat DOES come up on a random port, however.
I added a breakpoint in EurekaDiscoveryClientConfiguration.containerPortInitializer() and it is not hit until AFTER the service has registered with Eureka Server in Brixton.M1 and is hit BEFORE service registration in Angel.SR3.
Am I missing something or is this currently broken in Brixton.M1?
This is a known issue that has been fixed in snapshots. Another milestone will come in the next week or so.