Request timeout in Gatling - scala

I am using maven to run my Gatling (Scala) performance test.
It gives me request timeout issue when I increase user from 100 to 150.
If I set the number of user to 300, then I get following error in simulation log.
// Gatling scenario injection
val scn = scenario("UATEnvironmentTest")
.exec(http("AdminLoginRequest")
.post("/authorization_microservice/oauth/token")
.headers(headers_1).body(RawFileBody("Login.txt"))
.check(jsonPath("$.access_token")
.saveAs("auth_token")))
.pause(2)
setUp(scn.inject(nothingFor(5 seconds),atOnceUsers(50),rampUsers(250) over(10 seconds))).protocols(httpProtocol)
Error :- j.u.c.TimeoutException: Read timeout to /IP:80 after 120000
ms GROUP Failed to build request Request_1: No attribute named
'auth_token' is defined
Following is the configuration:
//Maven configuration-pom.xml
java.version 1.8
gatling.version 2.2.3
gatling-plugin.version 2.2.1
scala-maven-plugin.version 3.2.2
// Gatling.conf file
connectTimeout 120000
handshakeTimeout 120000
pooledConnectionIdleTimeout 120000
readTimeout 120000
requestTimeout 120000

For your particular case, the error is what already mentioned by #user666 in the comment section, but if you wanted to increase the request time out of Gatling Scripts, so that the connection stays:
Edit the Gatling.conf file
Uncomment the requestTimeout line
Provide the time in milliseconds you wanted your connection to be kept alive

Related

Protractor tests failing after ugrading to angular5

We have recently upgraded to angular 5. Since then my protractor tests started failing with reason " Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.".
All these tests were working fine before.
Protractor version : 5.2.0
karma version: 1.7.0
Highly appreciate your suggestions.
Thanks
This is a Jasmine timeout, see the Protractor guidance on Jasmine timeouts:
Timeouts from Jasmine
Spec Timeout
If a spec (an 'it' block) takes
longer than the Jasmine timeout for any reason, it will fail.
Looks like: a failure in your test results - timeout: timed out after
30000 msec waiting for spec to complete
Default timeout: 30 seconds
How to change: To change for all specs, add jasmineNodeOpts:
{defaultTimeoutInterval: timeout_in_millis} to your Protractor
configuration file. To change for one individual spec, pass a third
parameter to it: it(description, testFn, timeout_in_millis).
Try to debug your test, instructions here. Following any change, including an upgrade, it's possible your test may be broken; resulting in it hanging beyond the duration of the default Jasmine timeout.
A lazy option would be to increase your Jasmine timeout excessively, to see if your test fails with a different exception.

How to make more than 1000 requests per second through Gatling?

I am using the following setup which generates more than 3000 rps. Requirement is to test with up to 4k rps.
The setup that I am using is:
setUp(scn.inject(constantUsersPerSec(8) during(10 minutes)).protocols(httpConf)).throttle(
reachRps(1000) in (20 seconds),
holdFor(5 minute),
jumpToRps(2000),
holdFor(5 minute)
)
The error that I am getting is the following:
17:18:15.603 [gatling-http-thread-1-1] WARN i.gatling.http.ahc.ResponseProcessor - Request 'Home' failed: j.n.ConnectException: handshake timed out
But Gatling seems to fail, above 1000 rps. Is there a way we can do that?

SQL timeout on Azure website suddenly started when return large number (1500) rows

Azure Website with EF6 just started to get timeout on pages where I retrieve more than about 1000 rows. (unsure about the limit, works on 400 or less, fails on 1500 or more)
[Win32Exception (0x80004005): The wait operation timed out]
[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization=1; handshake=21; [Login] initialization=0; authentication=0; [Post-Login] complete=1; ]
The app has been running smoothly for several month I just noticed today. Any ideas?
(In case the error is still present: Page with err: http://fartslek.no/fartslek/15 Page without err: http://fartslek.no/fartslek/3 )

How to configure the Closing socket as no data read for session timeout

I need your help in getting rid of the below warning because it is stopping me of doing any activity in the jsf page:
Socket BEA-000449 Closing socket as no data read from it on
XXX.XXX.XXX.XX,XXX during the configured idle timeout of 5 secs
I tried changing the session timeout in web.xml, but still it shows the above warning:
<session-config>
<session-timeout>200</session-timeout>
</session-config>
You can use JAVA_OPTIONS to set this parameter.
In you start script add the following Java option:
-Dweblogic.client.socket.ConnectTimeout=XXX
where XXX is value in ms.
Also you can read the following thread from Oracle:
https://community.oracle.com/thread/2125724

Rest server (Play Framework) gets "Read Timed out" exception during load test

We are running a heavy load test (jmeter: 350 threads, 35M total requests) on a rest server using Play Framework and run into the following error after ~2 hour. We remove other components so that request simply take requests and do nothing. Anyone has any idea or simply Play Framework cannot handle heavy load like this?
2014/07/05 11:59:38 WARN - com.company.test.RestTest2: Run TestSQL throw error java.lang.Exception: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out
at com.company.dispatcher.RexsterRESTTaskDispatcher.dispatchTask(RexsterRESTTaskDispatcher.java:76)
at com.company.test.RestTest2.runTest(RestTest2.java:375)
at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:191)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Thread.java:744)
Part of the application.conf :
....
db.pool.timeout=100000
play {
akka {
akka.loggers = ["akka.event.Logging$DefaultLogger", "akka.event.slf4j.Slf4jLogger"]
loglevel = WARNING
actor {
default-dispatcher = {
fork-join-executor {
parallelism-factor = 64
parallelism-max = 1000
}
}
}
}
}
Had the this error today. It tool me a while to found out that one of the windows (svchost) processes was occupying the 1099 port, which the Jmeter server was trying to use.
I got a hint for this when trying to start the Jmeter-Server.bat file manually. Then, the following PowerShell command provided the details of that process. After closing that process, Jmeter clients started to connect again.
Get-Process -Id (Get-NetTCPConnection -LocalPort 1099).OwningProcess
There a many things to check:
Are you running Test from same machine ? if yes it's a problem
Is your machine TCP stack tuned ?
What is your JVM configuration regarding Xmx as long as your machine memory, CPU ...
What does your test look like ? could you show a screenshot with all elements unfolded ?
I think Play/AKKA can handle this load without problem so I would look into configuration issues.