Hi Gals and Guys,

do you mind thinking about my observation:

My controller has a single endpoint which serving a json object.

I tried this one:

@GetMapping(/whatever)
fun justDoIt() {
    throw MyNoContentException()
}

having one MyNoContentException, return annotated by @ResponseStatus(HttpStatus.NOT_FOUND)

vs

@GetMapping(/whatever)
fun justDoItDifferent() {
    return ResponseEntity.noContent().build()
}

So the first endpoint had massive problems with performance, having big latencies. The seconds works perfectly fine.

What is the point, I don't get here? Isn't it the way, the ExceptionResolver should work? Why do I have just problems with the first solution?

Kind regards

Comment From: bclozel

I can't think of anything that could cause this latency issue. Can you provide a sample application that reproduces the problem? Ideally, an application created with https://start.spring.io that we can git clone and run.

Comment From: msolmaz-ottode

Hi @bclozel,

thanks for the fast reply. I can't share production code, but what I can tell is, that we are running on a jetty server. Here are some version numbers:

plugins {
    id("org.springframework.boot") version "2.6.7"
    id("io.spring.dependency-management") version "1.0.11.RELEASE"
    kotlin("jvm") version "1.6.21"
    kotlin("plugin.spring") version "1.6.21"
...
}
...
    implementation("org.springframework.boot:spring-boot-starter-aop")
    implementation("org.springframework.boot:spring-boot-starter-logging")
    implementation("org.springframework.boot:spring-boot-starter-actuator")
    implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
    implementation("org.springframework.boot:spring-boot-starter-web")
    implementation("org.springframework.boot:spring-boot-starter-webflux")
...
...
implementation("org.springframework.boot:spring-boot-starter-jetty")
implementation("org.eclipse.jetty.http2:http2-server")
...

If I figure out, if there are any Exception catching Aspects or anything like that, I'll report it here.

Kind regards

Comment From: msolmaz-ottode

Hi Gals and Guys,

found out, the the Issue was not a problem with any ExceptionResolvers. It was an issue with the underlying server, which had massiv problems with too much logging. The resolver logged every exception and that caused the issues, not the resolver itself.

Thanks again, this issue can be closed