Hello! I've started to experiment with Hyperdrive + `mysql2` but I've ran into memory leak problems

Hello!

I've started to experiment with Hyperdrive + mysql2 but I've ran into memory leak problems just by running the SHOW TABLES example from the Hyperdrive tutorial (https://developers.cloudflare.com/hyperdrive/examples/connect-to-mysql/#mysql2)

I've created a new Nitro eventHandler with the example code and ran the it 25 times and noticed that the Connection objects are not collected by GC.

Interestingly, if change the the query to only run a single
SELECT
on a table, the connection is closed and collected by GC.

I tried to run more complex queries using drizzle and had the same issue.
image.png
Was this page helpful?