HELP: 413 Payload Too Large when pushing image to container registry

Problem to solve

I am trying to publish a docker image in the container registry and I am getting the error “413 Payload Too Large”

Steps to reproduce

I have already adjusted the nginx[‘client_max_body_size’] parameter and also registry_nginx[‘client_max_body_size’] parameter.

I get error when I try to push from my desktop.

When I run in inside de pipeline, I also fails with a different error message “#11 ERROR: unknown: error code: 500”

Configuration

System information
System: Ubuntu 24.04
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 3.2.5
Gem Version: 3.6.9
Bundler Version:2.6.9
Rake Version: 13.0.6
Redis Version: 7.2.9
Sidekiq Version:7.3.9
Go Version: unknown

GitLab information
Version: 18.1.1-ee
Revision: ceb07b24cb0
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 16.8
URL: https://gitlab.example.com
HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git
SSH Clone URL: git@ssh-gitlab.example.com:some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version: 14.42.0
Repository storages:

  • default: unix:/var/opt/gitlab/gitaly/gitaly.socket
    GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell

Gitaly

  • default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket
  • default Version: 18.1.1
  • default Git Version: 2.49.0.gl2

Versions

GitLab Self-managed v18.1.1