-
Notifications
You must be signed in to change notification settings - Fork 38.5k
MimeType.checkParameters() high processing time #25479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please try latest 5.2.8.RELEASE. |
I don't see a screenshot attached to your bug report. We've made significant performance improvements in the latest releases in this space. Is the behavior you're seeing unusual? With which Spring Framework version this was behaving as expected? I don't this this is related to the issues you're pointing to since the changes were introduced in Spring Framework 5.2 with #22340. Maybe the media types used by your application (or sent by the clients) are a bit unusual and could explain this performance issue? |
@bclozel Please see below Spring Version Content Type Headers |
Could you answer this question as well? |
@bclozel We have been observing higher percentage(>50%) of contribution of that particular method call towards overall processing time. Lets say overall processing time is 1 sec for a single request. More than 50% being spent on that method invocation which seems to be very unusual. Is that something expected with spring 5.0.5 version ? IS the solution is to only upgrade to latest spring versions? |
It all depends on the actual processing time of such requests - if it's really short, let's say a few milliseconds, then it might not be unexpected. As I've said earlier, we've made significant improvements in recent versions in that area - improvements that we cannot backport in earlier versions for stability reasons. Without knowing where to look for, especially in which version this performance problem appeared, I cannot really make progress on this issue: I would just go down the path I've already worked on, which is caching the parsing of media types. Ideally, changing the Spring Framework version (changing dependency version or going back into your project's history) and and checking whether the problem is still there would help narrowing down the problem. Better, maybe you can reproduce this performance problem on a new sample project? The problem is that at this point we don't even know if this behavior was there to begin with, hence why the performance work we did recently - or if there's an unrelated change in the 5.0.x line. |
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. |
I tried to re-produce but not being able to. This issue can be closed for now. |
Thanks for checking! |
I think I found out the truth. It's a bug in jdk.
Calling |
@HaleLu it's been fixed and released with a bunch of JDK versions. Unless you're running an old JDK this shouldn't be a problem. See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8054446 |
@bclozel i know. I just want to explain why this is happening for @arajitsamanta |
Affects:
Spring Boot 2.0.1 RELEASE, Spring Framework 5.0.5 RELEASE
Issue Description:
In a highly concurrent environment(Average 20K transaction per minute) it was observed that 100% of the processing time is being taken by
MimeType.checkParameters()
Attached screenshot of the dynatrace
Wondering if this is something related to #25043 / #24886.
Any solution/suggestion would be helpful
The text was updated successfully, but these errors were encountered: