Comment 14 for bug 1434758

Revision history for this message
Akhil Mohan (akhil-mohan) wrote : Re: [Bug 1434758] Re: mysqld: errno: 24 - Too many open files

Hi Robie,

The internal assessment here is that most appropriate solution would be
the one you have mentioned as the last option.

It would be easier if user owns the responsibility for creating and
managing the MySQL service file under /etc with following settings or
more as needed:
[Service]
LimitNOFILE=xxxxx
LimitMEMLOCK=xxxxx

This will help in avoiding any conflict between user settings and
package settings. We may add a comment to explain this to the users.

Please let me know if you need more information.

Regards,
Akhil

On Monday 30 March 2015 05:23 PM, Robie Basak wrote:
> I'm reluctant to raise the default limit to infinity because this may
> introduce a security vulnerability due to select() macro overflow. See
> https://lists.ubuntu.com/archives/ubuntu-
> devel/2010-September/031446.html for details. If someone from upstream
> can confirm definitely that MySQL definitely does handle higher number
> file descriptors correctly though, then I have no objection.
>
> I understand though that users do want to be able to tune the value. So,
> what else can we do? It seems to me that now that we're using systemd
> there are two different places where the setting can be made - from
> my.cnf, or from the systemd service definition - whereas previously
> users tended to do it in just my.cnf. Having it set in two places is
> confusing. my.cnf cannot raise beyond the systemd setting, but we cannot
> make the systemd setting "infinity" because of the security concern
> above.
>
> So given that I don't want to change systemd's default to "infinity", I
> think it makes sense to expect users to change the systemd service
> definition (copy /lib/systemd/system/mysql.service to
> /etc/systemd/system/ and set LimitNOFILE etc there) if they want to
> change the default value, and to not set open_files_limit in my.cnf at
> all.
>
> If this is reasonable, then this bug is Invalid. Is it reasonable?
> Comments appreciated.
>
> ** Changed in: mysql-5.6 (Ubuntu)
> Importance: Undecided => Medium
>
> ** Changed in: mysql-5.6 (Ubuntu)
> Status: New => Triaged
>