Open file-related variables fail using systemd

Bug #1590724 reported by Ceri WIlliams
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

2 settings needed to be added to the unit file for PS 5.7 on Debian Jessie to honour:

- open_files_limits
- table_open_cache
- max_connections

A server went up in production with settings that were unexpected.

Changes made to /lib/systemd/system/mysql.service:

LimitNOFILE=infinity
LimitMEMLOCK=infinity

Tags: pkg rdba
tags: added: pkg
tags: added: rdba
Revision history for this message
marki555 (marki-g) wrote :

Don't change config files in /lib/systemd. They will be overwritten. https://dev.mysql.com/doc/refman/5.7/en/server-management-using-systemd.html

Instead create a directory /etc/systemd/system/mysql.service.d/ and put a file (for example override.conf) there with your changes:
[Service]
LimitNOFILE=32000

But it would be a good idea to have more sane defaults in the unit provided by the percona package.

BTW, mysql will complain (log a Warning) on startup if it can't set the values for open files or max_connections, so it should have been spotted before putting it in production :)

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3466

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.