-
Notifications
You must be signed in to change notification settings - Fork 79
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
How to set connect timeout use dpiConn_create #148
Comments
Connect timeouts are handled by SQL*Net and need to be configured in your sqlnet.ora or 19c Easy Connect Plus connect string. Check https://cx-oracle.readthedocs.io/en/latest/user_guide/ha.html#network-configuration for examples and links. |
I have a question on stack overflow regarding timeout configuration. This is not strictly about ODPI-C but it touches the Oracle Call Interface layer underneath. I was following your suggestion but I may have messed up. I am pasting it here... We have a real-time application deployment where our C application is built with ODPI-C. We are using,
We have a scenario where we are writing logs in a partitioned table in DB. We are using fixed connection pool in our application. We have set a pool-session-get-timeout in ODPI-C for scenarios when we don't get sessions from pool. We really want to do the DB op fast. If we can not do that we have default reply which is okay sometimes. We also face space issue for longer periods of time and then, we can no longer write to the table. At that time, we noticed that query execution was taking more than 2s and it was not the behavior we wanted. So I added a recv_timeout and connect_timeout in sqlnet.ora to keep query execution on a leash. But in production We are seeing core dumps being generated after adding the timeouts. It is pointing to a function deep inside libclntsh from instant client. Following is a core dump backtrace and sqlnet.ora contents. backtrace:(some of the stack is omitted)
sqlnet.ora file contents:
We are seeing a new instant client version released 19.12 and we used the previous version. But I am not quite sure this new version would fix this issue as this is a minor version update not a patch or bug fix. But to be very honest I am feeling quite lost as I am seeing a core dump in oracle library that I can not do anything about. Not many questions are found on the internet too. Any guidance? |
@quidstone please (i) update to 4.2 which had some improvements to dead-connection-detection (ii) if you still have problems, open a new issue instead of using this very old enhancement request. Thanks. |
I have updated applications to odpi-c 4.2.1 and using the old OCI 19.11. Let's wait for another db issue, I will let you know how it goes. |
centos7
gcc-8
instantclient_19_8
11g
What is the
PATH
environment variable (on Windows) orLD_LIBRARY_PATH
(on Linux) set to?What environment variables did you set? How exactly did you set them?
What problem or error(s) you are seeing?
I want use dpiConn_create to create connection, but if i give the wrong ip address, dpiConn_create wait 60s , so i want to know How to set connect timeout when using dpiConn_create.
The text was updated successfully, but these errors were encountered: