Nodejs module for mysql - Connections in pool not showing in status
<p>I want to use mySQL nodeJs connection pooling in the felixge Node module.<br>
It appears to work fine except that I am not sure how to find if its really working, as intended. The pool connection params, passed to mysql.createPool() are:</p>

<pre><code>  dbConnectionParams = {
                  connectionLimit: 20,
                  host: 'localhost',
                  user:   'jdoe',
                  password:'somepasswd',
                  database: 'myDB'
  };
</code></pre>

<p>All queries using connections from the pool work fine. However, when I try to see the actual connections using "show processlist" I see about 4 to 8 connections at any time, never 20. Should these not be listed too? Is there any other mySQL statement to see them or are they not opened until we actually need them? If so, is there any way to force open them so that later, when the connection is actually needed, there is no time lost in opening them?  </p>

<p>I have read the documentation which states that "connections are lazily created by the pool." I thought that the whole idea of pooling is to circumvent this so they are not opened on an as-needed (lazy?) basis but are pre-opened.</p>

<p>UPDATE: Here is the output. Am trying to co-relate it to connectionLimit  parameter upon new requests coming in.</p>

<pre><code>+----+------+-----------------+------+---------+------+-------+------------------+
| Id | User | Host            | db   | Command | Time | State | Info                 |
+----+------+-----------------+-------------+---------+------+-------+------------------+
| 38 | jdoe | localhost:50716 | myDB | Sleep   |  669 |       | NULL             |
| 39 | jdoe | localhost       | myDB | Query   |    0 | NULL  | show processlist |
| 41 | jdoe | localhost:50718 | myDB | Sleep   |    4 |       | NULL             |
| 44 | jdoe | localhost:50721 | myDB | Sleep   |    4 |       | NULL             |
| 45 | jdoe | localhost:50722 | myDB | Sleep   |    4 |       | NULL             |
| 46 | jdoe | localhost:50723 | myDB | Sleep   |    5 |       | NULL             |
| 47 | jdoe | localhost:50724 | myDB | Sleep   |    4 |       | NULL             |
| 48 | jdoe | localhost:50725 | myDB | Sleep   |    4 |       | NULL             |
</code></pre>

<p>+----+------+-----------------+-------------+---------+------+-------+------------------+</p>