When GitLab sends MergeRequest, it returns two resolved logs with Error 500.

Source: Internet
Author: User

When GitLab sends MergeRequest, it returns two resolved logs with Error 500.

Fix with too much Post content

After a sub repo sends a merge request, gitlab's hourglass rolls N circles and returns a 500 error. Check the background production. log (if you have the admin permission, you can access http: // your_gitlab_domain/admin/logs to view the production. log label), the error is as follows:
 
Mysql2: Error: MySQL server has gone away: UPDATE 'merge _ request_diffs 'set 'st _ commits '= '.... ', 'state' = 'collected', 'updated _ at' = '2017-11-03 12:50:16' WHERE 'merge _ request_diffs '. 'id' = 39
Mysql2: Error: closed MySQL connection: ROLLBACK
Completed 500 Internal Server Error in 1396 ms
ActiveRecord: StatementInvalid (Mysql2: Error: closed MySQL connection: ROLLBACK ):
App/services/merge_requests/create_service.rb: 10: in 'execute'
App/controllers/projects/merge_requests_controller.rb: 87: in 'create'

In short, we can see that the error is in mysql.
According to this idea, you can easily get more issue on google, find a simple solution, and modify the mysql configuration environment.

/Etc/my. cnf

[Mysqld]
Max_allowed_packet = 512 M

Add max_allowed_packet to mysqld, adjust the value, and increase it to an appropriate number.

Then reload the mysql service.

Character Set fix

Similarly, production. log has the following error:

Mysql2: Error: Incorrect string value: '\ xE4 \ xBB \ x85 \ xE5 \ xB7 \ xB2... 'for column' st _ diffs' at row 1: UPDATE 'merge _ request_diffs 'SET 'st _ commits' = '--- \ n-: id: 1 ........
Completed 500 Internal Server Error in 2210 ms

This error is caused by incompatibility of character sets. We recommend that you use UTF-8 when creating a database. If you use latin, the above error may occur. This issue solves this problem very well.
Go to the database corresponding to the mysql database and run the following command:

Alter table merge_request_diffs default character set = utf8 collate = utf8_unicode_ci;
Alter table merge_request_diffs convert to character set utf8 collate utf8_unicode_ci;

Then you can continue to use it.

Install GitLab on Ubuntu 12.04

GitLab 5.3 upgrade considerations

Deploy GitLab on CentOS (self-managed Git project repository)

Install GitLab 6.0.2 on RHEL6/CentOS6/ScientificLinux6

CentOS 6.5 GitLab installation tutorial and Related Problems

GitLab details: click here
GitLab: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.