The BlockedThreadChecker causes a lot of stdout when debugging vert.x code. This question relates to vert.x 3.
VertxOptions options = new VertxOptions();
options.setBlockedThreadCheckInterval(1000*60*60);
https://groups.google.com/forum/#!searchin/vertx/BlockedThreadChecker/vertx/MWx8ma7Ig4o/rFqdYdDErtYJ
NOTE: Disable only for debugging. Otherwise issues which can affect the performance of Vert.x can't be located easily.
Alternatively you can add the following system property to the vertx startup script, will set the event loop execute time to 10 seconds (note the input is in NS):
-Dvertx.options.maxEventLoopExecuteTime=10000000000
For anybody interested on this, in case you don't want to change vertx options, you can set the log level to ERROR
or OFF
for BlockedThreadChecker
.
Configuration in logback.xml will look something like this:
<configuration>
...
<logger name="io.vertx.core.impl.BlockedThreadChecker" level="OFF" />
...
</configuration>
Our thread blocking issues are during deployment so we simply turn off logging dynamically during deployment and turn it back on once that's complete log4j2 this looks like:
org.apache.logging.log4j.core.Logger threadStuckLogger = (org.apache.logging.log4j.core.Logger)LogManager.getLogger(BlockedThreadChecker.class);
Level threadStuckLevel = threadStuckLogger.getLevel();
threadStuckLogger.setLevel(Level.ERROR);
// deploy....
threadStuckLogger.setLevel(threadStuckLevel);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With