How to investigate crashes #446
Replies: 5 comments 1 reply
-
What version of python-oracledb? You mention a DLL. Are you on Windows? Try passing the lib_dir parameter in your init_oracle_client() call. Define 'crashes'? I assume you mean halts, or did you mean seg faults? Seeing ORA-4011 in Thin mode probably means your DB requires NNE. Confirm this is the cause of that behavior by following https://python-oracledb.readthedocs.io/en/latest/user_guide/troubleshooting.html#dpy-4011 (for future readers, python-oracledb 3.0 will print a different, better message when NNE or checksumming is required). If your DB does require NNE, then continue to call init_oracle_client(). When setting retry_count, you might want to bump up retry_delay if you are having connection issues. What logging do you have available to you? You said "depending on how this is run". What happens in the other cases? What are those cases? Some thoughts: remove the |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer. Indeed I am on windows. I passed the directory and j have the "load by OS successful". By crash I mean getting a dump file, a windows event about an error and my service being stopped. I have the logging library already loaded on this script and can add pretty much whatever I need but for now I couldn't find anything concluant. The problem is that it's not even going in the except part, it's exiting before and I do not have any detail on why in the cmd.. |
Beta Was this translation helpful? Give feedback.
-
I also tried to modify retry_coubt and retry_delay but it instantly crash. If I run the script differently (manually on the server) i have no problem, if I run it from an automated tool it does crash (I am doing the same thing for various other things such as SQL dB or postgres and have no issue + when there are issues it's caught in the try except first time it's crashing like that) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hello,
Context :
I have a script similar to the below in a script imported in a Django-Q cluster :
If I do not put the oracledb.init_oracle_client() I have an error
DPY-4011: the database or network closed the connection
My problem is that depending on how this is run (if I run it manually on the machine or if it's run automatically by another tool) the script crashes right after printing "Starting".
I run my Django clusters specifying the Python version I want to use so they should have the same.
I do not have much information on the EventViewer (complaining about a faulting module name KERNELBASE.dll)
I tried to change the connection to use the pool without success.
Questions :
Why would a simple oracledb.connect() crash my Python service (especially if inside a try except) ?
Is there a way to get some logs on the oracle side ? I tried to change the envrionment variable "DPI_DEBUG_LEVEL" to 64 but there might other ways to get some information about what's happening on the Oracle side.
Thanks in advance,
Beta Was this translation helpful? Give feedback.
All reactions