-
Notifications
You must be signed in to change notification settings - Fork 77
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
Oracle AQ consumers fail to read new message after having no messages for a long time #450
Comments
What Oracle Client and DB versions are you using? |
@cjbj Server is Oracle 19, and the client is 19.3. |
19.3 client? Ouch - that is nearly 6 years old. We have Instant Client 19.26 available. Can you upgrade and try again? Regarding the DB version what does this print:
Our AQ team said they'd take a look, but having a current client version is probably the first thing they would ask for. |
@cjbj I have downloaded Instance Client 19.25. You mentioned 19.26, but I only saw 19.25 from the download page. I'll give it a shot and report back, thanks.
This is returning 19.25.0.0.0. |
@mkmoisen let us know if you still see the issue. |
@mkmoisen I tried to reproduce the issue on 19c DB and 19.25 instant client, I got connection lost error. Do you see any error or it just hangs? |
@mkmoisen please check in alert log if the dequeue session is killed by resource manager. |
Hi @shivani-ka Thanks for reproducing. For me, it was hanging; I did not receive connection lost error. I am using the new client (19.25) and haven't been able to reproduce it as of yet. I will report back tomorrow, thanks for your help. |
Hi @shivani-ka, @cjbj I reproduced it again using OCI 19.25. It is still hanging, and did not throw a lost connection error, unlike what @shivani-ka saw. Interestingly, this time there is no entry in gv$session corresponding to the session. So it seems the session disconnected from the database, but that either OCI or oracledb didn't notice it and raise an exception. I'll keep trying to reproduce it and see if the behavior is consistent or not. Regarding the alert log, I don't see anything in v$diag_alert_ext relating to killed sessions within the timeframe. Is this sufficient or would I need to look into the actual alert log? I would need to raise a ticket to the DBA. Thanks very much. |
I did see a connection lost error this morning:
However last night I did not receive this, it just hung. |
I have a consumer thread listening to an Oracle AQ queue in dequeue wait forever mode.
Everything works great, except for when there has been no message in the queue for an hour or so.
After adding a message to the queue, the dequeue never happens.
I know the thread is still alive and apparently attempting to dequeue, because I can see it in gv$session with the event
Streams AQ: waiting for messages in the queue
, and the previous sql id is pointing to a query that hits the AQ$_queuename_F table. (If I kill the app, this session is terminated).I know there is a message in the queue, and that it has never been dequeued, which I can tell from querying the queue table.
Killing the application and restarting it results in the message being immediately dequeued, so I know there is no filter dequeue condition for example stopping it.
I was under the impression that if there was some kind of network disconnect, then Oracle would detect this, and the session would be terminated, and not be visible in gv$session.
Would anyone happen to have any ideas on what could possibly be causing this behavior or how I could debug it?
The reason I think it may be a bug is because gv$session is still populated with this thread with the event
Streams AQ: waiting for messages in the queue
I have been reliably seeing this behavior.
I am doing simple, single consumer queues with everything pretty standard:
Oracle 19
Hang
Thread that is dequeing from the queue hangs forever and does not read new messages in the queue.
Yes, thick mode.
Cannot be reproduced without waiting for several hours after the last message.
The text was updated successfully, but these errors were encountered: