Sudden increase in MySQL prepared statements with Kill Bill

27 views
Skip to first unread message

Pardos Dedondo

unread,
Aug 26, 2025, 11:12:58 AM (13 days ago) Aug 26
to Kill Bill users mailing-list

Hello everyone,

I’m running Kill Bill 0.24.9 on Tomcat 8.5.98 with MySQL 8.0.32, and I recently started experiencing the following error:

Can't create more than max_prepared_stmt_count statements

What puzzles me is that nothing has changed in my setup or workload compared to the past. For a long time, the system was stable around ~14,000 prepared statements (with MySQL’s default max_prepared_stmt_count set to 16382), but now the counter keeps growing until it hits the limit.

Here is my current configuration:

  • org.killbill.dao.maxActive = 200

  • all prepStmtCacheSize = 500

  • MySQL max_prepared_stmt_count = 16382

I followed the usual checks:

  • Monitored Prepared_stmt_count over time

  • Verified the number of active connections in the pool

  • Reviewed JDBC driver parameters (useServerPrepStmts, cachePrepStmts, etc.)

  • Confirmed that there were no changes in Kill Bill, plugins, or workload

So far, I don’t see anything unusual, and the increase in prepared statements seems to have started happening “out of the blue.”

Has anyone else encountered this behavior with Kill Bill 0.24.x or with MySQL Connector/J? Could this be related to a driver update or a subtle configuration change in how prepared statements are handled (server-side vs. client-side)?

Any insights or suggestions would be greatly appreciated.

Thanks a lot,

Pardos

karan bansal

unread,
Sep 4, 2025, 12:17:14 PM (4 days ago) Sep 4
to Kill Bill users mailing-list
Hi Pardos,

is this issue happening at any particular time/during any particular process OR is it happening randomly. Could you please confirm what all plugins are installed in your KB setup.

Regards
Karan

Reply all
Reply to author
Forward
0 new messages