When using sqlite3 pooled connections and executing an update SQL, the connection is never returned back to the pool after the update completes. When using select SQL statements, everything works properly.
Both select and update emit the close event, but only select emits the end event.
It looks like ConnectionPool releases the connection only when it gets the end event. Since end is never emitted with update statements, the connection is never returned to the pool.
When using sqlite3 pooled connections and executing an
updateSQL, the connection is never returned back to the pool after the update completes. When usingselectSQL statements, everything works properly.Both
selectandupdateemit thecloseevent, but onlyselectemits theendevent.It looks like
ConnectionPoolreleases the connection only when it gets theendevent. Sinceendis never emitted withupdatestatements, the connection is never returned to the pool.