0

In our production server we found intermittent pause in execution between 2 lines of code. We are using Wildfly server v9 with JAVA v8. log4j for logging.

What could be the possible reason for such pause in execution?

We have already checked CPU usage which found normal. Also checked GC logs and not found GC pause time during that time period.

Application log:

2020-01-24 06:39:03,473 DEBUG [com.test.control.common.TestController] (default task-231) ## Response Data: 
2020-01-24 06:39:03,485 DEBUG [com.test.control.common.TestController] (default task-231) TimeTaken to display results:[340]
2020-01-24 06:39:09,792 DEBUG [com.test.control.common.TestController] (default task-231) Exit: SEARCH_FILTER_DATA
2020-01-24 06:39:09,793 DEBUG [com.test.control.common.TestController] (default task-231) Exit: TestController

Code Snippet:

if(log.isDebugEnabled())
                log.debug("TimeTaken to display results:[" + (endTime - startTime) + "]");
if(log.isDebugEnabled())
                log.debug("Exit: SEARCH_FILTER_DATA");
Jay M Harkhani
  • 151
  • 1
  • 8
  • 1
    It could be that the first log line caused the logs to be flushed and that was done in a blocking manner (I don't know if log4j would do any required flushing on a separate thread to separate the app itself from any lag introduced by that, but there are reasons why it would not ...). A random IO spike of 6 seconds seems more likely than just "bad luck with thread scheduling". Alternatively if your system is running as a VM then even something as a (very quick) VM migration could be to blame for such a pause. – Joachim Sauer Jan 24 '20 at 10:40
  • It could just be that some more processing intensive task with a higher priority took over the CPU. – hakish Jan 24 '20 at 15:07

0 Answers0