-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
Milestone
Description
About 30% of the time, when launching a local Python application that has been configured to connect to two local servers in a cluster, I get the following error after which the application hangs:
Traceback (most recent call last):
File "venv\lib\site-packages\hazelcast\reactor.py", line 38, in _loop
self._check_timers()
File "venv\lib\site-packages\hazelcast\reactor.py", line 60, in _check_timers
self._timers.get_nowait()
File "C:\Program Files (x86)\Python37-32\lib\queue.py", line 198, in get_nowait
return self.get(block=False)
File "C:\Program Files (x86)\Python37-32\lib\queue.py", line 180, in get
item = self._get()
File "C:\Program Files (x86)\Python37-32\lib\queue.py", line 236, in _get
return heappop(self.queue)
TypeError: '<' not supported between instances of 'Timer' and 'Timer'
In addition, if I am able to start the application and connect successfully, the application will run for some time without issue until it eventually runs into this error once again. At such a time, the only fix is to forcibly stop the application and relaunch it.
I am using Python 3.7 with hazelcast-python-client version 3.9.
My HazelCast client + config is pretty vanilla (copied from the example code), and looks like this:
import hazelcast
class HazelcastClient:
def __init__(self):
self.client = self._configure_cluster()
def _configure_cluster(self):
config = hazelcast.ClientConfig()
print("Cluster name: {}".format(config.group_config.name))
config.network_config.addresses.append("127.0.0.1:5701")
config.network_config.addresses.append("127.0.0.1:5702")
client = hazelcast.HazelcastClient(config)
print("Client is {}".format(client.lifecycle.state))
return client