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

Closed
Open
Created May 26, 2015 by Administrator@rootOwner

500 MySQL Error for some Merge Reqeusts

Created by: schemar

Summary: Some, but not all, merge requests result in a 500 Mysql2::Error: Incorrect string value error Steps to reproduce: To be honest, I don't know. It happens for some merge requests, but not all. On multiple projects. We did many migrations. We started from a 6.something version. The latest migration was from 7.9 to v7.11.2. But the error also happened before the migration. MySQL is version 5.6.16. Expected behavior: Merge request created Observed behavior: 500 Mysql2::Error: Incorrect string value error Log:

Started POST "/user/project/merge_requests" for <ip here> at 2015-05-26 1
Processing by Projects::MergeRequestsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "merge_request"=>{"title"=>"37 45...
Mysql2::Error: Incorrect string value: '\xE2\x89\xA410A...' for column 'st_diffs' at row 1: UPDATE `merge_request_diffs` SET `st_commits` = '---\n- :id: <id here>\n :message: |\n    <message here>\n  :parent_ids:\n  - <parent ids here>\n  :authored_date: 2015-05-18 15:17:00.000000000 +00:00\n  :author_name: <name here>\n  :author_email: <email here>\n  :committed_date: 2015-05-21 22:07:05.000000000 +00:00\n  :committer_name: <name here> ...
Completed 500 Internal Server Error in 577ms

ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xE2\x89\xA410A...' for c
  app/models/merge_request_diff.rb:142:in `reload_diffs'
  app/models/merge_request_diff.rb:44:in `reload_content'
  app/services/merge_requests/create_service.rb:10:in `execute'
  app/controllers/projects/merge_requests_controller.rb:89:in `create'

For another merge request, the error is analogous (different string value):

Mysql2::Error: Incorrect string value: '\xE2\x86\x92 co...' for column 'st_diffs' at row 1: UPDAT

Output of checks * Output of 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.6.3 ? ... OK (2.6.3)
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: ... 
2/1 ... ok
2/6 ... ok
2/7 ... ok
2/8 ... ok
2/9 ... ok
2/10 ... ok
2/11 ... ok
2/12 ... ok
2/14 ... ok
2/15 ... ok
2/18 ... ok
2/19 ... ok
2/20 ... ok
2/21 ... ok
2/22 ... ok
2/23 ... ok
2/24 ... ok
2/25 ... ok
16/27 ... 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 is disabled in config/gitlab.yml

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: ... 
2/1 ... yes
2/6 ... yes
2/7 ... yes
2/8 ... yes
2/9 ... yes
2/10 ... yes
2/11 ... yes
2/12 ... yes
2/14 ... yes
2/15 ... yes
2/18 ... yes
2/19 ... yes
2/20 ... yes
2/21 ... yes
2/22 ... yes
2/23 ... yes
2/24 ... yes
2/25 ... yes
16/27 ... yes
Projects have satellites? ... 
2/1 ... yes
2/6 ... yes
2/7 ... yes
2/8 ... yes
2/9 ... yes
2/10 ... yes
2/11 ... yes
2/12 ... yes
2/14 ... yes
2/15 ... yes
2/18 ... yes
2/19 ... yes
2/20 ... yes
2/21 ... yes
2/22 ... yes
2/23 ... yes
2/24 ... yes
2/25 ... yes
16/27 ... 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 ? ... yes (2.4.1)
Active users: 11

Checking GitLab ... Finished

Version of GitLab: v7.11.2 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.9.1
Rake Version:   10.4.2
Sidekiq Version:3.3.0

GitLab information
Version:        7.11.2
Revision:       dac18e7
Directory:      /home/git/gitlab
DB Adapter:     mysql2
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        2.6.3
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git

MySQL
Version:        5.6.16
Directory:      /home/mysql/mysql-5.6.16-linux-glibc2.5-x86_64
Assignee
Assign to
Time tracking