vapor / mysql-nio

🐬 Non-blocking, event-driven Swift client for MySQL.
MIT License
87 stars 28 forks source link

Prepared statements might not be properly closed #30

Closed jdmcd closed 4 years ago

jdmcd commented 4 years ago

After running my server for ~48 hours with steady traffic all database queries started throwing Can't create more than max_prepared_stmt_count statements. I fixed this issue by restarting the server and the error went away (although I assume it will return in the near future).

I'm betting that somewhere the prepared statements aren't getting closed properly and are retained, starving other requests. Unfortunately I don't know enough about this codebase to try and find the exact place that would be happening.