Closed nikeshkedlaya closed 7 months ago
What's the exact DB version? What OS is Python being run on? Can you share SQL to create the PL/SQL procedure & table?
It would also be useful to include the last packet sent and the last one received when this error occurs. If you set the environment variable PYO_DEBUG_PACKETS
to any value prior to running your script that would be useful. If the packets are large you can e-mail them to me instead of posting here. Hopefully you can provide the PL/SQL procedure and we can replicate it internally.
@cjbj @anthony-tuininga . I have tried making oracle db thick and I could see some errors from database procedure where we connect to different database via dblink. we are verifying that issue. Hopefully the issue is not with oracledb but with database procedure. We can close this issue for now and I will reopen if the error still persists.
Thanks, @nikeshkedlaya. The error you reported is a protocol error which I would like to solve, if at all possible! Since in thick mode you seem to be getting an error, that suggests that thin mode isn't handling that scenario correctly. If you are able to help with the detrmination of a solution, great. If you resolve the issue and can't help, just go ahead and close the issue with whatever information you can provide. Thanks!
Same code with thick mode gives below error
ERROR: 2023-09-27 08:39:11,056 [a58747f2-3934-44] tenancy_report_orm.py:87 Exception while calling package_name.procedure_name procedure tofetch backups status for all clients : Traceback (most recent call last):
File "/opt/app/app/orm_dto/tenancy_report_orm.py", line 68, in fetch_all_clients_backup_report
cursor_obj.callproc("package_name.procedure_name", [
File "/home/python/.local/lib/python3.9/site-packages/oracledb/cursor.py", line 285, in callproc
self._call(name, parameters, keyword_parameters)
File "/home/python/.local/lib/python3.9/site-packages/oracledb/cursor.py", line 118, in _call
self.execute(statement, bind_values)
File "/home/python/.local/lib/python3.9/site-packages/oracledb/cursor.py", line 383, in execute
impl.execute(self)
File "src/oracledb/impl/thick/cursor.pyx", line 243, in oracledb.thick_impl.ThickCursorImpl.execute
File "src/oracledb/impl/thick/utils.pyx", line 431, in oracledb.thick_impl._raise_from_odpi
File "src/oracledb/impl/thick/utils.pyx", line 421, in oracledb.thick_impl._raise_from_info
oracledb.exceptions.DatabaseError: ORA-03150: end-of-file on communication channel for database link
Only suggestion to the team from. my side is if thin mode also gives the same error as thick mode would be helpful as thick mode is giving the actual error which database is throwing
It would indeed be helpful! If you are able to give direction on how to replicate the problem I would be happy to look into it further. I'll close the issue for now.
Is it an error or a hang or a crash? Error
What error(s) or behavior you are seeing? Getting below error while calling the procedure but it is intermittent.