How to solve docker container latency

Viewed 374

I have a VPS with docker installed running a game server.. I have a problem: I can't connect to MariaDB 10.5.5 running on the same machine (out of docker container) with address bound to 127.0.0.1 but if I bind the address to 0.0.0.0 I can connect but HikariCP or any other mysql connector took 3000ms to connect.. Does to solve this issue?

1 Answers

3 second lag sounds like a DNS timeout. Add skip_name_resolve=1 to your my.cnf's [mysqld] section.

Related