Gert-Jan
Gert-Jan

Reputation: 802

MySQL warnings about max_open_files and table_open_cache

I have a MySQL 5.7 server on Ubuntu 18. When the server starts it writes the following warnings in the error.log:

[Warning] Changed limits: max_open_files: 5000 (requested 7500)
[Warning] Changed limits: table_open_cache: 1745 (requested 2000)

Can somebody explain what is causing these warnings (and what I can do to make them go away)?

Upvotes: 4

Views: 6613

Answers (1)

Gert-Jan
Gert-Jan

Reputation: 802

Answering my own question. The limit for max open files is defined in the systemd script /lib/systemd/system/mysql.service:

# MySQL systemd service file

[Unit]
Description=MySQL Community Server
After=network.target
....

LimitNOFILE=5000

Increasing the value of LimitNOFILE to 7500 solved both warnings.

Upvotes: 7

Related Questions