You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "erobot (via GitHub)" <gi...@apache.org> on 2025/04/09 12:48:14 UTC
[I] [Bug] Connection keepalive is not working in certain case [pulsar-client-cpp]
erobot opened a new issue, #479:
URL: https://github.com/apache/pulsar-client-cpp/issues/479
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing similar.
### Version
OS: linux 4.14
Pulsar: 3.0.7
### Minimal reproduce step
1. Brokers become unstable like lookup timeout, topic fenced, etc. for a while.
2. After brokers recover, some clients can not recover and keep reconnecting producer with timeout.
### What did you expect to see?
Clients can auto recover after brokers recover.
### What did you see instead?
After brokers recover, some clients can not recover and keep reconnecting producer with timeout.
### Anything else?
After debugging the problematic producer, I discovered the underlying connection is in an unusable state. The client sends ping and other commands to broker, but only receives ping command (not pong command) from broker. The current keepalive logic is too lenient – merely receiving ping commands can keep the connection alive.
Debugging logs below show the connection only receives ping command (BaseCommand_Type_PING = 18) from the broker every 30 seconds:
```
(gdb) c
Continuing.
Tue Apr 8 20:41:36 CST 2025
Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
this=this@entry=0x7f8ff72fa000, incomingCmd=...)
at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921
921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc
1: incomingCmd.type_ = 18
(gdb)
Continuing.
Tue Apr 8 20:42:05 CST 2025
Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
this=this@entry=0x7f8ff72fa000, incomingCmd=...)
at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921
921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc
1: incomingCmd.type_ = 18
(gdb) c
Continuing.
Tue Apr 8 20:42:35 CST 2025
Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
this=this@entry=0x7f8ff72fa000, incomingCmd=...)
at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921
921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc
1: incomingCmd.type_ = 18
(gdb)
Continuing.
Tue Apr 8 20:43:05 CST 2025
Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
this=this@entry=0x7f8ff72fa000, incomingCmd=...)
at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921
921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc
1: incomingCmd.type_ = 18
(gdb)
Continuing.
Tue Apr 8 20:43:35 CST 2025
Thread 6 "producer" hit Breakpoint 8, Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
pulsar::ClientConnection::handleIncomingCommand (Python Exception <class 'NameError'>: Installation error: gdb._execute_unwinders function is missing
this=this@entry=0x7f8ff72fa000, incomingCmd=...)
at 3rd/pulsar-client-cpp/lib/ClientConnection.cc:921
921 in 3rd/pulsar-client-cpp/lib/ClientConnection.cc
1: incomingCmd.type_ = 18
(gdb)
```
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Connection keepalive is not working in certain case [pulsar-client-cpp]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower closed issue #479: [Bug] Connection keepalive is not working in certain case
URL: https://github.com/apache/pulsar-client-cpp/issues/479
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Connection keepalive is not working in certain case [pulsar-client-cpp]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower closed issue #479: [Bug] Connection keepalive is not working in certain case
URL: https://github.com/apache/pulsar-client-cpp/issues/479
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org