docker-gitlab: Gitlab 11.0.1 does no longer work with Mysql

The nasty MySQL error as described in #1492 is back. But this time it’s worse: Gitlab does not work at all anymore. I only get 500 errors.

Here’s what log/production.log says:

Started GET "/" for 1.2.3.4 at 2018-06-26 19:55:15 +0200
Processing by RootController#index as HTML
Completed 500 Internal Server Error in 133ms (ActiveRecord: 91.3ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Lost connection to MySQL server during query: SELECT MAX(`project_authorizations`.`access_level`) AS maximum_access_level, `project_authorizations`.`project_id` AS project_authorizations_project_id FROM `project_authorizations` WHERE `project_authorizations`.`user_id` = 1 AND `project_authorizations`.`project_id` IN (49, 5, 104, 100, 87, 105, 107, 98, 102, 106, 99, 108, 43, 101) GROUP BY `project_authorizations`.`project_id`):
  config/initializers/connection_fix.rb:20:in `execute'
  app/models/user.rb:1209:in `block in max_member_access_for_project_ids'
  app/models/concerns/bulk_member_access_load.rb:27:in `max_member_access_for_resource_ids'
  app/models/user.rb:1206:in `max_member_access_for_project_ids'
  app/controllers/concerns/renders_member_access.rb:21:in `public_send'
  app/controllers/concerns/renders_member_access.rb:21:in `preload_max_member_access_for_collection'
  app/controllers/concerns/renders_member_access.rb:9:in `prepare_projects_for_rendering'
  app/controllers/dashboard/projects_controller.rb:55:in `load_projects'
  app/controllers/dashboard/projects_controller.rb:10:in `index'
  app/controllers/root_controller.rb:18:in `block in index'
  lib/gitlab/gitaly_client.rb:331:in `allow_n_plus_1_calls'
  app/controllers/root_controller.rb:17:in `index'
  lib/gitlab/i18n.rb:50:in `with_locale'
  lib/gitlab/i18n.rb:56:in `with_user_locale'
  app/controllers/application_controller.rb:362:in `set_locale'
  lib/gitlab/middleware/multipart.rb:95:in `call'
  lib/gitlab/request_profiler/middleware.rb:14:in `call'
  lib/gitlab/middleware/go.rb:17:in `call'
  lib/gitlab/etag_caching/middleware.rb:11:in `call'
  lib/gitlab/middleware/read_only/controller.rb:28:in `call'
  lib/gitlab/middleware/read_only.rb:16:in `call'
  lib/gitlab/request_context.rb:18:in `call'
  lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
  lib/gitlab/middleware/release_env.rb:10:in `call'

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (7 by maintainers)

Most upvoted comments

@npotier I had a full dump of the project_authorizations, I basically created the table project_authorizations with the migrations how it should look like in 11.0.x (cf. https://github.com/gitlabhq/gitlabhq/blob/11-0-stable/db/schema.rb#L1482) and took the INSERT commands out of the backup and executed them.

I think I needed to clear the cache gitlab-rake cache:clear to make the activity appear afterwards