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
Connection loss problem #37
Comments
Sorry for my late reply. The following description is WRONG, please ignore it (Edited by Timandes on 2019-9-19):
|
Hallo and thank you. Yes, we would like to know how it was meant and how we should use it correctly? |
Try this: <?php
\Zookeeper::setDebugLevel(\Zookeeper::LOG_LEVEL_DEBUG);
// Create instance and register connection callback
$zk = new \Zookeeper("127.0.0.1:2181,127.0.0.2:2182,127.0.0.3:2183",
function($type, $state) {
global $zk;
if ($state == \Zookeeper::CONNECTED_STATE) {
// We can do other stuff after connection established
$x = $zk->exists('/aliases.json');
var_dump($zk->get('/aliases.json'));
// Stop loop
exit;
}
});
// Loop and dispatch events
while(true) {
\Zookeeper::dispatch();
sleep(1);
} |
Hello, we are using stable (6.4) pecl package of your Zookeeper client and we have a issue.
I have a just this simple code:
Everything works well till I stop on one of three ZK instance on our servers.
Then I get this sometime:
Do you have some idea what is wrong? Is that right that one of three ZK instance failure should be ok for the client?
Thank you very much!
The text was updated successfully, but these errors were encountered: