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
  • #8119

Closed
Open
Created Oct 21, 2014 by Administrator@rootOwner

Timeout and slow processing on search requests

Created by: sennav

  1. Summary: The search request for a specific project takes too long or it timeout.

  2. Steps to reproduce: Just select one project (gitlaburl.com/project_id) and search for something on the search box. The search from the dasboard works fine

  3. Expected behavior: The expected behavior is to get the search results. After the upgrade to version 7.4, the search always returned error 500. I've noticed that the unicorn worker were restarted after the request. So I increased the timeout to 120 seconds on config/unicorn.rb. The requests are taking 1 min to finish now. I've also noticed that in gitlab.com the requests are quite faster, so I don't know if I'm missing something on configuration files.

  4. Observed behavior: Timeout.

  5. Relevant logs and/or screenshots: This is the log of one request after I changed the timeout to 120 seconds:

    Started GET "/search?utf8=%E2%9C%93&search=test&group_id=&project_id=28&search_code=true&repository_ref=" for 127.0.0.1 at 2014-10-21 17:12:23 -0200
    Processing by SearchController#show as HTML
    Parameters: {"utf8"=>"✓", "search"=>"test", "group_id"=>"", "project_id"=>"28", "search_code"=>"true", "repository_ref"=>""}
    Completed 200 OK in 75798ms (Views: 37594.5ms | ActiveRecord: 25.4ms)
    Started GET "/project/notes?target_id=234&target_type=issue&last_fetched_at=1413918728" for 127.0.0.1 at 2014-10-21 17:13:28 -0200
    Processing by Projects::NotesController#index as JSON
    Parameters: {"target_id"=>"234", "target_type"=>"issue", "last_fetched_at"=>"1413918728", "project_id"=>"project"}
    Completed 200 OK in 29ms (Views: 0.2ms | ActiveRecord: 6.0ms)
    Started POST "/api/v3/internal/allowed" for 127.0.0.1 at 2014-10-21 17:13:28 -0200
    Started GET "/project/notes?target_id=234&target_type=issue&last_fetched_at=1413918728" for 127.0.0.1 at 2014-10-21 17:13:29 -0200
    Processing by Projects::NotesController#index as JSON
    Parameters: {"target_id"=>"234", "target_type"=>"issue", "last_fetched_at"=>"1413918728", "project_id"=>"project"}
    Completed 200 OK in 319ms (Views: 0.4ms | ActiveRecord: 19.7ms)
    Started GET "/project/notes?target_id=234&target_type=issue&last_fetched_at=1413918728" for 127.0.0.1 at 2014-10-21 17:13:29 -0200
    Processing by Projects::NotesController#index as JSON
    Parameters: {"target_id"=>"234", "target_type"=>"issue", "last_fetched_at"=>"1413918728", "project_id"=>"project"}
    Completed 200 OK in 32ms (Views: 0.2ms | ActiveRecord: 5.9ms)
    Started GET "/project/notes?target_id=234&target_type=issue&last_fetched_at=1413918728" for 127.0.0.1 at 2014-10-21 17:13:29 -0200
    Processing by Projects::NotesController#index as JSON
    Parameters: {"target_id"=>"234", "target_type"=>"issue", "last_fetched_at"=>"1413918728", "project_id"=>"project"}
    Completed 200 OK in 30ms (Views: 0.2ms | ActiveRecord: 5.9ms)
    Started GET "/project/notes?target_id=234&target_type=issue&last_fetched_at=1413918728" for 127.0.0.1 at 2014-10-21 17:13:29 -0200
    Processing by Projects::NotesController#index as JSON
    Parameters: {"target_id"=>"234", "target_type"=>"issue", "last_fetched_at"=>"1413918728", "project_id"=>"project"}
    Completed 200 OK in 29ms (Views: 0.2ms | ActiveRecord: 5.7ms)
    Completed 200 OK in 67899ms (Views: 36228.1ms | ActiveRecord: 23.3ms)
  6. Output of checks: Results of GitLab Application Check (sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true);

    Checking Environment ...
    
    Git configured for git user? ... yes
    
    Checking Environment ... Finished
    
    Checking GitLab Shell ...
    
    GitLab Shell version >= 2.0.1 ? ... OK (2.0.1)
    Repo base directory exists? ... yes
    Repo base directory is a symlink? ... no
    Repo base owned by git:git? ... yes
    Repo base access is drwxrws---? ... yes
    Satellites access is drwxr-x---? ... yes
    hooks directories in repos are links: ... 
    5/25 ... ok
    [...]
    
    Running /home/git/gitlab-shell/bin/check
    Check GitLab API access: OK
    Check directories and files: 
    /home/git/repositories: OK
    /home/git/.ssh/authorized_keys: OK
    Test redis-cli executable: redis-cli 2.2.12
    Send ping to redis server: PONG
    gitlab-shell self-check successful
    
    Checking GitLab Shell ... Finished
    
    Checking Sidekiq ...
    
    Running? ... yes
    Number of Sidekiq processes ... 1
    
    Checking Sidekiq ... Finished
    
    Checking LDAP ...
    
    LDAP users with access to your GitLab server (only showing the first 100 results)
    [ommited]
    
    Checking LDAP ... Finished
    
    Checking GitLab ...
    
    Database config exists? ... yes
    Database is SQLite ... no
    All migrations up? ... yes
    Database contains orphaned GroupMembers? ... no
    GitLab config exists? ... yes
    GitLab config outdated? ... no
    Log directory writable? ... yes
    Tmp directory writable? ... yes
    Init script exists? ... yes
    Init script up-to-date? ... yes
    projects have namespace: ... 
    5/25 ... yes
    [...]
    
    Projects have satellites? ... 
    5/25 ... yes
    [...]
    
    Redis version >= 2.0.0? ... yes
    Ruby version >= 2.0.0 ? ... yes (2.1.2)
    Your git bin path is "/usr/bin/git"
    Git version >= 1.7.10 ? ... no
    Try fixing it:
    Update your git to a version >= 1.7.10 from 1.7.9
    Please fix the error above and rerun the checks.
    
    Checking GitLab ... Finished
    

    Version of GitLab running: SHA commit 536f61e0

    Setup:

    System information
    System:     Ubuntu 12.04
    Current User:   git
    Using RVM:  no
    Ruby Version:   2.1.2p95
    Gem Version:    2.2.2
    Bundler Version:1.7.4
    Rake Version:   10.3.2
    Sidekiq Version:2.17.0
    
    GitLab information
    Version:    7.4.0.rc1
    Revision:   536f61e
    Directory:  /home/git/gitlab
    DB Adapter: mysql2
    URL:        http://gitlab
    HTTP Clone URL: http://gitlab/some-project.git
    SSH Clone URL:  git@gitlab:some-project.git
    Using LDAP: yes
    Using Omniauth: no
    
    GitLab Shell
    Version:    2.0.1
    Repositories:   /home/git/repositories/
    Hooks:      /home/git/gitlab-shell/hooks/
    Git:        /usr/bin/git
    
  7. Possible fixes: I really hope that I can help you on this, but I have to get some time to learn through all your guides and code. Please let me know if this issue doesn't comply with your contributing guidelines. Thanks for all your work anyway.

Assignee
Assign to
Time tracking