Closed antoine21c closed 1 week ago
Thanks for the report
See #342. Can you supply a standalone script that demonstrates the issue? Similar code to the code you have supplied has been run without detecting any memory leaks, so it may be a specific configuration. Please also supply the Oracle Client library version that you are using. Thanks.
Hello @anthony-tuininga , We are using the version 21.14.0.0.0 of the client. Here is a quick standalone script that correctly replicates the issue on our end.
standalone_script_mem_leak.zip
Please do let me know if you need any other info from us. Thank you.
Thanks, @L-Moron, that was helpful. I can replicate the issue. It appears to be an issue with the Oracle Client libraries but that needs to be confirmed. Will get back to you! The size of the leak is directly proportional to the number of elements that you are attempting to dequeue at a time. Reducing that value will mitigate the problem considerably. It also runs considerably faster! On my machine having a length of 10,000 took 25 seconds to run whereas with a length of 100 it took only half a second. Until this issue is resolved I would recommend reducing the size of your array, especially if you know the number of messages is going to be considerably less than that!
I have confirmed that this is a problem with the Oracle Client libraries. This has been logged as bug 36741214. A possible fix has also been confirmed. You can follow up with Oracle Support but there is nothing that can be done for this issue in python-oracledb.
What versions are you using?
oracledb 2.2.1
Give your database version.Oracle 23c
Is it an error or a hang or a crash?
error
What error(s) or behavior you are seeing?
We have a project working with OracleAQ Queues. Python code sample using python-oracledb 2.2.1 can be find below. From a new Python thread, a connection is created from a pool, get 2 queues then try to deqmany (issue is found with any values -- 1000 or 20000). We noticed that the memory is never freed after calling deqmany. Same behavior if the connection is released at each iteration (is it recommended though?).
Yes
Include a runnable Python script that shows the problem. queue configuration: `
`
`
`