question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unprepare execute on pool

See original GitHub issue
const info = await db.promisePool.execute(query2,updateArr);
        if(info[0].affectedRows){
            db.promisePool.unprepare(query2);

TypeError: _dbcontroller.default.promisePool.unprepare is not a function

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
thibaudscommented, May 16, 2022

Yes, number of clients times maxPreparedStatements in each client config should give you a possible maximum number of prepared statements clients can attempt to create simultaneously

That is exactly what we used thanks to your replies 😃 I guess you can close this old issue that I shamelessly used. Thanks again.

1reaction
sidorarescommented, May 16, 2022

Maybe the cache eviction mechanism cannot keep up with the speed of insertions?

statement.close() unfortunately does not have success/error confirmation at the protocol level, so the client expects the PS to be unprepared as soon as “close statement” command is sent. I can potentially see some out of sync situation here

Yes, number of clients times maxPreparedStatements in each client config should give you a possible maximum number of prepared statements clients can attempt to create simultaneously

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prepared statements with connection pool #51 - GitHub
All queries sent using con.fetch/fetchall/execute/executemany are turned into prepared statements in the background and can be cached in a LRU ...
Read more >
java - Prepared Statements along with Connection Pooling
Prepared Statements are generally tied to one connection only.In our application, a PreparedStatement is created at the start up and executed at ...
Read more >
Using Prepared Statements - Go database/sql tutorial
Here's how it works: When you prepare a statement, it's prepared on a connection in the pool. The Stmt object remembers which connection...
Read more >
Prepared Statements and Pooling - PostgreSQL
I'm working on a project for school that requires a simple java server (a ServerSocket creates Socket connections which I send JSON strings ......
Read more >
Pool Lesson | How to Shoot Every Ball - Step by Step - YouTube
In this pool lesson I am going to show you 10 steps that you should do before every shot, no matter how easy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found