-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAP Hana Driver does not drop prepared statement #7344
Comments
Can we get some update here? If I do the PR, will it be merged? |
Any updates on this issue? This gives quite a big performance impact on applications using SAP HANA...🥲 |
No updates I can see. I could do a PR to fix it, just wanna get some heads up first, not to waist time producing a rejected PR |
Or write the PR. It's not a huge change to make? |
I created a PR. Can you test that it corrects the issue? |
Added review, think drop in finally might execute before callback is called. I tested it with drop as first thing in the callback statement.drop((err) => { Sorry, used the phone |
Issue Description
After certain amount of db queries, an error occurs due to exceeded maximum number of prepared statements
Expected Behavior
Single connection should be able to execute infinite number of queries and prepared statements should be closed/dropped when db lib does do it automatically.
Actual Behavior
Error message obtained
Steps to Reproduce
Setup a nestjs with typeorm simple app on SAP hana db, define one entity, and in a loop run inserts for that entity. This brakes after ~34k of inserts
My Environment
Additional Context
SapQueryRunner.query()
is doingdatabaseConnection.prepare()
but not doingstmt.drop()
in the callback. In my test, after modifying local copy of the file withNote that patch is done on the compiled js in my local node_modules... Typescript would look different ofc.
I am able to go pass the 34k of inserts w/out the error state above. Let it running all the way up to 200k
Please verify error handling stated above is ok - if I'm gonna do the PR
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: