I host ~40 projects on my own GitLab server for 2 months. Now I've figured out that I can not crate a new project any more.
I've tried to solve the bug by upgrading Gitlab from 11.0.2 -> 11.3.5. It did't help. Below I'm describing the bug for the last version.
Steps to reproduce
Click on 'New Project' on GitLab dashboard
Fill 'Project name' field with 'NewProject'
Click on 'Create project'
What is the current bug behavior?
The web site hangs for a while and then I get Error 502.
The project is not created at all and I don't see it in the list of the project in Admin dashboard.
What is the expected correct behavior?
The project must have been created as all the former project I created before.
Relevant logs and/or screenshots
In the logs I see suspicions messages:
2018-10-17_04:59:40.92054 FATAL: terminating connection due to idle-in-transaction timeoutE, [2018-10-17T04:59:41.572845 #7252] ERROR -- : worker=3 PID:7360 timeout (61s > 60s), killing
I seem to have the exact same problem.
We have it for about 3 month now, i noticed it first early august, i know for sure it worked early june.
I get the same error message and i tried the same from your Possible fixes section with the same result.
I have my GitLab running in a docker container that I update every few weeks so I always thought a update broke it (so sometime between june and august), but as I understand it for you it worked at first with 11.0.2 and then it suddenly didnt?!
my container log from during the project create until the timeout:
since the badgateway error message let me to believe its some kind of a network problem, i also tried to push to a new repository from inside the docker container with localhost but with the same result
$ sudo docker exec -it gitlab_web_1 /bin/bashroot@gitlabServer:/# cd tmproot@gitlabServer:/tmp# mkdir testReporoot@gitlabServer:/tmp# cd testRepo/root@gitlabServer:/tmp/testRepo# git initInitialized empty Git repository in /tmp/testRepo/.git/root@gitlabServer:/tmp/testRepo# touch test.mdroot@gitlabServer:/tmp/testRepo# git remote add origin http://gitlabServer/test/testRepo.gitroot@gitlabServer:/tmp/testRepo# git add .root@gitlabServer:/tmp/testRepo# git config --global user.email "user@email.com"root@gitlabServer:/tmp/testRepo# git commit -m "test"[master (root-commit) 146db67] test 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test.mdroot@gitlabServer:/tmp/testRepo# git push -u origin masterUsername for 'http://gitlabServer': userPassword for 'http://user@gitlabServer':remote: GitLab is not respondingfatal: unable to access 'http://gitlabServer/test/testRepo.git/': The requested URL returned error: 502root@gitlabServer:/tmp/testRepo# curl gitlabServer<html><body>You are being <a href="http://gitlabServer/users/sign_in">redirected</a>.</body></html>root@gitlabServer:/tmp/testRepo# git remote set-url origin http://localhost/test/testRepo.gitroot@gitlabServer:/tmp/testRepo# git push -u origin masterUsername for 'http://localhost': userPassword for 'http://user@localhost':remote: GitLab is not respondingfatal: unable to access 'http://localhost/test/testRepo.git/': The requested URL returned error: 502root@gitlabServer:/tmp/testRepo# git remote set-url origin http://localhost/test/testRepo.git^Croot@gitlabServer:/tmp/testRepo# git push -u origin masterUsername for 'http://localhost': rootPassword for 'http://root@localhost':remote: GitLab is not respondingfatal: unable to access 'http://localhost/test/testRepo.git/': The requested URL returned error: 502root@gitlabServer:/tmp/testRepo# exitexit
the 404 error page after i increased the timeout also states
The page could not be found or you don't have permission to view it.The resource that you are attempting to access does not exist or you don't have the necessary permissions to view it.Make sure the address is correct and that the page hasn't moved.Please contact your GitLab administrator if you think this is a mistake.
I have a somewhat functioning workaround though.
if i create a new project using a template it sometimes works.
Often it creates the project but fails to import the template, rendering it useless since its kinda stuck on the import page.
Sometimes imports successfully and I just force push my local project over it.
And in some rare cases it notices it could not import the template and successfully creates an empty new project.
its annoying, but it gets you further when you dont have time to look into the problem
Hi, @miggonaut. Thanks for the clew. Your workaround works for my case too. I hope the developers pay attention on the bug and fix it in the nearest future.
Is there a fix for this issue? I'm seeing the same problem. Also upgraded to gitlab-ce-12.2.1-ce.0.el7.x86_64 but the issue remains. Cannot create new projects. I tried increasing the unicorn timeout to 600, but then get a 500 error instead of 502.
Seeing some postgres errors, is this problem a db issue? What can I check to resolve this issue?
=> /var/log/gitlab/sidekiq/current <=={"severity":"INFO","time":"2019-08-25T20:07:02.772Z","class":"BackgroundMigrationWorker","retry":3,"queue":"background_migration","jid":"6cf39c5505f06062f0428e90","created_at":"2019-08-25T20:05:03.574Z","correlation_id":"01343a23-a0cd-4d7a-9f42-7067275623e8","enqueued_at":"2019-08-25T20:07:02.770Z","error_message":"uninitialized constant Gitlab::BackgroundMigration::PopulateMergeRequestMetricsWithEventsDataImproved\nDid you mean? Gitlab::BackgroundMigration::PopulateMergeRequestAssigneesTable","error_class":"NameError","failed_at":1566763594.2144904,"retry_count":0,"pid":6835,"message":"BackgroundMigrationWorker JID-6cf39c5505f06062f0428e90: start","job_status":"start","scheduling_latency_s":0.002}{"severity":"INFO","time":"2019-08-25T20:07:02.791Z","class":"BackgroundMigrationWorker","retry":3,"queue":"background_migration","jid":"6cf39c5505f06062f0428e90","created_at":"2019-08-25T20:05:03.574Z","correlation_id":"01343a23-a0cd-4d7a-9f42-7067275623e8","enqueued_at":"2019-08-25T20:07:02.770Z","error_message":"uninitialized constant Gitlab::BackgroundMigration::PopulateMergeRequestMetricsWithEventsDataImproved\nDid you mean? Gitlab::BackgroundMigration::PopulateMergeRequestAssigneesTable","error_class":"NameError","failed_at":"2019-08-25T20:06:34.214Z","retry_count":0,"pid":6835,"message":"BackgroundMigrationWorker JID-6cf39c5505f06062f0428e90: done: 0.019 sec","job_status":"done","scheduling_latency_s":0.002,"duration":0.019,"completed_at":"2019-08-25T20:07:02.791Z"}==> /var/log/gitlab/postgresql/current <==2019-08-25_20:07:12.60606 FATAL: terminating connection due to idle-in-transaction timeout==> /var/log/gitlab/gitlab-rails/production.log <==Started GET "/-/metrics" for 127.0.0.1 at 2019-08-25 13:07:14 -0700Processing by MetricsController#index as HTMLCompleted 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)==> /var/log/gitlab/gitlab-rails/production_json.log <=={"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":200,"duration":1.47,"view":0.43,"db":0.0,"time":"2019-08-25T20:07:14.673Z","params":[],"remote_ip":null,"user_id":null,"username":null,"ua":null,"queue_duration":null,"correlation_id":"b6b00881-ed24-4689-8b30-557689ee08b8"}==> /var/log/gitlab/gitlab-rails/production.log <==Unable to save project. Error: PG::UnableToSend: no connection to the server: ROLLBACK Project ID: 137Completed 500 Internal Server Error in 65516ms (ActiveRecord: 130.9ms)ActiveRecord::StatementInvalid (PG::UnableToSend: no connection to the server: SELECT "project_mirror_data".* FROM "project_mirror_data" WHERE "project_mirror_data"."project_id" = 137 LIMIT 1):app/services/projects/create_service.rb:156:in `fail'app/services/projects/create_service.rb:69:in `rescue in execute'app/services/projects/create_service.rb:13:in `execute'app/controllers/projects_controller.rb:55:in `create'lib/gitlab/session.rb:11:in `with_session'app/controllers/application_controller.rb:450:in `set_session_storage'lib/gitlab/i18n.rb:55:in `with_locale'lib/gitlab/i18n.rb:61:in `with_user_locale'app/controllers/application_controller.rb:444:in `set_locale'lib/gitlab/middleware/multipart.rb:103:in `call'lib/gitlab/request_profiler/middleware.rb:17:in `call'lib/gitlab/middleware/go.rb:20:in `call'lib/gitlab/etag_caching/middleware.rb:13:in `call'lib/gitlab/middleware/correlation_id.rb:16:in `block in call'lib/gitlab/middleware/correlation_id.rb:15:in `call'lib/gitlab/middleware/read_only/controller.rb:40:in `call'lib/gitlab/middleware/read_only.rb:18:in `call'lib/gitlab/middleware/basic_health_check.rb:25:in `call'lib/gitlab/request_context.rb:26:in `call'lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'lib/gitlab/middleware/release_env.rb:12:in `call'Started GET "/favicon.ico" for 123.123.123.123 at 2019-08-25 13:07:17 -0700==> /var/log/gitlab/gitlab-rails/production_json.log <=={"method":"POST","path":"/projects","format":"html","controller":"ProjectsController","action":"create","status":500,"error":"ActiveRecord::StatementInvalid: PG::UnableToSend: no connection to the server\n: SELECT \"project_mirror_data\".* FROM \"project_mirror_data\" WHERE \"project_mirror_data\".\"project_id\" = 137 LIMIT 1","duration":65516.53,"view":0.0,"db":130.92,"time":"2019-08-25T20:07:17.393Z","params":[{"key":"utf8","value":"✓"},{"key":"authenticity_token","value":"[FILTERED]"},{"key":"project","value":{"ci_cd_only":"false","name":"test","namespace_id":"1","path":"test","description":"[FILTERED]","visibility_level":"0"}}],"remote_ip":"123.123.123.123","user_id":1,"username":"jason","ua":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36","queue_duration":null,"gitaly_calls":3,"gitaly_duration":10.09,"correlation_id":"IwZuAwwgJa1"}==> /var/log/gitlab/gitlab-workhorse/current <=={"correlation_id":"IwZuAwwgJa1","duration_ms":65618,"host":"gitlab.mydomain.com","level":"info","method":"POST","msg":"access","proto":"HTTP/1.1","referrer":"https://gitlab.mydomain.com/projects/new","remote_addr":"123.123.123.123:0","remote_ip":"123.123.123.123","status":500,"system":"http","time":"2019-08-25T13:07:17-07:00","uri":"/projects","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36","written_bytes":2926}{"correlation_id":"SZ7aAtGSXm8","duration_ms":16,"host":"gitlab.mydomain.com","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"https://gitlab.mydomain.com/projects","remote_addr":"123.123.123.123:0","remote_ip":"123.123.123.123","status":301,"system":"http","time":"2019-08-25T13:07:17-07:00","uri":"/favicon.ico","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36","written_bytes":180}{"correlation_id":"ZZPO9gNvHR1","encoding":"","file":"/opt/gitlab/embedded/service/gitlab-rails/public/assets/favicon-7901bd695fb93edb07975966062049829afb56cf11511236e61bcf425070e36e.png","level":"info","method":"GET","msg":"Send static file","time":"2019-08-25T13:07:17-07:00","uri":"/assets/favicon-7901bd695fb93edb07975966062049829afb56cf11511236e61bcf425070e36e.png"}{"correlation_id":"ZZPO9gNvHR1","duration_ms":0,"host":"gitlab.mydomain.com","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"https://gitlab.mydomain.com/projects","remote_addr":"123.123.123.123:0","remote_ip":"123.123.123.123","status":200,"system":"http","time":"2019-08-25T13:07:17-07:00","uri":"/assets/favicon-7901bd695fb93edb07975966062049829afb56cf11511236e61bcf425070e36e.png","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36","written_bytes":1611}==> /var/log/gitlab/nginx/gitlab_access.log <==127.0.0.1 - - [25/Aug/2019:13:07:17 -0700] "POST /projects HTTP/1.0" 500 2926 "https://gitlab.mydomain.com/projects/new" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"127.0.0.1 - - [25/Aug/2019:13:07:17 -0700] "GET /favicon.ico HTTP/1.0" 301 180 "https://gitlab.mydomain.com/projects" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"127.0.0.1 - - [25/Aug/2019:13:07:17 -0700] "GET /assets/favicon-7901bd695fb93edb07975966062049829afb56cf11511236e61bcf425070e36e.png HTTP/1.0" 200 1611 "https://gitlab.mydomain.com/projects" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"==> /var/log/gitlab/unicorn/unicorn_stderr.log <==FATAL: terminating connection due to idle-in-transaction timeout
GitLab is moving all development for both GitLab Community Edition
and Enterprise Edition into a single codebase. The current
gitlab-ce repository will become a read-only mirror, without any
proprietary code. All development is moved to the current
gitlab-ee repository, which we will rename to just gitlab in the
coming weeks. As part of this migration, issues will be moved to the
current gitlab-ee project.
If you have any questions about all of this, please ask them in our
dedicated FAQ issue.
Using "gitlab" and "gitlab-ce" would be confusing, so we decided to
rename gitlab-ce to gitlab-foss to make the purpose of this FOSS
repository more clear
I created a merge requests for CE, and this got closed. What do I
need to do?
Everything in the ee/ directory is proprietary. Everything else is
free and open source software. If your merge request does not change
anything in the ee/ directory, the process of contributing changes
is the same as when using the gitlab-ce repository.
Will you accept merge requests on the gitlab-ce/gitlab-foss project
after it has been renamed?
No. Merge requests submitted to this project will be closed automatically.
Will I still be able to view old issues and merge requests in
gitlab-ce/gitlab-foss?
Yes.
How will this affect users of GitLab CE using Omnibus?
No changes will be necessary, as the packages built remain the same.
How will this affect users of GitLab CE that build from source?
Once the project has been renamed, you will need to change your Git
remotes to use this new URL. GitLab will take care of redirecting Git
operations so there is no hard deadline, but we recommend doing this
as soon as the projects have been renamed.
Where can I see a timeline of the remaining steps?