RCA: Pipelines slow & queued jobs

## Summary

Multiple users [reported](https://gitlab.slack.com/archives/C101F3796/p1545154906806500) slowness in launching pipeline jobs on private runners.

Timing correlated with spikes in sidekiq queues
![sidekiq stats](https://dashboards.gitlab.net/render/d-solo/000000159/ci?refresh=5m&orgId=1&var-runner_type=All&var-runner_managers=All&var-cache_server=All&var-gl_monitor_fqdn=patroni-01-db-gprd.c.gitlab-production.internal&var-has_minutes=yes&var-hanging_droplets_cleaner=All&var-droplet_zero_machines_cleaner=All&var-runner_job_failure_reason=All&var-gitlab_env=gprd&var-jobs_running_for_project=0&panelId=85&from=1545143637349&to=1545158573520&width=1000&height=500&tz=America%2FLos_Angeles)

Which also correlated with patch deployments to `cny` and later to `gprd` (yellow annotations)
![sidekiq queues with deployments](https://dashboards.gitlab.net/render/d-solo/RZmbBr7mk/gitlab-triage?refresh=30s&orgId=1&from=1545137784683&to=1545159384683&var-environment=gprd&var-prometheus=prometheus-01-inf-gprd&var-prometheus_app=prometheus-app-01-inf-gprd&var-backend=All&var-type=All&var-stage=main&panelId=5&width=1000&height=500&tz=America%2FLos_Angeles)

Service(s) affected : ~"Service:CI Runners" ~"Service:Sidekiq"  
Team attribution :  
Minutes downtime or degradation : TBD  

## Impact & Metrics

Start with the following:

- What was the impact of the incident? (i.e. service outage, sub-service brown-out, exposure of sensitive data, ...)
- Who was impacted by this incident? (i.e. external customers, internal customers, specific teams, ...)
- How did the incident impact customers? (i.e. preventing them from doing X, incorrect display of Y, ...)
- How many attempts were made to access the impacted service/feature?
- How many customers were affected?
- How many customers tried to access the impacted service/feature?

Include any additional metrics that are of relevance.

Provide any relevant graphs that could help understand the impact of the incident and its dynamics.


## Detection & Response

Start with the following:

- How was the incident detected?
- Did alarming work as expected?
- How long did it take from the start of the incident to its detection?
- How long did it take from detection to remediation?
- Were there any issues with the response to the incident? (i.e. bastion host used to access the service was not available, relevant team memeber wasn't page-able, ...)

## Timeline

2018-12-18

- 15:23 UTC - @jlenny [reported issues](https://gitlab.slack.com/archives/CB7P5CJS1/p1545146610059200) with shared runners [in slack](https://gitlab.slack.com/archives/C101F3796/p1545147179792500)
- 15:36 UTC - user reported [very slow slack notifications/emails and stalled pipelines](https://gitlab.zendesk.com/agent/tickets/110463)
- 15:46 UTC - user reported [hung pipelines and idle runners](https://gitlab.zendesk.com/agent/tickets/110464)
- 16:54 UTC - user reported [latency in pipeline jobs](https://gitlab.zendesk.com/agent/tickets/110472)
- 17:41 UTC - slowness [reported](https://gitlab.slack.com/archives/C101F3796/p1545154906806500) to production team via slack

## Root Cause Analysis

The purpose of this document is to understand the reasons that caused an incident, and to create mechanisms to prevent it from recurring in the future. A root cause can **never be a person**, the way of writing has to refer to the system and the context rather than the specific actors.

Follow the "**5 whys**" in a **blameless** manner as the core of the root-cause analysis.

For this it is necessary to start with the incident, and question why it happened. Keep iterating asking "why?" 5 times. While it's not a hard rule that it has to be 5 times, it helps to keep questions get deeper in finding the actual root cause. 

Keep in min that from one "why?" there may come more than one answer, consider following the different branches.

###Example of the usage of "5 whys"
The vehicle will not start. (the problem)

1. Why? - The battery is dead. 
2. Why? - The alternator is not functioning.
3. Why? - The alternator belt has broken.
4. Why? - The alternator belt was well beyond its useful service life and not replaced. 
5. Why? - The vehicle was not maintained according to the recommended service schedule. (Fifth why, a root cause)

## What went well

Start with the following:

- Identify the things that worked well or as expected.
- Any additional call-outs for what went particularly well.

## What can be improved

Start with the following:

- Using the root cause analysis, explain what can be improved to prevent this from happening again.
- Is there anything that could have been done to improve the detection or time to detection?
- Is there anything that could have been done to improve the response or time to response?
- Is there an existing issue that would have either prevented this incident or reduced the impact?
- Did we have any indication or beforehand knowledge that this incident might take place?


## Corrective actions

- List issues that have been created as corrective actions from this incident.
- For each issue, include the following:
    - <Bare Issue link> - Issue labeled as ~"corrective action".
    - Include an estimated date of completion of the corrective action.
    - Incldue the named individual who owns the delivery of the corrective action.


## Guidelines

* [Blameless RCA Guideline](https://about.gitlab.com/handbook/infrastructure/#rca)
* [5 whys](https://en.wikipedia.org/wiki/5_Whys)



Story points: 3.0