Anmol Sarraf wrote:
Hi Team,
While uploading a file of 280MB via jmeter, I am getting a socket write
error. I did increase the connection timeout to 10mins but still it gives
an error. What should I do?
Response code:Non HTTP response code: java.net.SocketException Response
message:Non HTTP response message: Software caused connection abort: socket
write error
-----------
java.net.SocketException: Software caused connection abort: socket write
error at java.net.SocketOutputStream.socketWrite0(Native Method) at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) at
java.net.SocketOutputStream.write(SocketOutputStream.java:155) at
org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124)
at
org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:136)
at
org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:167)
at
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:113)
at
org.apache.http.entity.mime.content.FileBody.writeTo(FileBody.java:121)
at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$ViewableFileBody.writeTo(HTTPHC4Impl.java:1517)
at
org.apache.http.entity.mime.AbstractMultipartForm.doWriteTo(AbstractMultipartForm.java:134)
at
org.apache.http.entity.mime.AbstractMultipartForm.writeTo(AbstractMultipartForm.java:157)
at
org.apache.http.entity.mime.MultipartFormEntity.writeTo(MultipartFormEntity.java:113)
at
org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156)
at
org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:152)
at
org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)
at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$2.doSendRequest(HTTPHC4Impl.java:462)
at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:939)
at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:650)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1301)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1290)
at
org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:651)
at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:570)
at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268)
at java.lang.Thread.run(Thread.java:750)
Thanks and Regards,
Anmol
Take a look at WSAECONNABORTED - An understandable explanation.
<http://www.chilkatsoft.com/p/p_299.asp>
My guess is that your request gets malformed somehow (invalid
content-length, too large, whatever) hence the system under test doesn't
accept it. JMeter either retries the request or tries to finish it using
the socket connection which doesn't exist anymore.
So I would recommend
1. using a sniffer tool like Wireshark <https://www.wireshark.org/> to
see what exactly breaks the connection, what are the TCP flags, how does
request look like, etc.
2. making sure you're following JMeter Best Practices
<https://www.blazemeter.com/blog/jmeter-memory-profiling> and it has
enough headroom in terms of CPU, RAM, etc.
3. If you're uploading lots of 300MB files concurrently you can consider
switching to HTTP Raw Request sampler
<https://jmeter-plugins.org/wiki/RawRequest/> which has a feature of
directly streaming the file to the system under test
<https://groups.google.com/g/jmeter-plugins/c/VDqXDNDCr6w> without
loading it into memory first
4. As a workaround you can also try switching Implementation of the
request to Java and see if it helps
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org