Actually working Database reconnection after time out