0

I am using HTTP client to send data to the server using persistent http connections. The data which is approximately 12 MB and is sent on the connect as a byte array on the HTTPRequest. While doing so the connection fails with the following error.

"[write] I/O error: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Software caused connection abort: socket write error"

this happens after a certain amount of data is written on the connection and the failure happens abruptly. I know there is a proxy and a load-balancer in between. But cant run fiddler to diagnose where exactly the connection is closed.

The server is JBOSS 6.4, and I have tried with a large max header size configured, but the connection still fails. This normally does not happen with a lot of small HTTP requests, but only fails when the data is large.

Any way I can diagnose the actual reason as to why the connection was closed and how i can avoid it.

frewper
  • 1,385
  • 6
  • 18
  • 44

1 Answers1

1

You did not indicate at what point the request is terminating is it at the load balancer or proxy level.

However, there is a property in Tomcat, maxSwallowSize check if Jboss has a similar property and configure it in the Jboss server.

For troubleshooting purposes you can deploy the artifact in Tomcat and see if the property actually solves your problem.

Kinglee
  • 53
  • 1
  • 8
  • I cant conclude as to who is terminating the request because I don have access to the network. Its a limitation at my end – frewper Apr 20 '19 at 12:39
  • In that case, you will need to get in touch with the people that maintain those servers for server logs and settings. Normally application servers come with default settings, for example, Apache Tomcat server normally comes with a default setting of 2mb for request body size. It is likely that the cause error could be the request body size. However, the server logs will give a more reliable insight into the cause of the error. – Kinglee Apr 21 '19 at 13:21
  • yes, I was able to get request body size increased, but that did not exactly solve the problem. I will have to get access to the settings on the proxy and the loadbalancer and find out which one of em is terminating the connection. – frewper Apr 21 '19 at 19:50
  • Yeah, that will help a lot. – Kinglee Apr 23 '19 at 08:46
  • Was able to analyse the loadbalancer and figured there was a limit set on the HTTP request body size. Was able to resovle this by sending the request payload data in chunks, via multiple requests. – frewper Apr 26 '19 at 11:10
  • Okay, glad you were able to improvise. Happy coding! – Kinglee Apr 26 '19 at 18:10