Commit 2a19fe09 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'update-gdk-doc-for-enable-puma-by-default' into 'master'

Update GDK doc for enable puma by default

See merge request !712
parents b0ebddf7 61ec26d2
......@@ -5,6 +5,7 @@ gitlab-development-kit/**
/gitlab-shell/
/gitlab-shell
/.ssh/
/.env
/repositories
!/repositories/.gitkeep
/gitlab/
......
......@@ -39,3 +39,4 @@ to learn how to develop GitLab CE.
- [Preview and test the docs site locally](gitlab_docs.md)
- [Auto DevOps](auto_devops.md)
- [Google OAuth2](google-oauth2.md)
- [Unicorn](unicorn.md)
......@@ -20,7 +20,7 @@ service they are related to:
| Port filename | Service name |
| --------------------- | --------------------------------------------- |
| `port` | unicorn (rails) |
| `port` | puma/unicorn (rails) |
| `webpack_port` | webpack-dev-server |
| `postgresql_port` | main postgresql server |
| `postgresql_geo_port` | postgresql server for tracking database (Geo) |
......
......@@ -10,7 +10,7 @@ etc.).
If you want to get a debugging prompt while browsing on your local
development server (localhost:3000) you need to comment out the
`rails-web:` line in the Procfile in your GDK root directory because
Unicorn is not compatible with Pry.
Puma/Unicorn is not compatible with Pry.
You can also run `make pry` to make this change for you. `make pry-off`
will revert back to the original configuration.
......@@ -19,4 +19,4 @@ Then launch GDK as usual (e.g. with `gdk run`) and in a separate
terminal run: `gdk run thin`. Your Pry prompts will appear in the window
that runs Thin.
**Note**: It's not possible to submit commits from the web without at least two `unicorn` servers running. Which means when running `thin` for debugging, actions such as creating a file from the web will time out. See [Use GitLab with only 1 Unicorn worker?](https://gitlab.com/gitlab-org/gitlab-ce/issues/18771)
**Note**: It's not possible to submit commits from the web without at least two `puma/unicorn` server threads running. Which means when running `thin` for debugging, actions such as creating a file from the web will time out. See [Use GitLab with only 1 Unicorn worker?](https://gitlab.com/gitlab-org/gitlab-ce/issues/18771)
......@@ -587,7 +587,7 @@ brew install postgresql@9.6
brew link --force postgresql@9.6
```
## Unicorn timeout
## Puma/Unicorn timeout
Browser shows `EOF`. Logs show a timeout:
......@@ -595,12 +595,20 @@ Browser shows `EOF`. Logs show a timeout:
error: GET "/users/sign_in": badgateway: failed after 62s: EOF
```
Depending on the performance of your development environment, Unicorn may
Depending on the performance of your development environment, Puma/Unicorn may
time out. Increase the timeout as a workaround.
Edit `gitlab/config/unicorn.rb`:
For Puma: you can use environment variables to override the default timeout:
```
Variable | Type | Description
-------- | ---- | -----------
`GITLAB_RAILS_RACK_TIMEOUT` | integer | Sets `service_timeout`
`GITLAB_RAILS_WAIT_TIMEOUT` | integer | Sets `wait_timeout`
For Unicorn: edit `gitlab/config/unicorn.rb`:
```ruby
timeout 3600
```
......
# GitLab development with Unicorn
Even though our prefered web server is Puma, there are times you'd want to use Unicorn.
To use Unicorn: set environment variable `USE_WEB_SERVER=unicorn` before `gdk run`.
For example, in the GDK root:
`echo "USE_WEB_SERVER=unicorn" >> .env`
or,
`USE_WEB_SERVER=unicorn gdk run`
......@@ -715,6 +715,8 @@ production: &base
## Monitoring
# Built in monitoring settings
monitoring:
# Time between sampling of Puma metrics, in seconds
# puma_sampler_interval: 5
# Time between sampling of unicorn socket metrics, in seconds
# unicorn_sampler_interval: 10
# IP whitelist to access monitoring endpoints
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment