What is the recommended value for `wait_timeout` server parameter in Azure Database for MySQL ?

Ganesh 41 Reputation points
2022-11-14T14:02:48.247+00:00

The default value is 28800 as mentioned in the mysql docs, but I can see the default is 120 in azure when creating a DB. Why is there such a huge difference?
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
988 questions
0 comments No comments
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,542 Reputation points Microsoft Employee Moderator
    2022-11-14T17:02:50.337+00:00

    Hi, @Ganesh Welcome to the Microsoft Q&A platform, and thanks for using Azure Services.
    If I understand correctly you want to know why the difference in the default value in the MySQL docs and in azure docs.
    Wait_timout was set to 120 in a single server but in flexible sever it is 28800. The reason for the smaller value is because of the single server architecture where all the connections were proxied through the gateway server. Having a higher value can keep the stale connection live and can impact other customers as all servers in a region connect to the same gateway. The flexible server does not have this issue as the connection directly lands on the server.

    Hope this information helps.

    Regards
    Geetha

    Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.