MYSQLinteractive_timeout and wait_timeout, NGINXkeepalive_timeoutMYSQLinteractive_timeout, and wait_timeout interactive and non-interactive connections. whether the connection is in interactive mode is determined by the client. what kind of connection is usually used? NGINXkeepalive_timeout: Configure MYSQL interactive_timeout, wait_timeout, and NGINX keepalive_timeout.
MYSQL interactive_timeout and wait_timeout
Interactive and non-interactive connections. whether the connection is in interactive mode is determined by the client.
Under what circumstances is the connection used?
NGINX keepalive_timeout
What does the second parameter of this configuration mean?
My current server has configured the first parameter keepalive_timeout 50;
However, the process number remains changing during the request and does not wait for 50 seconds ..
Why?
------ Solution --------------------
My understanding is as follows:
NGINX keepalive_timeout
To understand this, you have to understand HTTP. Generally, the connection is closed after an HTTP request ends, but sometimes this connection can be maintained for performance, and will be directly used in the next request. Keepalive_timeout is the maximum waiting time for two requests. if keepalive_timeout is exceeded, it will be processed as a timeout. However, this also depends on the client. if the client does not support keep-alive, the connection will not be retained, but will be closed immediately, and the new connection will be re-opened next time.
MYSQL interactive_timeout and wait_timeout
Generally, it can be understood that non-interactive connections are accessed through the TCP/IP port 3306, and interactive connections are accessed using mysql commands.
The timeout value is the same, that is, the maximum waiting time when no operation is performed.