When a new data plugin is registered for instance, and if config.USE_RELOADER is True, the hub restarts to load new code. Problem is if the hub takes a while to stop, the spawn process will fail while starting, giving a "OSError: [Errno 98] Address already in use".
Also, it 2 restart event are gathered almost at the same time, the hub may fail to restart as well.
When a new data plugin is registered for instance, and if config.USE_RELOADER is True, the hub restarts to load new code. Problem is if the hub takes a while to stop, the spawn process will fail while starting, giving a "OSError: [Errno 98] Address already in use".
Also, it 2 restart event are gathered almost at the same time, the hub may fail to restart as well.
see: https://github.com/biothings/biothings.api/blob/master/biothings/utils/hub.py#L130