title: How to prevent concurrency lock on flushBuffer in Spring Boot Tomcat Jackson?
body: <p>I am having issues with concurrency when writing JSON out from my Spring Boot WAR app deployed to Tomcat 8.  In the screenshot from AppDynamics there seems to be a considerable wait when the jackson library is performing _flushBuffer.</p>
  
  <p>This issue arises under load testing for even a small amount (&lt; 10) users.</p>
  
  <p>I have configured the messageConverters in my configuration class.</p>
  
  <pre><code>    @Override
      public void configureMessageConverters(List&lt;HttpMessageConverter&lt;?&gt;&gt; converters) {
          converters.add(new MappingJackson2HttpMessageConverter(
              new Jackson2ObjectMapperBuilder().dateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mmZ")).mixIn(LiquidAssignment.class,
                      InventoryProviderAssignmentMixin.class)
                      .deserializerByType(ActionData.class, new ActionDataDeserializer()).build()));
          converters.add(new MappingJackson2XmlHttpMessageConverter());
      }
  </code></pre>
  
  <p>I am using 
  Spring Boot 1.5.4
  Java 1.8
  Jackson 2.9.7
  Tomcat 8.5.33</p>
  
  <p><img src="https://i.stack.imgur.com/57UJd.gif" alt="AppDynamics screenshot"></p>