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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>No, thanks. But you can verify the solution. I give me some days, because I’m on vacation. Next week, I will commit in the master branch some updates, which should fix the issue with 4.0 and DocumentDB. If you verify, that the commits fix your issue, I will release a new version. Thanks for reporting this issue.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="263908" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-263908" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="263908"
                     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="263910" data-post-id="263910">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fireproofsocks" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fireproofsocks/120/7669_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fireproofsocks
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Sounds like a plan!  Enjoy your vacation, and thanks for the consideration!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="263910" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-263910" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="263910"
                     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="264220" data-post-id="264220">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I committed a fix on the master branch. Feel free to test it. If it is working like expected, then I will draft a new release for the fix!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="264220" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-264220" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="264220"
                     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="264496" data-post-id="264496">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fireproofsocks" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fireproofsocks/120/7669_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fireproofsocks
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve tested the <code>master</code> branch changes locally on Mongo 4.0 and on our production stack running DocumentDB and it works!  I set <code>log: true</code> in my config – Mongo 4.0 complains a little with errors like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">17:18:25.177 application=db_connection module=DBConnection function=log_raised/4 [error] an exception was raised logging %DBConnection.LogEntry{call: :execute, connection_time: 5655000, decode_time: 21000, idle_time: 498146000, params: [], pool_time: 179000, query: %Mongo.Query{action: {:exec_hello, []}}, result: {:ok, %Mongo.Query{action: {:exec_hello, []}}, {%{"ismaster" =&gt; true, "localTime" =&gt; ~U[2022-10-11 21:18:25.189Z], "logicalSessionTimeoutMinutes" =&gt; 30, "maxBsonObjectSize" =&gt; 16777216, "maxMessageSizeBytes" =&gt; 48000000, "maxWireVersion" =&gt; 7, "maxWriteBatchSize" =&gt; 100000, "minWireVersion" =&gt; 0, "ok" =&gt; 1.0, "readOnly" =&gt; false}, %Mongo.Events.CommandStartedEvent{command: :hello, command_name: :hello, connection_id: #PID&lt;0.535.0&gt;, database_name: "admin", operation_id: nil, request_id: 2}, 0, 5565}}}: ** (BadFunctionError) expected a function, got: true
    (db_connection 2.4.2) lib/db_connection.ex:1532: DBConnection.log/2
    (db_connection 2.4.2) lib/db_connection.ex:1510: DBConnection.log/5
    (mongodb_driver 0.9.2) lib/mongo.ex:1526: Mongo.exec_hello/2
    (stdlib 3.16.1) timer.erl:166: :timer.tc/1
    (mongodb_driver 0.9.2) lib/mongo/monitor.ex:239: Mongo.Monitor.get_server_description/1
    (mongodb_driver 0.9.2) lib/mongo/monitor.ex:164: Mongo.Monitor.update_server_description/1
    (mongodb_driver 0.9.2) lib/mongo/monitor.ex:151: Mongo.Monitor.handle_info/2
    (stdlib 3.16.1) gen_server.erl:695: :gen_server.try_dispatch/4
</code></pre>
<p>But it works fine!  Just like it did with <code>0.9.1</code>.</p>
<p>On the DocumentDB instance, no errors are logged at all.  So this is looking pretty good to me.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="264496" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-264496" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="264496"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="264575" data-post-id="264575">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you for the response. I will check the error, that you mentioned!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="264575" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-264575" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="264575"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="264763" data-post-id="264763">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Ok, I think, you used the wrong log configuration from the DBConnection module:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">   * `:log` - A function to log information about a call, either
    a 1-arity fun, `{module, function, args}` with `t:DBConnection.LogEntry.t/0`
</code></pre>
<p>But you should use:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :mongodb_driver,
  log: true
