Moved timeout to database