28800 is the default value for wait_timeout, so either your option file is not being used, or that particular setting is getting overwritten by another option file. I’d first check the ownership and permissions on your “mysqld.cnf” option file. Normally the permissions should be something like “640” (chmod 640), and owned by whatever user you run your DB as (i.e. chown mysql:mysql). If that is not the issue, then I’d start looking at the other option files that can be used by default to see if the setting is getting overwritten somewhere else (especially /etc/my.cnf).
ls
drwxr-xr-x 2 root root 4096 Jan 23 23:22 conf.d/
-rw-r--r-- 1 root root 380 Dec 13 20:58 my.cnf
-rw-r--r-- 1 root root 839 Jan 22 2017 my.cnf.fallback
-rw-r--r-- 1 root root 380 Dec 13 20:58 my.cnf.old
-rw-r--r-- 1 root root 380 Oct 24 01:18 percona-xtradb-cluster.cnf
drwxr-xr-x 2 root root 4096 Feb 6 16:38 percona-xtradb-cluster.conf.d/
ls percona-xtradb-cluster.conf.d/
-rw-r--r-- 1 root root 78 Oct 24 01:18 client.cnf
-rw-r--r-- 1 root root 876 Feb 6 16:38 mysqld.cnf
-rw-r--r-- 1 root root 450 Feb 6 16:29 mysqld_safe.cnf
-rw-r--r-- 1 root root 1064 Oct 24 01:18 wsrep.cnf
The strange thing is that the owner and group is not mysql.mysql, but the service is runnable. Hence, I don’t think that is an issue. IMO, mysql first tries to load config from /etc/my.cnf and based on the include directive, it would then load config from the included directories. I try to add an incorrect config in percona-xtradb-cluster.conf.d/mysqld.cnf and restart mysql which failed as expected. So it does read the config in mysqld.cnf. But configs in mysqld.cnf are still being overridden, and there are no other configs in other fiiles. I am very confused about this. Anyway, thanks for the response.
ok, I find the reason why I think it’s not working as expected. I actually want to set wait_timeout in the config, but wait_timeout=30000 does not work. However, when I add interactive_timeout=30000 to config, It actually works for both wait_timeout and interactive_timeout. Is there anything about this in the percona document? How do I know which is the correct config parameters?
Yeah that’s odd. I tested it out locally and am able to set both individually. Basically the wait_timeout variable is for non-interactive connections, and interactive_timeout is for interactive connections. Would be interesting to see if there is an XtraDB-cluster specific reason for it.
Otherwise I’d try setting wait_timeout directly in /etc/my.cnf or /etc/mysql/my.cnf under the [mysqld] tag to see if it happens to pick it up that way. Still seems likely there is an option file issue going on there somewhere.
I’d see if lorraine.pocklington is able to ask support for you (she’s the community manager here). I’m guessing it’s not a bug, and just something we’re missing, so hopefully they could be of assistance.
Let me know if I can provide more details for you guys. Becuase I actually launch a new EC2 to test this with my install script. It’s basically just what percona provides in the online document, and I use apt to install percona. Thanks for the help!