Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #7027

Closed
Open
Created 11 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

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

Linked issues
0


  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: Wachiwi

    Are there any steps to reproduce this?

    By Administrator on 2014-05-26T12:19:36 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: zoic21

    I don't think so. My error is only on one of my project so I think there is somethink in project gitlab that do not like.

    By Administrator on 2014-05-26T12:25:53 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: zoic21

    After delete and recreate project it's ok

    By Administrator on 2014-05-27T08:18:11 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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:innew' 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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: rbelem

    I got the same error on my gitlab instalation.

    By Administrator on 2014-06-17T18:34:39 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: rbelem

    zoic21, Could you reopen this bug? Your solution is not a proper one.

    Thanks.

    By Administrator on 2014-06-17T22:07:55 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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) returns false instead of expected object (probably Array) and error about method map! no existing on False 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 a git 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 in gitlab.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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dosire

    @maoueh Thanks for checking and cross-posting the cherry-pick result. If you want to change the git.timeout I think it is better to open another issues or feature request on feedback.gitlab.com

    By Administrator on 2014-06-20T16:23:56 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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 that git.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)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dosire

    @maoueh OK, great!

    By Administrator on 2014-06-20T20:10:35 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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:indiff_line_count' app/controllers/projects/merge_requests_controller.rb:94:in `new'

    By Administrator on 2014-06-22T07:05:03 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: nilejiang

    I am using 7.0, I got the same problem. I used @X-Stranger 's solution to resolve it.

    By Administrator on 2014-07-23T03:26:34 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: nilejiang

    Once I delete and recreate it, the problem resolved, but it happens again after a little time. Hope a final resolution. I don't know if there is somthing wrong with that branch.

    By Administrator on 2014-07-23T07:39:33 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: shabeepk

    @nilejiang Ahan, thanks for the heads up 😄 I'll watch out for it going down again, but its really strange if a fine repo suddenly goes bad for no reason ... 😕

    By Administrator on 2014-07-23T08:03:27 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: nilejiang

    @shabeepk Yes, I agree. But I don't know what's the real reason.

    By Administrator on 2014-07-23T08:57:01 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: shabeepk

    Did you try increasing git timeout?

    By Administrator on 2014-07-25T19:06:48 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: rbelem

    Yup! Increased to 3600.

    By Administrator on 2014-07-25T19:59:41 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: shabeepk

    Still the same result?

    By Administrator on 2014-07-25T20:04:22 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: rbelem

    I ran the tests with timeout set to 3600. Should I increase?

    By Administrator on 2014-07-25T20:16:26 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: maoueh

    Which timeout did you increased? Is it git.timeout value in gitlab.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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: shabeepk

    This looks promising.

    By Administrator on 2014-07-25T20:27:41 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: rbelem

    It did the trick! Thanks!

    But I still get error 500 when trying to create a merge request from a really huge change set.

    By Administrator on 2014-07-25T21:03:47 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: ayr-ton

    @rbelem Try to increase timeout for git satellites. Something like 3600 too.

    By Administrator on 2014-08-21T20:03:52 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: shabeepk

    @ayr-ton How do we increase the time out for satellites?

    By Administrator on 2014-08-21T20:58:58 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: ayr-ton

    @shabeepk https://github.com/ayr-ton/gitlabhq/blob/07537faca72e2475a25e1e73c12bc924499afc27/config/gitlab.yml.example#L200

    By Administrator on 2014-08-22T02:54:53 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
None
Assign to
Milestone
No milestone
None
None
Time tracking
Due date
None
None
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Confidentiality
Not confidential

You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

Lock issue
Unlocked
participants
Reference: