Closed nedi-dev closed 1 year ago
Since this same issue occurs for you in both idb-connector and node-odbc, I suspect it has nothing to do with the database connector used (and you'd get the same result in pure ODBC or JDBC or whatever).
My guess is this is due to the job keeping the lob locator open or the cursors are only pseudo-closed, keeping resources around. You can try setting OPEN_CURSOR_CLOSE_COUNT or LOB_LOCATOR_THRESHOLD in QAQQINI to have these resources free up sooner: https://www.ibm.com/docs/en/i/7.3?topic=qaqqini-query-options
:wave: Hi! This issue has been marked stale due to inactivity. If no further activity occurs, it will automatically be closed.
From IBM Service we received a PTF for IBM i 7.4 that solved this issue: https://www.ibm.com/support/pages/ptf/SI79954 SI79954 - OSP-DB-OTHER SQL JSON BUILT-IN FUNCTIONS DO NOT RELEASE USED
Describe the bug While using "DB2 for i" nodes in Node-RED for a REST-API-application we discovered a massive usage of temporary memory of QP0ZSPWT-job. It increases the value by 1 MB for 10 requests. Analysis showed that the behaviour occurs in the idb-connector as well as in the odbc package. Finally the usage of a clob-field in a sql view with DB2-JSON-aggregate functions is the root of the problem. All other connection-properties can be neglected.
To Reproduce Steps to reproduce the behavior:
Expected behavior The implementation of CLOB-fields in the driver should be checked for variables whose memory is not released.
Screenshots WRKACTJOB:
Fielddefinition JSON > CLOB![Screenshot 2022-08-30 200235_blurred](https://user-images.githubusercontent.com/64408777/187658646-6a6c212a-5adc-450f-98fa-96971cc6c199.jpg)
SQL and JS-files as attachement: CLOB_examples.zip