Seems to be a recurring problem with websockets and possible stuck TIME_WAIT . All previous answers from years ago suggest newer version of python are ok. using https://pypi