Warning
        This document has not been updated for a while now. It may be out of date.
      
    
  Last updated: 21 Nov 2024
Pingdom Bouncer canary check
This alert is raised by Pingdom when it cannot reach Bouncer’s canary route at https://www.direct.gov.uk/__canary__. This route queries all the database tables which Bouncer uses to serve all responses to users and checks that those tables are not empty. The canary should return 200; if it doesn’t then errors will be being served to users - see the table below for more details of the errors in each case.
Possible causes of errors on the canary route include:
- DNS problems for www.direct.gov.ukorbouncer.publishing.service.gov.uk- check Bouncer’s Nginx logs via the logit.io dashboard to see which requests are getting through
- CDN problems resulting in requests for www.direct.gov.uknot being correctly passed tohttps://bouncer.publishing.service.gov.uk
- bouncer-*or- transition-postgresql-slave-1machines being unavailable
- Bouncer’s dependencies being missing or having errors in its configuration
- memory leaks in Bouncer
- the app being unable to connect or authorise to the database
- the database or the required tables being missing or empty
- the bouncerrole not havingSELECTprivileges on the required tables
The database tables checked by the canary route (in order) and the effect on requests for transitioned sites of errors when querying them:
| Database table name | HTTP response when table inaccessible | HTTP response when table missing data | 
|---|---|---|
| hosts | 500for all requests | 404for all requests | 
| sites | 500for all requests | 500for all requests | 
| mappings | 500for most requests | 404for most requests | 
| whitelisted_hosts | 500for requests which should redirect to non-*.gov.uk/*.mod.uk/*.nhs.ukdomains | 501for those requests | 
| organisations | 500for most requests which shouldserve a 404 or 410 page | 500for those requests | 
There are other tables in the transition_production database but they
are only used by Transition and not by Bouncer.