title: What problems can two-phase commits cause?
body: <p>Recently I've read multiple times that two-phase commits are bad, but always as a side note. So there was never a good explanation with it.</p>
  
  <p>For example in <a href="https://msdn.microsoft.com/en-us/library/jj591563.aspx" rel="noreferrer">CQRS Journey Chapter 5</a>:</p>
  
  <blockquote>
    <p>Second, we're trying to avoid two-phase commits because they always
    cause problems in the long run.</p>
  </blockquote>
  
  <p>Or in <a href="https://rads.stackoverflow.com/amzn/click/com/0321834577" rel="noreferrer" rel="nofollow noreferrer">Implementing Domain-Driven Design</a> on page 563:</p>
  
  <blockquote>
    <p>The second ReadRecorts() is used by the infrastructure to replicate
    events, to publish them without the need for two-phase commit, ...</p>
  </blockquote>
  
  <p>I thought two-phase commits are implemented to ensure consistency among multiple database servers. </p>
  
  <p>What problems can occur when using two-phase commits? Why is it better to avoid them?</p>