systemd Centos7 => MySQL/MariaDB

| Keine Kommentare | Keine TrackBacks

As the systemd integration keeps on getting forward. It is hardly to be ignored by us MySQL folks :)

Lets have a look into a simple problem, you are not going to solve like you used to solve it. (At least on Centos7 installing the MariaDB package)

Increasing table_open_cache was only a configuration issue. As mysqld was started as root and then switching to the unix user mysql. On Centos7 this was not working anymore. As MariaDB/MySQL ist startet with a service file starting the process as user mysql:

[Service]
Type=simple
User=mysql
Group=mysql
..

As not root (having the right capability) it will be not able to change the open files limit. In the error log you are going to find something like:

150303 11:57:02 [Warning] Changed limits: max_open_files: 1024  
 max_connections: 214  table_cache: 400

Reading the service file, you get already the hint to use LimitNOFILE to configure you open files settings. Quite nice, but who is usually reading a service file? :)

And please do as recommended and create a file like /etc/systemd/system/mariadb.service.d/limits.conf. Don’t change the service file in the /usr/lib/systemd/system directory, as all files in this directory belong to the package maintainer and changes are likely to be lost on the next upgrade. systemd offers you to make your personal changes in /etc/systemd/system/.

Viel Spaß

Erkan

PS: The concrete service file execs /usr/bin/mysqld_safe. Imho this is kinda wrong. I haven’t checked the service files from Percona and MySQL indeed :)

PPS: Thx to Dirk Deimeke for having a look at the problem :)

Keine TrackBacks

TrackBack-URL: http://linsenraum.de/mt/mt-tb.cgi/355

Jetzt kommentieren

Über diese Seite

Diese Seite enthält einen einen einzelnen Eintrag von erkan vom 4.03.15 16:42.

FOSDEM 2015: Docker and MySQL (Fun and bad practice) ist der vorherige Eintrag in diesem Blog.

Using Master-Master for failover? :( ist der nächste Eintrag in diesem Blog.

Aktuelle Einträge finden Sie auf der Startseite, alle Einträge in den Archiven.

Seiten

Powered by Movable Type 4.23-en