Error 500 when trying to disable signup

I have solved the pb by following the solution proposed in Getting 500 Internal error on /admin/application_settings after Gitlab upgrade [11.5.2->11.6.2] (#56403) · Issues · GitLab.org / GitLab FOSS · GitLab

Basically, launch a console

gitlab-rails c

Then in that console

settings = ApplicationSetting.last
settings.update_column(:runners_registration_token_encrypted, nil)

After leaving the console, restart your gitlab

gitlab-ctl restart