Added custom logic in retry loops so that global retry limit and timeout settings set on the database are automatically re-applied when transactions are reset