Commit 2c304f72 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'harishsr-db-deadlocs-docs' into 'master'

Specify how to update the db timeouts

See merge request gitlab-org/gitlab!51110
parents 691b9855 7152291b
......@@ -157,7 +157,7 @@ See current settings with:
```shell
sudo gitlab-rails runner "c = ApplicationRecord.connection ; puts c.execute('SHOW statement_timeout').to_a ;
puts c.execute('SHOW lock_timeout').to_a ;
puts c.execute('SHOW deadlock_timeout').to_a ;
puts c.execute('SHOW idle_in_transaction_session_timeout').to_a ;"
```
......@@ -165,9 +165,19 @@ It may take a little while to respond.
```ruby
{"statement_timeout"=>"1min"}
{"lock_timeout"=>"0"}
{"deadlock_timeout"=>"0"}
{"idle_in_transaction_session_timeout"=>"1min"}
```
These settings can be updated in `/etc/gitlab/gitlab.rb` with:
```ruby
postgresql['deadlock_timeout'] = '5s'
postgresql['statement_timeout'] = '15s'
postgresql['idle_in_transaction_session_timeout'] = '60s'
```
Once saved, [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect.
NOTE:
These are Omnibus GitLab settings. If an external database, such as a customer's PostgreSQL installation or Amazon RDS is being used, these values don't get set, and would have to be set externally.
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