Error 500 on merge request
Closed
Error 500 on merge request
Created by: zoic21
Hi
I have error 500 in gitlab 6.9 when I make a merge resquest. Here the log :
Started GET "/jeedom/core/merge_requests/new?utf8=%E2%9C%93&merge_request%5Bsource_project_id%5D=2&merge_request%5Bsource_branch%5D=master&merge_request%5Btarget_project_id%5D=2&merge_request%5Btarget_branch%5D=stable" for 194.51.110.132 at 2014-05-26 14:11:44 +0200
Processing by Projects::MergeRequestsController#new as HTML
Parameters: {"utf8"=>"✓", "merge_request"=>{"source_project_id"=>"2", "source_branch"=>"master", "target_project_id"=>"2", "target_branch"=>"stable"}, "project_id"=>"jeedom/core"}
Completed 500 Internal Server Error in 1347ms
NoMethodError (undefined method `map!' for false:FalseClass):
app/controllers/projects/merge_requests_controller.rb:78:in `new'
app/controllers/application_controller.rb:59:in `set_current_user_for_thread'
Can anyone help to solve the problem ?
Thank in advance
Created by: albertodega
same issue here. it seems that the worker is nuked due to timeout. increasing timeout time to 90s doesn't fix the issue. how can i recreate the project without loosing everything connected to it (deploy keys, issues, ecc...)?
By Administrator on 2014-05-27T13:55:50 (imported from GitLab project)
Created by: olgaplisko
I have the same error with creating new merge request in gitlab 6.9
Completed 500 Internal Server Error in 32736ms
NoMethodError (undefined method
map!' for false:FalseClass): app/controllers/projects/merge_requests_controller.rb:78:in
new' app/controllers/application_controller.rb:59:in `set_current_user_for_thread'Is there some solution ? Thanks
By Administrator on 2014-06-16T11:49:52 (imported from GitLab project)
Created by: zoic21
Hi
Only solution for me is to delete en recreate projet every time this bug occure Le 17 juin 2014 20:35, "Rodrigo Belem" notifications@github.com a écrit :
I got the same error on my gitlab instalation.
— Reply to this email directly or view it on GitHub https://github.com/gitlabhq/gitlabhq/issues/7027#issuecomment-46347102.
By Administrator on 2014-06-17T19:53:47 (imported from GitLab project)
Created by: albertodega
i've approx 25 deploy keys connected, a bounce of users with different permissions and more than 10k commits on that project, without considering wikis and snippets. am i wrong or i will loose everything doing so? i would really appreciate if someone could find an alternative solution to solve this
😄 By Administrator on 2014-06-17T20:38:37 (imported from GitLab project)
Created by: fe-lix-
Having the same problem. Nothing seems to be strange with this MR.
The only thing that I have notice is that at the same time this error appears in githost.log :
June 18, 2014 10:31 -> ERROR -> Command failed [1]: /usr/bin/git --git-dir=/home/git/gitlab-satellites/oms/oms/.git branch -D devel error: Cannot delete the branch 'devel' which you are currently on
With this stack :
- GitLab 6.9.2
- GitLab Shell 1.8.0
- GitLab API v3
- Ruby 2.0.0p353
- Rails 4.0.5
By Administrator on 2014-06-18T08:38:32 (imported from GitLab project)
Created by: X-Stranger
The same issue with GitLab 6.9. I've just removed satellite repository for that project and re-created it with "bundle exec rake gitlab:satellites:create RAILS_ENV=production". The issue disappear. However I'm not really happy doing the same every 2-3 days (we have 4000+ repos hosting by GitLab).
By Administrator on 2014-06-18T12:38:09 (imported from GitLab project)
Created by: maoueh
Same problem here. My theory about it is the following.
Our machine where gitlab is installed has not best disk performance (because its a virtual machine with a shared disk among multiple other machine). Moreover, our repositories are pretty big, around 75000 commits and around 6 Go. Doing a simple
git status
on the instance in the project's satellite can take more than 40s when cold (less than 2s when warm).Now, in 6.9, since compare branches is mandatory, this cause problems. Compare branches make disk access via git which timeout because operations take took much time. The timeout is caused by the path being cold. Response (code
@commits = compare_action.commits
) returnsfalse
instead of expected object (probably Array) and error about methodmap!
no existing onFalse
object is thrown (code@commits.map! { |commit| Commit.new(commit) }
).For me, to fix the issue for a particular project, I simply went on the machine where the satellite is located, (
/home/git/gitlab-satellites/<group>/<project>
) and did agit status
. This "warmup" the disk for this project. Then, the user can make it's MR, it takes some times but felt under the default 30s timeout.@jacobvosmaer, @dosire or @Razer6 What is the correct config value for this particular timeout? Or is there one at all? I don't think it's
git.timeout
ingitlab.yml
because mine is set at 60 but it don't seems to have effect since it still die at 30s.I have seen in file lib\gitlab\satellite\action.rb that default options is 30 seconds. It is then used in the method but don't seem to be overriden somewhere. Shouldn't this value be taken from gitlab config
git.timeout
directly?Completed 500 Internal Server Error in 30141ms NoMethodError (undefined method `map!' for false:FalseClass): app/controllers/projects/merge_requests_controller.rb:78:in `new' app/controllers/application_controller.rb:59:in `set_current_user_for_thread'
I saw in changelog a lot of improvements for diff in version 7.0. Don't know if it would fix the issue. Anyway, on our side, we are looking at given a dedicated disk the virtual machine having gitlab on.
Regards, Matt
By Administrator on 2014-07-15T17:37:48 (imported from GitLab project)
Created by: dosire
Is this the same problem as https://gitlab.com/gitlab-org/gitlab-ce/issues/295 ?
If so, it is solved in 7.0
By Administrator on 2014-06-20T14:19:20 (imported from GitLab project)
Created by: maoueh
Yes, I read https://gitlab.com/gitlab-org/gitlab-ce/issues/295 and associated commit, it seems to be it and the commit linked would resolve the problem.
However, I still stand that timeout should be taken from
git.timeout
value. It would aid some setups to receive the diff anyway if they are willing to wait a little bit longer than the default 30 seconds.As a reference (cross-posted), I applied the commit fixing this issue manually on my current
6-9-stable
branch and it seems to work:> sudo su git > cd /home/git/gitlab > git fetch origin > git cherry-pick 59e1819561912cb38bf0 [6-9-stable e46b644] Apply soft diff limits to MergeRequest#new page Author: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> 2 files changed, 6 insertions(+), 2 deletions(-)
Regards, Matt
By Administrator on 2014-06-20T14:49:05 (imported from GitLab project)
Created by: maoueh
@dosire No problem. I will keep this in mind for
git.timeout
issue. I will try to pop a development VM to check that it's really the case thatgit.timeout
is not used for these actions. Maybe I will be able to make the fix myself.By Administrator on 2014-06-20T16:48:22 (imported from GitLab project)
Created by: zoic21
I just update on 7.0 version and merge request does not work (like 6.9) : The error in log :
Completed 500 Internal Server Error in 1643ms NoMethodError (undefined method
reduce' for false:FalseClass): app/models/commit.rb:26:in
diff_line_count' app/controllers/projects/merge_requests_controller.rb:94:in `new'By Administrator on 2014-06-22T07:05:03 (imported from GitLab project)
Created by: dosire
@zoic21 This seems quite a different error than the original one:
NoMethodError (undefined method `map!' for false:FalseClass): app/controllers/projects/merge_requests_controller.rb:78:in `new'
Consider opening a new issue for this.
By Administrator on 2014-06-22T07:26:19 (imported from GitLab project)
Created by: shabeepk
+1 Same issue on GitLab 7.0
==> /var/log/gitlab/gitlab-rails/production.log <== Started GET "/developers/Project/merge_requests/new?... ==> /var/log/gitlab/gitlab-rails/githost.log <== July 16, 2014 12:05 -> ERROR -> Command failed [1]: /opt/gitlab/embedded/bin/git --git-dir=/var/opt/gitlab/git-data/gitlab-satellites/developers/Project/.git branch -D master error: Cannot delete the branch 'master' which you are currently on. July 16, 2014 12:05 -> ERROR -> Command failed [1]: /opt/gitlab/embedded/bin/git --git-dir=/var/opt/gitlab/git-data/gitlab-satellites/developers/Project/.git branch -D master error: Cannot delete the branch 'master' which you are currently on. ==> /var/log/gitlab/gitlab-rails/production.log <== Completed 500 Internal Server Error in 320ms NoMethodError (undefined method `reduce' for false:FalseClass): app/models/commit.rb:26:in `diff_line_count' app/controllers/projects/merge_requests_controller.rb:94:in `new'
By Administrator on 2014-07-18T07:01:13 (imported from GitLab project)
Created by: shabeepk
Okay, I think recreating the satellite resolved this issue. Previously I just tried creating the satellite without deleting it. I had to delete it first.
sudo rm /var/opt/gitlab/git-data/gitlab-satellites/developers/Project sudo gitlab-rake gitlab:satellites:create RAILS_ENV=production
By Administrator on 2014-07-23T07:06:24 (imported from GitLab project)
Created by: rbelem
I deleted and recreated the satellite. Now I got the following error when trying to create a merge request.
Compare failed We can't compare selected branches. It may be because of huge diff or satellite timeout. Please try again or select different branches.
By Administrator on 2014-07-25T18:57:31 (imported from GitLab project)
Created by: maoueh
Which timeout did you increased? Is it
git.timeout
value ingitlab.yml
file? If yes, then this timeout value does not have any effect on the satellite git operations. Checkout this MR (and this related one) for information about this.Until Gitlab 7.2 is released, you will need to hack a bit your code. You can try this modification. I have this modification in my setup and it's much better. Be sure to also increase unicorn timeout since it could shutdown the operation before it has finished.
Hope that helps, Matt
By Administrator on 2014-07-25T20:23:37 (imported from GitLab project)
Created by: ayr-ton
By Administrator on 2014-08-22T02:54:53 (imported from GitLab project)
Created by: olgaplisko
Still the same error with gitlab 7.3.2. Changing timeout to 60 and then 90 , didn't fixed the problem. Is there some solution ? developers got rattled with this error!!! it's a long time with reporting the bug without stable solution!!!
By Administrator on 2014-12-07T11:37:54 (imported from GitLab project)
Created by: shabeepk
Try re generating your satellites for the repository.
Thanks,
Regards,
Sharique
Still the same error with gitlab 7.3.2. Changing timeout to 60 and then 90 , didn't fixed the problem. Is there some solution ? developers got rattled with this error!!! it's a long time with reporting the bug without stable solution!!!
— Reply to this email directly or view it on GitHub https://github.com/gitlabhq/gitlabhq/issues/7027#issuecomment-65934489.
By Administrator on 2014-12-07T12:03:51 (imported from GitLab project)