</code></pre>
<p>in your config file. I think, the logging issue in your example is cleared. I will provide a new release in the next few days.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="264763" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-264763" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="264763"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="264772" data-post-id="264772">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fireproofsocks" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fireproofsocks/120/7669_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fireproofsocks
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hmm… the error is there when <code>log: true</code> is passed as an option, e.g.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">iex&gt; Mongo.start_link([url: "mongodb://localhost:27017/my_dev", name: :my_mongo, log: true])
{:ok, #PID&lt;0.338.0&gt;}
iex(3)&gt; [error] an exception was raised logging %DBConnection.LogEntry{call: :execute, connection_time: 3939000, decode_time: 1434000, idle_time: 2857000, params: [], pool_time: 19000, query: %Mongo.Query{action: {:exec_hello, []}}, result: {:ok, %Mongo.Query{action: {:exec_hello, []}}, {%{"ismaster" =&gt; true, "localTime" =&gt; ~U[2022-10-14 14:13:36.151Z], "logicalSessionTimeoutMinutes" =&gt; 30, "maxBsonObjectSize" =&gt; 16777216, "maxMessageSizeBytes" =&gt; 48000000, "maxWireVersion" =&gt; 7, "maxWriteBatchSize" =&gt; 100000, "minWireVersion" =&gt; 0, "ok" =&gt; 1.0, "readOnly" =&gt; false}, %Mongo.Events.CommandStartedEvent{command: :hello, command_name: :hello, connection_id: #PID&lt;0.339.0&gt;, database_name: "admin", operation_id: nil, request_id: 0}, 0, 3920}}}: ** (BadFunctionError) expected a function, got: true
    (db_connection 2.4.2) lib/db_connection.ex:1532: DBConnection.log/2
    (db_connection 2.4.2) lib/db_connection.ex:1510: DBConnection.log/5
    (mongodb_driver 0.9.2) lib/mongo.ex:1526: Mongo.exec_hello/2
    (stdlib 3.16.1) timer.erl:166: :timer.tc/1
    (mongodb_driver 0.9.2) lib/mongo/monitor.ex:239: Mongo.Monitor.get_server_description/1
    (mongodb_driver 0.9.2) lib/mongo/monitor.ex:164: Mongo.Monitor.update_server_description/1
    (mongodb_driver 0.9.2) lib/mongo/monitor.ex:151: Mongo.Monitor.handle_info/2
    (stdlib 3.16.1) gen_server.erl:695: :gen_server.try_dispatch/4
 [metadata]
</code></pre>
<p>It’s referencing the <code>master</code> branch, commit <code>d7c8652b4e66a0031e1a7fe36bc2af5c85cef408</code> is in the <code>mix.lock</code>.  However, if I set the option in the config (instead of passing it as an option), I don’t get the error.</p>
<p>And to be thorough, here’s how I installed Mongo:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">docker pull mongo:4.0.0
docker run -p 27017:27017 -d --name mongo mongo:4.0.0
</code></pre>
<p>However, this error has been there for a while (including in 0.9.1) and everything is working – I just never noticed the error because I had never enabled the <code>:log</code> option, and the message doesn’t appear when the same code connects to AWS DocumentDB. So it may not be worth trying to squash the error for older versions of Mongo.  Or if the <code>hello</code> stuff is specific to different versions, then maybe the code could be isolated into its own module and overridden via config or something.</p>
<p>Thank you for making such a great package and for maintaining it so vigorously!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="264772" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-264772" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="264772"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="264791" data-post-id="264791">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>All good! To make it clear: the log option is not part of the driver, it belongs to DBConnection, that is another package. You configure the logging in the config file.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="264791" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-264791" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="264791"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="265768" data-post-id="265768">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fireproofsocks" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fireproofsocks/120/7669_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fireproofsocks
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Are you ready to tag/release 0.9.3?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="265768" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-265768" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="265768"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="267307" data-post-id="267307">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Currently, I’m working on some improvements like migration, the collection load and dump function. After this is done I will publish a new release.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="267307" 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/mongo-connection-times-out-but-only-when-it-is-used-by-a-dependency/50776/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-267307" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="267307"
                     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 #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/50776/load_more?page=3">Load more posts (1 remaining)</a>
</div></template></turbo-stream>