Phabricator many time_wait connection to mysql

Hi,
there are many time_wait connections in our server.

something like this:

tcp 0 0 172.16.10.73:57312 172.16.10.77:3306 TIME_WAIT -
tcp 0 0 172.16.10.73:57342 172.16.10.77:3306 TIME_WAIT -
tcp 0 0 172.16.10.73:57240 172.16.10.77:3306 TIME_WAIT -
tcp 0 0 172.16.10.73:57154 172.16.10.77:3306 TIME_WAIT -
tcp 0 0 172.16.10.73:56840 172.16.10.77:3306 TIME_WAIT -
tcp 0 0 172.16.10.73:56868 172.16.10.77:3306 TIME_WAIT -
tcp 0 0 172.16.10.73:57218 172.16.10.77:3306 TIME_WAIT -
tcp 0 0 172.16.10.73:56986 172.16.10.77:3306 TIME_WAIT -

I have to set tcp_fin_timeout=1 to reduce the time_wait connection.

at the time of writing this: TIME_WAIT 141 in total

Don’t know how/where to find the cause . Please instruct me. thanks!

commit b9d52f38ddadafc5b5d768f3cc1003bba80efd05
Merge: 621f9de4bb f686a0b827
Author: epriestley <git@epriestley.com>
Date:   Sat May 30 04:55:48 2020 -0700

    (stable) Promote 2020 Week 21

[24-Jun-2020 12:05:15 Asia/Shanghai] arcanist(head=master, ref.master=d1c07b4d2634), phabricator(head=stable, ref.stable=b9d52f38ddad, custom=2)
[24-Jun-2020 12:05:15 Asia/Shanghai]   #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<arcanist>/src/error/PhutilErrorHandler.php:263]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #1 <#2> sprintf(string, array) called at [<phabricator>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:244]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #2 <#2> PhabricatorModularTransactionType::renderValue(array) called at [<phabricator>/src/applications/pholio/xaction/PholioImageNameTransaction.php:34]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #3 <#2> PholioImageNameTransaction::getTitle() called at [<phabricator>/src/applications/transactions/storage/PhabricatorModularTransaction.php:127]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #4 <#2> PhabricatorModularTransaction::getTitle() called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:819]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #5 <#2> PhabricatorApplicationTransaction::getTitleForMail() called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:809]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #6 <#2> PhabricatorApplicationTransaction::getTitleForMailWithRenderingTarget(string) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:823]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #7 <#2> PhabricatorApplicationTransaction::getTitleForTextMail() called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:5263]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #8 <#2> PhabricatorApplicationTransactionEditor::getTitleForTextMail(PholioTransaction) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3529]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #9 <#2> PhabricatorApplicationTransactionEditor::addHeadersAndCommentsToMailBody(PhabricatorMetaMTAMailBody, array, string, string) called at [<phabricator>/src/applications/pholio/editor/PholioMockEditor.php:76]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #10 <#2> PholioMockEditor::buildMailBody(PholioMock, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3166]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #11 <#2> PhabricatorApplicationTransactionEditor::buildMailForTarget(PholioMock, array, PhabricatorMailTarget) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3109]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #12 <#2> PhabricatorApplicationTransactionEditor::buildMailWithRecipients(PholioMock, array, array, array, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3052]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #13 <#2> PhabricatorApplicationTransactionEditor::buildMail(PholioMock, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1494]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #14 <#2> PhabricatorApplicationTransactionEditor::publishTransactions(PholioMock, array) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:21]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #15 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:124]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #16 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:159]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #17 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #18 PhabricatorTaskmasterDaemon::run() called at [<phabricator>/src/infrastructure/daemon/PhutilDaemon.php:219]
[24-Jun-2020 12:05:15 Asia/Shanghai]   #19 PhutilDaemon::execute() called at [<phabricator>/scripts/daemon/exec/exec_daemon.php:131]
[24-Jun-2020 12:10:12 Asia/Shanghai] 2020-06-24 12:10:12 PM [SGNL] Overseer ("9314") received signal 2 ("SIGINT").
[24-Jun-2020 12:10:12 Asia/Shanghai] 2020-06-24 12:10:12 PM [OVER] Started new daemon overseer (with PID "2983").
[24-Jun-2020 12:10:14 Asia/Shanghai] [2020-06-24 12:10:14] EXCEPTION: (PhutilProxyException) Error while executing Task ID 1589370. {>} (RuntimeException) Array to string conversion at [<arcanist>/src/error/PhutilErrorHandler.php:263]
[24-Jun-2020 12:10:14 Asia/Shanghai] arcanist(head=master, ref.master=d1c07b4d2634), phabricator(head=stable, ref.stable=b9d52f38ddad, custom=2)
[24-Jun-2020 12:10:14 Asia/Shanghai]   #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<arcanist>/src/error/PhutilErrorHandler.php:263]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #1 <#2> sprintf(string, array) called at [<phabricator>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:244]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #2 <#2> PhabricatorModularTransactionType::renderValue(array) called at [<phabricator>/src/applications/pholio/xaction/PholioImageNameTransaction.php:34]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #3 <#2> PholioImageNameTransaction::getTitle() called at [<phabricator>/src/applications/transactions/storage/PhabricatorModularTransaction.php:127]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #4 <#2> PhabricatorModularTransaction::getTitle() called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:819]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #5 <#2> PhabricatorApplicationTransaction::getTitleForMail() called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:809]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #6 <#2> PhabricatorApplicationTransaction::getTitleForMailWithRenderingTarget(string) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:823]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #7 <#2> PhabricatorApplicationTransaction::getTitleForTextMail() called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:5263]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #8 <#2> PhabricatorApplicationTransactionEditor::getTitleForTextMail(PholioTransaction) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3529]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #9 <#2> PhabricatorApplicationTransactionEditor::addHeadersAndCommentsToMailBody(PhabricatorMetaMTAMailBody, array, string, string) called at [<phabricator>/src/applications/pholio/editor/PholioMockEditor.php:76]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #10 <#2> PholioMockEditor::buildMailBody(PholioMock, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3166]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #11 <#2> PhabricatorApplicationTransactionEditor::buildMailForTarget(PholioMock, array, PhabricatorMailTarget) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3109]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #12 <#2> PhabricatorApplicationTransactionEditor::buildMailWithRecipients(PholioMock, array, array, array, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:3052]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #13 <#2> PhabricatorApplicationTransactionEditor::buildMail(PholioMock, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1494]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #14 <#2> PhabricatorApplicationTransactionEditor::publishTransactions(PholioMock, array) called at [<phabricator>/src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php:21]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #15 <#2> PhabricatorApplicationTransactionPublishWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:124]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #16 <#2> PhabricatorWorker::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:159]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #17 <#2> PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #18 PhabricatorTaskmasterDaemon::run() called at [<phabricator>/src/infrastructure/daemon/PhutilDaemon.php:219]
[24-Jun-2020 12:10:14 Asia/Shanghai]   #19 PhutilDaemon::execute() called at [<phabricator>/scripts/daemon/exec/exec_daemon.php:131]