Retry on http and db errors