Legacy Knowledge Base
Published Sep. 10, 2025

In a thread dump there are many blocked threads inside InitFilter class

Written By

Javier Moral

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • When I analyze a thread dump there are multiple threads in BLOCKED status with stacktraces such as this:
"http-nio-8080-exec-129" Id=325 BLOCKED on com.liferay.portal.init.servlet.filter.internal.InitFilter@4334dad owned by "http-nio-8080-exec-130" Id=326
at com.liferay.portal.init.servlet.filter.internal.InitFilter.processFilter(InitFilter.java:51)
- blocked on com.liferay.portal.init.servlet.filter.internal.InitFilter@4334dad
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
...

Environment

  • Liferay DXP 7.0+

Resolution

  • When starting the server, even though the aplication server and DXP web application startup has completed, there are some resources that are lazily initialized upon receiving the first request. This caused that, if many requests were received at once before this first request is answered, errors were shown in the log because these resources had not yet been initialized.

    To avoid generating these errors, the initFilter was developed that only lets the first request pass (triggering this initialization of resources) and blocks the remaining requests until this first one is answered.

    For this reason it is always recommended, before external traffic reaches the node, to send first a warm-up request and then expose the node to external traffic. This way these blocks will be avoided if a large number of requests arrive at the same time when the node has just been started.

Did this article resolve your issue ?

Legacy Knowledge Base