fix: use pool instead of single conn for parallel queries
Single MySQL connection cannot handle concurrent prepared statements via Promise.all — causes protocol conflicts and JSON parse errors. Switch all bi.queries.js functions to use pool.execute() (each query gets its own connection from pool). Bump connectionLimit 10→20. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ const pool = mysql.createPool({
|
||||
password: process.env.PW_MYSQL,
|
||||
database: 'cambio_db',
|
||||
waitForConnections: true,
|
||||
connectionLimit: 10,
|
||||
connectionLimit: 20,
|
||||
});
|
||||
|
||||
module.exports = pool;
|
||||
|
||||
Reference in New Issue
Block a user