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

Closed
Open
Created Oct 17, 2012 by Administrator@rootOwner

Mysql2::Error: Got a packet bigger than 'max_allowed_packet' bytes

Created by: sroth80021

I ran into an issue today in which the default mysql max_allowed_packet size (1 Mb I think) was not sufficient, and this caused a GitLab 500 error due to an internal MySQL error when a Merge Request with a large delta was saved.

The error started out with this text:

Started POST "/abcdef/merge_requests" for 127.0.0.1 at 2012-10-16 22:13:04 -0700 Processing by MergeRequestsController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"dbHat41zVt6dmrK3LGb2qhEFUdpGnJiGyUegQ4ZgguM=", "merge_request"=>{"source_branch"=>"constraint1", "target_branch"=>"master", "title"=>"Add a b c constraints", "assignee_id"=>"11"}, "project_id"=>"abcdef"} Completed 500 Internal Server Error in 384ms

ActiveRecord::StatementInvalid (Mysql2::Error: Got a packet bigger than 'max_allowed_packet' bytes: UPDATE merge_requests SET st_diffs = ...

I think the diff size exceeded 1 Mb.

I am using a default OOTB MySQL install/config on my Centos6 box. I think most users will be using OOTB MySQL configs.

I think it would be good if the docs stated that you might want to tweak this MySQL setting. I suspect over time we will find some more.

Something like this...

You may want to edit your MySQL configuration file, typically at /etc/my.cnf, and increase the maximum packet size. This may help if you perform large merge requests.

For example:

[mysqld] max_allowed_packet = 128M

Assignee
Assign to
Time tracking