Good Day, I use Spring Boot 2.4.0

Problem: If this servlet receives 2 POST requests at the same time - the servlet will process different RequestHeaders, but the same RequestBody

@PostMapping example: SpringBoot Problem with handling concurrent POST requests flowCss(): SpringBoot Problem with handling concurrent POST requests

First POST bash script: SpringBoot Problem with handling concurrent POST requests

Second POST bash script (with a different body): SpringBoot Problem with handling concurrent POST requests

concurrent start script: SpringBoot Problem with handling concurrent POST requests

logs: 1) from IntelliJ IDEA: SpringBoot Problem with handling concurrent POST requests NOTE: [http-nio-8193-exec-1] and [http-nio-8193-exec-2] got different headers (agreenumber, content-lenght), but the same body 2) from server: SpringBoot Problem with handling concurrent POST requests

Comment From: bclozel

Could you provide more details about this issue? It's really hard for us to understand a problem with screenshots and rebuilding a similar app from those takes a considerable amount of time.

My best guess is that the mule object (which is not shown in your screenshots unfortunately) is stored as a class attribute. If this is the case, this means this instance is reused by the controller for concurrent calls. If this is the case, then that's the source of your problem: you should not share state between requests or you risk exactly this type of problems.

If the mule instance is not shared between calls, please provide us with a minimal, sample application (something we can clone or download) so that we can have a proper look.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.