bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

MySQL和timeout的示例分析

這篇文章主要介紹了MySQL和timeout的示例分析,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

成都創(chuàng)新互聯(lián)于2013年創(chuàng)立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站建設(shè)、成都做網(wǎng)站網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元金沙做網(wǎng)站,已為上家服務(wù),為金沙各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18980820575

下面總結(jié)下和連接有關(guān)的timeout

slave-net-timeout

The number of seconds to wait for more data from the master before the slave considers the connection broken, aborts the read, and tries to reconnect. The first retry occurs immediately after the timeout. The interval between retries is controlled by the MASTER_CONNECT_RETRY option for the CHANGE MASTER TO statement, and the number of reconnection attempts is limited by the --master-retry-count option. The default is 3600 seconds (one hour).
當(dāng)slave認(rèn)為連接master的連接有問題時(shí),就等待N秒,然后斷開連接,重新連接master

net_read_timeout :

The number of seconds to wait for more data from a connection before aborting the read. When the server is reading from the client, net_read_timeout is the timeout value controlling when to abort
在終止讀之前,從一個(gè)連接獲得數(shù)據(jù)而等待的時(shí)間秒數(shù);當(dāng)服務(wù)正在從客戶端讀取數(shù)據(jù)時(shí),net_read_timeout控制何時(shí)超時(shí)。

net_write_timeout:

The number of seconds to wait for a block to be written to a connection before aborting the write.When the server is writing to the client, net_write_timeout is the timeout value controlling when to abort。
在終止寫之前,等待多少秒把block寫到連接;當(dāng)服務(wù)正在寫數(shù)據(jù)到客戶端時(shí),net_write_timeout控制何時(shí)超時(shí)

wait_timeout

The number of seconds the server waits for activity on a noninteractive connection before closing it.
服務(wù)器端無交互狀態(tài)的連接,直到被服務(wù)器端強(qiáng)制關(guān)閉而等待的時(shí)間

interactive_timeout :

The number of seconds the server waits for activity on an interactive connection before closing it.
與服務(wù)器端無交互狀態(tài)的連接,直到被服務(wù)器端強(qiáng)制關(guān)閉而等待的時(shí)間

connect_timeout

The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. The default value is 10 seconds.

等待一個(gè)連接響應(yīng)的時(shí)間

connect_timeout:在獲取連接階段(authenticate)起作用

interactive_timeout和wait_timeout:在連接空閑階段(sleep)起作用
net_read_timeout和net_write_timeout:則是在連接繁忙階段(query)起作用。

獲取MySQL連接是多次握手的結(jié)果,除了用戶名和密碼的匹配校驗(yàn)外,還有IP->HOST->DNS->IP驗(yàn)證,任何一步都可能因?yàn)榫W(wǎng)絡(luò)問題導(dǎo)致線程阻塞。為了防止線程浪費(fèi)在不必要的校驗(yàn)等待上,超過connect_timeout的連接請(qǐng)求將會(huì)被拒絕。

即使沒有網(wǎng)絡(luò)問題,也不能允許客戶端一直占用連接。對(duì)于保持sleep狀態(tài)超過了wait_timeout(或interactive_timeout,取決于client_interactive標(biāo)志)的客戶端,MySQL會(huì)主動(dòng)斷開連接。

即使連接沒有處于sleep狀態(tài),即客戶端忙于計(jì)算或者存儲(chǔ)數(shù)據(jù),MySQL也選擇了有條件的等待。在數(shù)據(jù)包的分發(fā)過程中,客戶端可能來不及響應(yīng)(發(fā)送、接收、或者處理數(shù)據(jù)包太慢)。為了保證連接不被浪費(fèi)在無盡的等待中,MySQL也會(huì)選擇有條件(net_read_timeout和net_write_timeout)地主動(dòng)斷開連接。

感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“MySQL和timeout的示例分析”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來學(xué)習(xí)!

新聞標(biāo)題:MySQL和timeout的示例分析
新聞來源:http://vcdvsql.cn/article14/gjside.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站企業(yè)建站品牌網(wǎng)站制作網(wǎng)站維護(hù)用戶體驗(yàn)小程序開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)