entities similar to #733730 Redirect session when we can't obtain a database connection