500 error post upgrade of gitlab to 13.2.8 (Using Puma)
Hi All,
I using the gitlab version 13.2.8, After version upgrade from 12.7.6 to 13.2.8 i am facing many performance issue, Primarily random 500 errors while accessing the gitlab projec and in my CI's, I suspect it's related to the new puma configuration. Please find my puma configuration below.
**Puma configuration using now**
####Puma
unicorn['enable'] = false
puma['enable'] = true
puma['worker_timeout'] = 300
puma['port'] = 8080
puma['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
puma['pidfile'] = '/opt/gitlab/var/puma/puma.pid'
puma['per_worker_max_memory_mb'] = 1024
gitlab_rails['env'] = {
'GITLAB_RAILS_RACK_TIMEOUT' => 900
}
**Unicorn configuration which is in 12.7.6 earlier**
# GitLab Unicorn #
## Tweak unicorn settings.
#puma['enable'] = false
#unicorn['enable'] = true
# unicorn['worker_timeout'] = 300
# unicorn['worker_processes'] = 2
## Advanced settings
# unicorn['listen'] = '127.0.0.1'
#unicorn['port'] = 8080
#unicorn['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
#unicorn['pidfile'] = '/opt/gitlab/var/unicorn/unicorn.pid'
# unicorn['tcp_nopush'] = true
# unicorn['backlog_socket'] = 1024
# Make sure somaxconn is equal or higher then backlog_socket
# unicorn['somaxconn'] = 1024
# We do not recommend changing this setting
# unicorn['log_directory'] = "/var/log/gitlab/unicorn"
#unicorn['worker_memory_limit_min'] = "200*(1024**2)"
#unicorn['worker_memory_limit_max'] = "400*(1024**2)"
Logs:
{"method":"GET","path":"/TBI/insights/sql-scripts-repository.git/info/refs","format":"/","controller":"Repositories::GitHttpController","action":"info_refs","status":500,"time":"2020-11-18T11:10:23.150Z","params":[{"key":"service","value":"git-upload-pack"},{"key":"namespace_id","value":"TBI/insights"},{"key":"repository_id","value":"sql-scripts-repository.git"}],"remote_ip":"10.32.xxx","user_id":null,"username":null,"ua":"git/2.22.0","correlation_id":"03afe0f6-bf8b-41d2-adb7-e0e1b657d858","cpu_s":0.02,"**exception.class":"PG::ConnectionBad","exception.message":"FATAL: remaining connection slots are reserved for non-replication superuser connections\n","exception.backtrace":["app/models/concerns/routable.rb:35:in **find_by_full_path'","lib/gitlab/repo_path.rb:48:in find_project'","lib/gitlab/repo_path.rb:39:in find_container'","lib/gitlab/repo_path.rb:22:in block in parse'","lib/gitlab/repo_path.rb:13:in each'","lib/gitlab/repo_path.rb:13:in parse'","app/controllers/repositories/git_http_client_controller.rb:83:in `parse_repo_path'"],"db_duration_s":0.0,"view_duration_s":0.0,"duration_s":0.00699,"db_count":0,"db_write_count":0,"db_cached_count":0}
