Reconnect function for dbapi modules and broken pipe detection for URLs catcher