Gitlab fails check & 500 errors after enabling config.threadsafe!
Created by: chr1831
Running sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production after enabling config.threadsafe! results in the following error uninitialized constant Project::Namespace
Output from sudo -u git -H bundle exec rake gitlab:check --trace rails_ENV=production
root@GitLab:/home/git/gitlab# sudo -u git -H bundle exec rake gitlab:check --trace RAILS_ENV=production
** Invoke gitlab:check (first_time)
** Invoke gitlab:env:check (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:env:check
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
** Invoke gitlab:gitlab_shell:check (first_time)
** Invoke environment
** Execute gitlab:gitlab_shell:check
Checking Gitlab Shell ...
GitLab Shell version? ... OK (1.1.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ...
rake aborted!
uninitialized constant Project::Namespace
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/inheritance.rb:111:in `compute_type'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/reflection.rb:172:in `klass'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/association.rb:117:in `klass'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/belongs_to_association.rb:24:in `find_target?'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/association.rb:137:in `load_target'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/association.rb:55:in `reload'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/singular_association.rb:9:in `reader'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/builder/association.rb:44:in `block in define_readers'
/home/git/gitlab/app/models/project.rb:274:in `name_with_namespace'
/home/git/gitlab/lib/tasks/gitlab/check.rake:496:in `block in check_repos_post_receive_hooks_is_link'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:21:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:21:in `block in find_each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:20:in `find_each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/querying.rb:8:in `find_each'
/home/git/gitlab/lib/tasks/gitlab/check.rake:495:in `check_repos_post_receive_hooks_is_link'
/home/git/gitlab/lib/tasks/gitlab/check.rake:357:in `block (3 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:187:in `block in invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:185:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:185:in `invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'
Tasks: TOP => gitlab:check => gitlab:gitlab_shell:check```
After disabling config.threadsafe! everything passes with flying colours.
root@GitLab:/home/git/gitlab# nano config/environments/production.rb
root@GitLab:/home/git/gitlab# sudo -u git -H bundle exec rake gitlab:check --trace RAILS_ENV=production
** Invoke gitlab:check (first_time)
** Invoke gitlab:env:check (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:env:check
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
** Invoke gitlab:gitlab_shell:check (first_time)
** Invoke environment
** Execute gitlab:gitlab_shell:check
Checking Gitlab Shell ...
GitLab Shell version? ... OK (1.1.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ...
{{REMOVED REPOSITORY LIST}}
Checking Gitlab Shell ... Finished
** Invoke gitlab:sidekiq:check (first_time)
** Invoke environment
** Execute gitlab:sidekiq:check
Checking Sidekiq ...
Running? ... yes
Checking Sidekiq ... Finished
** Invoke gitlab:app:check (first_time)
** Invoke environment
** Execute gitlab:app:check
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have satellites? ...
{{REMOVED REPOSITORY LIST}}
Checking GitLab ... Finished
** Execute gitlab:chek