Closed nikhil-lambda closed 4 years ago
This issue exists due to the timeout configuration in Nightwatch.
Since Nightwatch internally dependent on Axios
, So as per Axios
documentation.
Axios link: https://github.com/axios/axios/blob/master/lib/adapters/http.js#L256
// Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
250: // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
251 // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
252 // And then these socket which be hang up will devoring CPU little by little.
Resolution Increasing the timeout in Nightwatch will fix this issue. The recommended value for it 60000 ie.
test_settings: {
default: {
request_timeout_options: {
timeout: 60000,
}
}