See the picture below for details.

Spring Proxy method(cglib.proxy.MethodInterceptor:intercept()) takes too long to execute.

Comment From: c00451707

The proxy method is dynamically generated by Spring, so it is strange that the execution is slow.

Comment From: bclozel

Could you provide a sample, minimal application that reproduces this problem? Screenshots aren't enough for us to understand what's going on.

Comment From: c00451707

Could you provide a sample, minimal application that reproduces this problem? Screenshots aren't enough for us to understand what's going on.

After a preliminary analysis, it is a problem caused by Spring transactions. 7 concurrent requests call the interface of this service, causing the database access of the system to be stuck.

Comment From: c00451707

Call a method with transactions concurrently, which uses feign to call an interface of this service, which also has transactions. The problem phenomenon is: the set concurrency degree is clearly 20, but the actual concurrency degree becomes 7. And the methods are blocked where the feign interface is called. If I remove the transaction of the method, the actual concurrency can be changed to 20, and the feign call will not block.

Comment From: c00451707

Spring Proxy method(cglib.proxy.MethodInterceptor:intercept()) takes too long to execute.

Spring Proxy method(cglib.proxy.MethodInterceptor:intercept()) takes too long to execute.

Spring Proxy method(cglib.proxy.MethodInterceptor:intercept()) takes too long to execute.

Comment From: c00451707

I suspect that it is affected by the related configuration of the database transaction, causing Spring to block when executing the Aop aspect of the transaction.

Comment From: bclozel

Since it seems to be a configuration issue, I'm closing this issue for now. We can reopen it if you can provide a sample application showing this is a bug. Thanks!

Comment From: c00451707

This problem is solved. The problem is that the transaction caused by concurrency has not been released, and the database connection has not been released. Causes new requests to be blocked while obtaining a database connection (maxWait is the default value -1)