Profile Image
LCZ

How to troubleshoot the problem of springboot pseudo-death caused by undertow and XNIO thread blocking?

I excluded the default Tomcat in SpringBoot and chose Undertow as the web container. My server specification is 4 cores and 8GB. Undertow is configured as max-http-post-size: -1, buffer-size: 1024, direct-buffers: true, threads.io:8, threads.worker:1024. However, my program is prone to pseudo-death, that is, the thread is blocked, the CPU is normal, and the server memory is normal. How can I solve this problem?


Report URL - https://fastthread.io/my-thread-report.jsp?p=c2hhcmVkLzIwMjQvMTEvMTUvY2hhdF9hZ2VudC0tOC00MS0xMA==

    Please Sign In or to post your comment or answer

    Profile Image

    Unni Vemanchery Mana


    Hello LCZ,

    Looks like some other components in the application is creating the issue. The thread report looks normal as there are no issues reported.
    But, there is one database logging compoent is used in the application. It is a good idea to check that component and its configuration.

     

    Profile Image

    Briony

    Hello there

     

    Start by looking through thread dumps to find blocked threads, in the XNIO worker pool; in order to troubleshoot the spring boot pseudo death brought on by undertow and XNIO thread blockage.

    To enable extra threads for handling requests, increase the workerThreads option in undertow. Examine XNIO threads for blocking operations, such as lengthy database searches; transfer these jobs to a different thread pool or use async for asynchronous processing.

    To prevent thread depletion, check connection pool configuration and make sure thread management is correct. 

    Got something else on mind? Post Your Question