0

I have a problem. When I call a post rest api with big data (about 35 megabyte in body) this exception is thrown:

org.springframework.web.client.ResourceAccessException: I/O error on POST request for "x": Software caused connection abort: recv failed; nested exception is java.net.SocketException: Software caused connection abort: recv failed 

I am using wildfly web server and set maxPostSize=250961630, but it is not working.

Can someone help me, please?

0

1 Answer 1

1

The problem solved. In Spring boot,you must define multipartConfigElement bean and set value on setMaxFileSize and setMaxRequestSize properties.The code is:

@Bean public MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize("1000MB"); factory.setMaxRequestSize("1000MB"); return factory.createMultipartConfig(); } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.