Skip to main content

Content Starts Here

How to avoid the socket timeout exception during load testing?

Question
How to avoid the socket timeout exception during load testing?
Answer
Under the load, your server may start processing requests slower. If it takes the server more than 60 seconds to provide a response, ReadyAPI will stop waiting for it and close the connection by timeout. In this case, you may see the "java.net.SocketTimeoutException: Read timed out" errors in the logs.
 
To avoid this situation, you can increase the timeout value which is set to 60 seconds by default. The timeout is controlled by the “Socket timeout” global setting in Preferences > HTTP and the “Socket timeout” setting under the TestCase options. Note that no value or 0 means that the default value (60 sec) is used.​

Also, the server may have a limit on a number of connections that can be open. During load testing, there can be a large number of open connections, so it is easy to reach the limit and get an error. To avoid this, set the "Close connections after request" value in Preferences > HTTP to true.
Previous MonthNext Month
SunMonTueWedThuFriSat