Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
WebFlux JSON request body garbled under heavy load [SPR-17193] #21728
Running a load test against a webflux application, I experienced garbled requests under (moderately) heavy load: once in a while (i.e. 1 in 10 to 50.000 requests), the deserialization of the request body into the
In these bad results, field values are set to another field's value - but truncated to the lenght of the original field.
Garbeled Request (example):
The error only appears with authentication (basic auth) enabled.
I've created a test project to reproduce and better describe the error:
Reference URL: https://github.com/mkutter/netty-webflux-load
Rossen Stoyanchev commented
I ran the JMeter script many times, and from what I've seen so far the data always arrives as a single chunk, and is fed as a one byte array into Jackson's
When Spring Security is used, it performs authentication on a dedicated thread to avoid blocking the server thread, so in terms of threads the
I will need to find out if this feature should be disabled for non-blocking parsing but for now if you could confirm that disabling it on the ObjectMapper's JsonFactory works for you too. There is a way to customize the ObjectMapper via WebFluxConfigurer under defaultCodecs.