TimeoutException during file upload

1,033 views
Skip to first unread message

Jay Ken

unread,
Apr 20, 2016, 5:48:41 PM4/20/16
to Gatling User Group
Hi Gatling Users,

Seems my file upload take more than 1.30 minutes and my file upload works fine if I try from browser.

When I run my gatling script, It gives me following exception to my file_upload request.


java.util.concurrent.TimeoutException: Request timeout to t21.abc.com/17.176.22.118:443 after 60000ms
at org.asynchttpclient.netty.timeout.TimeoutTimerTask.expire(TimeoutTimerTask.java:43) [async-http-client-2.0.0-RC7.jar:na]
at org.asynchttpclient.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:48) [async-http-client-2.0.0-RC7.jar:na]
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:581) [netty-common-4.0.33.Final.jar:4.0.33.Final]
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:655) [netty-common-4.0.33.Final.jar:4.0.33.Final]
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:367) [netty-common-4.0.33.Final.jar:4.0.33.Final]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]
14:28:23.861 [pool-1-thread-1] DEBUG io.gatling.http.ahc.AsyncHandler - Request 'file_upload' failed for user 1
java.util.concurrent.TimeoutException: Request timeout to t21.abc.com/17.176.22.118:443 after 60000ms
at org.asynchttpclient.netty.timeout.TimeoutTimerTask.expire(TimeoutTimerTask.java:43) [async-http-client-2.0.0-RC7.jar:na]
at org.asynchttpclient.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:48) [async-http-client-2.0.0-RC7.jar:na]
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:581) [netty-common-4.0.33.Final.jar:4.0.33.Final]
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:655) [netty-common-4.0.33.Final.jar:4.0.33.Final]
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:367) [netty-common-4.0.33.Final.jar:4.0.33.Final]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]


It also reports error on console like below - 

---- Errors --------------------------------------------------------------------
> j.u.c.TimeoutException: Request timeout to t21.abc.com      1 (100.0%)
27.136.32.135:443 after 60000ms
===============================================


To eliminate the TimeoutException I have changed following parameters to 2.30 minutes in gatling.conf file. 

connectTimeout = 150000
readTimeout = 150000
requestTimeout = 150000
sslSessionTimeout = 150000 

But it still shows Request timeout after 60000ms in last error. Am I changing right parameters? Can timeout be changed more than 60 seconds? Please guide.

Thanks,
Jay

Jay Ken

unread,
Apr 20, 2016, 5:49:35 PM4/20/16
to Gatling User Group
Version Gatling 2.2.0

Jay Ken

unread,
Apr 21, 2016, 11:05:43 AM4/21/16
to Gatling User Group
Hello Folks,

Do you have any workaround to increase request timeout to 2 minutes etc. So my file upload request will go through? 
Am using Gatling 2.2.0. Detail steps are there in my initial post in this thread.

Thanks,
Jay

John Arrowwood

unread,
Apr 21, 2016, 12:12:05 PM4/21/16
to Gatling User Group
If you update the ahc.requestTimeout (which it appears you did) it should have worked.  I've looked through the docs for evidence that it could be overridden on a request-by-request basis, but I don't see anything.  

Did it work to change that setting in a pre-2.2 version?

Jay Ken

unread,
Apr 21, 2016, 1:37:38 PM4/21/16
to Gatling User Group
Thanks John for your response.

There is an interesting observation. Now when I changed request timeout (readTimeout = 150000) my actual request was timed out after 70 seconds. which is different than 60 seconds but not 150 seconds as I set.

I will try in 2.1.7.

Thanks,
Jay

Stéphane LANDELLE

unread,
Apr 22, 2016, 12:47:27 AM4/22/16
to gat...@googlegroups.com
Please provide a reproducer and we'll be able to investigate.

Cheers,

Stéphane Landelle
GatlingCorp CEO


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jay Ken

unread,
Apr 22, 2016, 11:13:35 AM4/22/16
to Gatling User Group
Thanks Stephane!

I have provide the steps below to reproduce the problem, Meantime, I have downloaded the gatling source, built with sbt and would like to debug the code. 

Can you provide me steps to setup gatling source with IntelliJ? And built it again as distribution for testing my gatling script? 

That will be great if you could help fix the timeout issue. Steps to reproduce problem - 

1. Have a file (.csv) with 10,000 lines, with roughly 200 chars in each line.
2. Run multipart request using gatling.

exec(
http("file_upload")
.headers(headers_file_upload)
.bodyPart(RawFileBodyPart("file", "people.csv").contentType("text/csv").fileName("people.csv")).asMultipartForm
.check(status.is(200))
)

3. If above file takes more than 1.30 minutes, gatling will close the connection after 75 second. with the exception on the console provided in the initial post.

Thanks,
Jay

Jay Ken

unread,
Apr 25, 2016, 11:28:51 AM4/25/16
to Gatling User Group
Folks,

Where do we track bugs for Gatling? I will just file this request timeout defect for tracking purpose.

Thanks,
Jayant K Kenjale

Stéphane LANDELLE

unread,
Apr 26, 2016, 4:58:55 PM4/26/16
to gat...@googlegroups.com
Github. But only fill an issue if you're able to provide a way to reproduce your issue.

Stéphane Landelle
GatlingCorp CEO


Jay Ken

unread,
Apr 28, 2016, 2:26:58 PM4/28/16
to Gatling User Group
Folks,

Just to get to the closure. This issue is been solved, the timeouts seem to work as expected. 

I added  /conf as source to my IntelliJ project and it worked.

Thanks,
Jay

Archana Singh

unread,
May 3, 2017, 6:52:23 AM5/3/17
to Gatling User Group
Hello, Even I want to get rid of this timeout exception. 
Currently, I am running my simulation from command-line using <gatling_home>/bin/gatling.sh. My simulation file is situated at <gatling_home>/user-files/simulations/. I have the conf file at <gatling_home>/conf.
May you elaborate what it means to 'add /conf as source to my project' ? 

Thanks,
Archana.

Kumar Vinod

unread,
Jan 10, 2019, 3:24:26 PM1/10/19
to Gatling User Group
Hi Jay,
can you please let me know step to add /conf as source to avoid timeout

Regards,
Vinod
Reply all
Reply to author
Forward
0 new messages