Commit Graph

19 Commits

Author SHA1 Message Date
Leo Hemsted
897ab93148 zendesk instead of deskpro 2018-04-27 16:36:39 +01:00
Athanasios Voutsadakis
5068d4cf38 Merge branch 'master' into add-http-healthchecks 2018-04-04 10:22:56 +01:00
Athanasios Voutsadakis
8f1f546f69 Increase pool size to 15 permanent connections
At the same time, decrease the number of workers from 5 to 4.

Effect on max db connections will be the same - although with a higher
"resting" number of connections.

Before:
12 (instances) * 5 (workers) * 20 (10 permanent + 10 overflow) = 1200

After:
12 (instances) * 4 (workers) * 25 (15 permanent + 10 overflow) = 1200
2018-03-29 14:57:19 +01:00
Athanasios Voutsadakis
9888ba3d4e Add http health-check for the api app
Also rename the 'elb' argument to 'simple' to be more descriptive.

The healthcheck is going to issue requests to `/_status?simple=true`
just to check that gunicorn is up and running - we don't need to go all
the way to the database, as this would have adverse impact when api is
under load.
2018-03-28 17:19:02 +01:00
Athanasios Voutsadakis
dc19e644a6 Increase DB connection pool size to 10
This is to address some errors we saw yesterday such as:

`sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10
reached, connection timed out, timeout 30`

Related flask-sqlalchemy docs:
http://flask-sqlalchemy.pocoo.org/2.3/config/#configuration-keys
2018-02-21 15:47:58 +00:00
Athanasios Voutsadakis
dc772fab3b Move config from command line args to gunicorn_config.py 2018-02-06 15:13:04 +00:00
Athanasios Voutsadakis
650455806d Use - not _ 2018-02-06 11:50:40 +00:00
Athanasios Voutsadakis
9307f54d9a Use eventlet workers for gunicorn
Cap their parallel connections to 1/4 of the default to play it safe
while we keep an eye on our resources utilisation
2018-02-06 11:24:01 +00:00
Alexey Bezhan
5298f28f80 Add utils DeskproClient and configuration variables
Deskpro client is used to create tickets from celery alerting tasks
(eg alerts for missing ack or response files from DVLA).
2018-01-17 15:04:17 +00:00
Alexey Bezhan
ff8373600d Replace manifest services with lists of env variables
Removes bindings to user provided services for new application
deployments and sets the expected environment variables to `null`.

Listing variables in the manifest allows us to only inject secrets
used by the app. `null` is not a valid value for a variable in a
CloudFoundry manifest, so if any of the keys don't have a match in
the credentials file `cf push` will return an error and stop the
deployment.
2018-01-09 10:45:03 +00:00
Leo Hemsted
b727f53836 ensure app can run on paas
instead of using wsgi, we now use "application" - this tells gunicorn
to look inside the python module application (application.py) for a
wsgi app - and by default that is also called application so rename
the variable.

Also, when running tasks, we're not using gunicorn so need to set the
flask variable in the manifest so that `flask command ...` finds the
app properly.

Remove server_commands as it's not used any more.
2017-11-23 17:04:58 +00:00
Leo Hemsted
6d45a887c5 remove wsgi 2017-11-23 17:04:58 +00:00
Athanasios Voutsadakis
646290e2c4 Implement worker_abort server hook
Also update the manifest command to pass the config file in as a parameter
and modify the logs agent to start shipping the error log to cloudwatch
2017-09-22 15:03:45 +01:00
Athanasios Voutsadakis
01611c1936 Configure gunicorn error log file 2017-09-22 11:28:55 +01:00
Leo Hemsted
e85b621cbc make perf platform client handle more stuff sensibly
specifically, all of the performance platform specific data layout now
happens in performance_platform_client.py - stuff like setting the
_timestamp, period etc, and the perf platform-specific nomenclature is
all handled there.
2017-08-24 17:10:42 +01:00
Leo Hemsted
1f93fc889c add new cf performance-platform service to manifest 2017-08-23 18:21:54 +01:00
bandesz
b0d5def289 Increase memory for PaaS 2017-03-06 14:48:27 +00:00
bandesz
e8bf03c7e1 Get Redis config from PaaS 2017-03-03 11:35:51 +00:00
bandesz
72dc93c6db Add awslogs logging for PaaS 2017-02-16 17:38:30 +00:00