So I have my application running on windows for 5 years now.
I have around 800 processes running in 5 different Machines.
5 / day lately are hanging on this:

I also managed to find the socket pid and kill it, than the app closed properly.

My code is the same regarding dropbox ...was not changed.
mt code flow:
self.uploading_thread = None
...
if self.uploading_thread:
self.uploading_thread.join() # wait if last one did not finish
self.uploading_thread = threading.Thread(target=self.update_server_data)
self.uploading_thread.start()
def update_server_data(self):
status = 'xsaxasxsa'
self.statistics_server_o.set_data(status)
def set_data(self, data):
self.lock.acquire()
self.data = data
self.lock.release()
# notify thread on new data
self.new_data_flag.set()
def update_server(self):
while self.new_data_flag.wait():
# clear flag
self.new_data_flag.clear()
if self.stop_event:
break
local_data_copy = self.get_hard_copy_data()
# update new data
try:
self.dropbox_o.upload_bytes(local_data_copy, '', 'status', '{}_status.txt'.format(self.account_name),
overwrite=True)
except:
pass
I can call the update thread many times, it async, so I wait until last job finish before I trigger a new one.
can you see anything related to my code ? should I add termination of the tread with timer ?