gitlab An error occurred while fetching folder content.

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

gitlab An error occurred while fetching folder content.

Steps to reproduce

Update docker image to version 9704ffc3f4b8. Restart container~ Flush the page of project~ than tip message An error occurred while fetching folder content. docker logs container will log

ZeroDivisionError
lib/gitlab/middleware/read_only/controller.rb:53:in `call'

And chrome network page show the require /api/graphql is 500

My docker-compose file as below~

gitlab:
  image: 'gitlab/gitlab-ce:latest'
  restart: always
  hostname: 'gitlab.xxx.com'
  environment:
    GITLAB_OMNIBUS_CONFIG: |
      external_url 'https://gitlab.xxx.com'
  ports:
    - '10080:80'
    - '1443:443'
    - '2222:22'
  volumes:
    - '/data/gitlab/config:/etc/gitlab'
    - '/data/gitlab/logs:/var/log/gitlab'
    - '/data/gitlab/data:/var/opt/gitlab

Example Project

What is the current bug behavior?

Can not view files in gitlab project,but the merge request is normal

What is the expected correct behavior?

No error message display,and all the project file display normal~

Relevant logs and/or screenshots

No screenshots,I had back to image version b9923370e7ce. the docker logs

ZeroDivisionError (divided by 0):

lib/gitlab/middleware/read_only/controller.rb:53:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/middleware/request_context.rb:23:in `call'
config/initializers/fix_local_cache_middleware.rb:9:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:49:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'

Output of checks

Just my gitlab project~

Results of GitLab environment info

please check docker-compose.yml file

Results of GitLab application Check

Possible fixes

Not yet~

Edited by 🤖 GitLab Bot 🤖