<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="84579" data-post-id="84579">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Green4ao" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Green4ao/120/9967_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Green4ao
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Same error..distro: Antergos Gnome, Erlang 20.3.7 and Elixir 1.6.5</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="84579" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-postgres-poolboy-time-outs-after-a-few-queries/14468/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-84579" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="84579"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="85799" data-post-id="85799">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="miha" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  miha
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>same error here, but only on a production server. Running Arch Linux on both dev and prod machines.<br>
Erlang 20.3.8, Elixir 1.6.5. postgresq db has only four tables with a maximum of 10 rows.</p>
<p>The main question is, how to debug this in production to find the source of the error.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="85799" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-postgres-poolboy-time-outs-after-a-few-queries/14468/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-85799" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="85799"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="87715" data-post-id="87715">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="amagdas" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/amagdas/120/11939_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  amagdas
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This looks to be fixed by Erlang: <a href="https://github.com/elixir-ecto/db_connection/issues/127" class="inline-onebox" rel="noopener nofollow ugc">Timeouts on Poolboy.checkout · Issue #127 · elixir-ecto/db_connection · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87715" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-postgres-poolboy-time-outs-after-a-few-queries/14468/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-87715" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87715"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="87768" data-post-id="87768">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="axelson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/axelson/120/26351_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  axelson
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Scenic Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/amagdas" rel="nofollow">@amagdas</a> Thanks for updating this thread!</p>
<p>This was all fascinating reading:</p>
<ul>
<li>Elixir bug report with initial investigation: <a href="https://github.com/elixir-ecto/db_connection/issues/127" class="inline-onebox" rel="nofollow">Timeouts on Poolboy.checkout · Issue #127 · elixir-ecto/db_connection · GitHub</a></li>
<li>Erlang bug report with c/assembly-level investigation: <a href="https://bugs.erlang.org/browse/ERL-654" class="inline-onebox" rel="nofollow">Redirecting…</a></li>
<li>The patch that fixes the issue: <a href="https://github.com/jhogberg/otp/commit/e27b98b353df6b4d02d0180fd6ffa86519b41917" class="inline-onebox" rel="nofollow">Fix a race condition when generating async operation ids · jhogberg/otp@e27b98b · GitHub</a></li>
</ul>
<p>A high-level summary is that erlang ports updated a shared global counter <code>async_ref</code> in a way that was not atomic. This race-condition has existed for quite a while but on pre GCC 8.1 this variable would only get read once in each thread. But GCC 8.1 (especially with some optimizations enabled) exposed the race-condition and caused <code>prim_inet:recv0/3</code> to hang because it was waiting for the wrong reference (since it was waiting for a reference from a different thread). The bug was fixed by changing the <code>async_ref</code> to be unique per-port (since it doesn’t actually need to be shared between ports). This fix is included in Erlang/OTP 21.0.2.</p>
<p>If I got any of that wrong please feel free to correct it <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="87768" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-postgres-poolboy-time-outs-after-a-few-queries/14468/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-87768" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="87768"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>