Open files limit no longer applied after in place upgrade from 5.6 to 5.7
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Invalid
|
Undecided
|
Unassigned | |||
5.7 |
Triaged
|
Medium
|
Unassigned |
Bug Description
The in place upgrade from 5.6 to 5.7.17 left the mysql service without extended open files limit.
The target system is Ubuntu Server 14.04, while mysql version is the one which includes TokuDB engine. The open files limits were previously set in /etc/security/
* soft nofile 1000000
* hard nofile 1000000
The limits were previously checked as being correctly applied by looking at /proc/mysqlPid/
After upgrade, nofile limit is set to 4096. No server configuration was changed.
If this is not a bug, please kindly suggest what configuration can be applied in order to raise the limits to previous values.
Thank you
I just setup a 14.04 box yesterday with PS 5.7.17.
The only confirmed way for me to have it honor *any* nofile/LimitNOFILE setting was to add the line:
session required pam_limits.so
to
/etc/pam. d/common- session
Then, perhaps out of pure superstition or old habits, I logged out completely from the box, all of my ssh sessions terminated. (Mainly, this is because I use ssh session sharing (ControlMaster) which requires me to log out of every session before a new ssh session to the box gives me a legitimately new login)
Once this was done, 14.04 + PS init.d/mysql script would honor my /etc/security/ limits. conf
I can't comment on how your 5.6 script worked, perhaps it was edited to hardcode nofile or maybe it was a bit more featureful than the 5.7 one, but the stock 5.7 one only works with the aforementioned steps.
Unfortunately, 14.04 was a major transitory release between system V, upstart and systemd - which means unless you find exact instructions for your service, you may have to edit some combination of the 3 files to get it all to jive. I am confident that the shipped PS 5.7 init.d script is entirely system V and needs to load that pam_limits.so for pam sessions in order for it to enable reading the limits.conf file.