没有不值得去解决的问题,也没有不值得去学习的技术!

Troubleshooting and Resolving component_verify_ticket Timeout Alerts on WeChat Third-Party Platforms

After completing the adjustments, the same type of timeout alert no longer appears in the notification group.

1. In the WeChat third-party platform, system exception alerts are sent to the corresponding WeChat group. Each platform corresponds to a notification group; joining it allows you to receive relevant alerts, as shown in Figure 1.

The WeChat third-party platform sends system exception alerts via the corresponding notification group.
Figure 1

2. We frequently received the same type of timeout alert in the notification group. After compiling the times, I found that the alerts appeared roughly every 40 minutes, such as at 11:25, 12:15, 12:55, 13:35, and 14:15, as shown in Figure 2.

The same type of timeout alert appears frequently in the notification group, showing a relatively fixed time interval.
Figure 2
Plaintext
Appid: 
Nickname: 
Time: 2020-11-27 13:35:05
Content: When the WeChat server pushes component_verify_ticket to the official account service developer, the developer does not return within 5 seconds
Count: 9 times in 30 minutes
For alert troubleshooting guidelines, please see: https://mmbizurl.cn/s/MpkaZb8yg

3. First, I referred to the official WeChat Open Platform documentation regarding component_verify_ticket: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/component_verify_ticket.html .

4. Next, I checked the implementation for receiving component_verify_ticket in the current project.

PHP
    /**
     * Component Verify Ticket 协议接收
     */
    public function actionTicket()
    {
        $bathPath = Yii::$app->getBasePath();
        try {
            $requestRowBody = Yii::$app->getRequest()->getRawBody();
            $requestQueryParams = Yii::$app->getRequest()->getQueryParams();
            @file_put_contents($bathPath . '/runtime/requestRowBody.txt', var_export($requestRowBody, true), LOCK_EX);
            @file_put_contents($bathPath . '/runtime/requestQueryParams.txt', var_export($requestQueryParams, true), LOCK_EX);


            $appId = Yii::$app->params['wxOpen']['component']['appId'];
            $appSecret = Yii::$app->params['wxOpen']['component']['appSecret'];
            $token = Yii::$app->params['wxOpen']['component']['token'];
            $encodingAesKey = Yii::$app->params['wxOpen']['component']['symmetricKey'];

            $msg = '';
            $pc = new WXBizMsgCrypt($token, $encodingAesKey, $appId);
            // 解密 xml 数据
            $errCode = $pc->decryptMsg($requestQueryParams['msg_signature'], $requestQueryParams['timestamp'], $requestQueryParams['nonce'], $requestRowBody, $msg);
            @file_put_contents($bathPath . '/runtime/decrypt_result.txt', $errCode, LOCK_EX);
            // 解密成功
            if ($errCode == 0) {
                $ticketData = $this->xmlToArray($msg);
                if (isset($ticketData['ComponentVerifyTicket'])) {
                    $redisCommandkeyPrefix = Yii::$app->params['redisCommand']['keyPrefix'];
                    $componentVerifyTicketKey = $redisCommandkeyPrefix . $ticketData['AppId'] . ':component_verify_ticket';
                    $this->redis->set($componentVerifyTicketKey, $ticketData['ComponentVerifyTicket']);
                    // 获取第三方平台component_access_token
                    $this->getComponentAccessToken($appId, $appSecret);
                }
            }
            @file_put_contents($bathPath . '/runtime/msgXml.txt', $msg, LOCK_EX);
        } catch (\Throwable $th) {
            @file_put_contents($bathPath . '/runtime/actionTicketError.txt', $th->getMessage(), LOCK_EX);
        }
        exit('success');
    }

5. I first checked the creation time of the existing log files and found that the relevant files were all generated around 14:35, as shown in Figure 3.

Checking the creation time of existing log files.
Figure 3
Plaintext
[root@b21d3b4237a2 runtime]# ls -lt
total 28
drwxrwxr-x 2 nginx nginx 4096 Nov 27 14:35 debug
-rw-r--r-- 1 nginx nginx  305 Nov 27 14:35 msgXml.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 14:35 decrypt_result.txt
-rw-r--r-- 1 nginx nginx  219 Nov 27 14:35 requestQueryParams.txt
-rw-r--r-- 1 nginx nginx  573 Nov 27 14:35 requestRowBody.txt
-rw-r--r-- 1 nginx nginx   18 Nov 26 17:24 actionReceive.txt
drwxrwxr-x 5 nginx nginx 4096 Nov 26 15:15 cache
[root@b21d3b4237a2 runtime]#

6. To pinpoint where the time was spent, I then logged the server time at several key stages to troubleshoot the entire process step by step.

PHP
    public function init()
    {
        file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-ticket-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);
        parent::init();
        require __DIR__ . '/../vendor/wx_biz_msg_crypt/wxBizMsgCrypt.php';
        $this->redis = Yii::$app->redis;
        file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-ticket-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);

    }

    /**
     * Component Verify Ticket 协议接收
     */
    public function actionTicket()
    {
        file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-ticket-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);
        $bathPath = Yii::$app->getBasePath();
        try {
            $requestRowBody = Yii::$app->getRequest()->getRawBody();
            $requestQueryParams = Yii::$app->getRequest()->getQueryParams();
            @file_put_contents($bathPath . '/runtime/requestRowBody.txt', var_export($requestRowBody, true), LOCK_EX);
            @file_put_contents($bathPath . '/runtime/requestQueryParams.txt', var_export($requestQueryParams, true), LOCK_EX);


            $appId = Yii::$app->params['wxOpen']['component']['appId'];
            $appSecret = Yii::$app->params['wxOpen']['component']['appSecret'];
            $token = Yii::$app->params['wxOpen']['component']['token'];
            $encodingAesKey = Yii::$app->params['wxOpen']['component']['symmetricKey'];

            $msg = '';
            $pc = new WXBizMsgCrypt($token, $encodingAesKey, $appId);
            // 解密 xml 数据
            $errCode = $pc->decryptMsg($requestQueryParams['msg_signature'], $requestQueryParams['timestamp'], $requestQueryParams['nonce'], $requestRowBody, $msg);
            @file_put_contents($bathPath . '/runtime/decrypt_result.txt', $errCode, LOCK_EX);
            // 解密成功
            if ($errCode == 0) {
                $ticketData = $this->xmlToArray($msg);
                if (isset($ticketData['ComponentVerifyTicket'])) {
                    $redisCommandkeyPrefix = Yii::$app->params['redisCommand']['keyPrefix'];
                    $componentVerifyTicketKey = $redisCommandkeyPrefix . $ticketData['AppId'] . ':component_verify_ticket';
                    $this->redis->set($componentVerifyTicketKey, $ticketData['ComponentVerifyTicket']);
                    // 获取第三方平台component_access_token
                    $this->getComponentAccessToken($appId, $appSecret);
                }
            }
            @file_put_contents($bathPath . '/runtime/msgXml.txt', $msg, LOCK_EX);
        } catch (\Throwable $th) {
            @file_put_contents($bathPath . '/runtime/actionTicketError.txt', $th->getMessage(), LOCK_EX);
        }
        file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-ticket-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);
        exit('success');
    }


7. The same type of alert appeared again at 2020-11-27 14:55:05. After checking the log files, I found that they were also generated at 14:55:05; the two timestamps differed by about 3.25 milliseconds. I then continued to observe the log time for the next occurrence, as shown in Figure 4.

After the same type of alert appeared again, comparing the generation time of the log files.
Figure 4
Plaintext
[root@b21d3b4237a2 runtime]# ls -lt
total 44
drwxrwxr-x 2 nginx nginx 4096 Nov 27 14:55 debug
-rw-r--r-- 1 nginx nginx  305 Nov 27 14:55 msgXml.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 14:55 wx-msg-event-ticket-2020-11-27-14-55-05-1606460105.8643-1726079413.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 14:55 decrypt_result.txt
-rw-r--r-- 1 nginx nginx  220 Nov 27 14:55 requestQueryParams.txt
-rw-r--r-- 1 nginx nginx  573 Nov 27 14:55 requestRowBody.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 14:55 wx-msg-event-ticket-2020-11-27-14-55-05-1606460105.8354-582349057.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 14:55 wx-msg-event-ticket-2020-11-27-14-55-05-1606460105.8339-222161532.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 14:55 wx-msg-event-ticket-2020-11-27-14-55-05-1606460105.8318-1104390728.txt
-rw-r--r-- 1 nginx nginx   18 Nov 26 17:24 actionReceive.txt
drwxrwxr-x 5 nginx nginx 4096 Nov 26 15:15 cache
[root@b21d3b4237a2 runtime]#

8. The same type of alert appeared again at 2020-11-27 15:35:14. The corresponding logs were generated between 15:35:14 and 15:35:15, with the two timestamps differing by about 2.74 milliseconds, still not exceeding 5 seconds, as shown in Figure 5.

Comparing the log time when the alert appeared, confirming that the processing time did not exceed 5 seconds.
Figure 5
Plaintext
[root@b21d3b4237a2 runtime]# ls -lt
total 40
drwxrwxr-x 2 nginx nginx 4096 Nov 27 15:35 debug
-rw-r--r-- 1 nginx nginx  305 Nov 27 15:35 msgXml.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 15:35 wx-msg-event-ticket-2020-11-27-15-35-15-1606462515.0053-1335632384.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 15:35 decrypt_result.txt
-rw-r--r-- 1 nginx nginx  219 Nov 27 15:35 requestQueryParams.txt
-rw-r--r-- 1 nginx nginx  573 Nov 27 15:35 requestRowBody.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 15:35 wx-msg-event-ticket-2020-11-27-15-35-14-1606462514.9782-618938486.txt
drwxrwxr-x 5 nginx nginx 4096 Nov 27 15:35 cache
-rw-r--r-- 1 nginx nginx    1 Nov 27 15:35 wx-msg-event-ticket-2020-11-27-15-35-14-1606462514.9777-1594643539.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 15:35 wx-msg-event-ticket-2020-11-27-15-35-14-1606462514.9779-342752895.txt

9. In another check, the relevant logs were generated between 16:15:08 and 16:15:09. The differences between the two sets of timestamps were about 2.55 milliseconds and 2.10 milliseconds respectively, neither exceeding 5 seconds. However, two consecutive requests appeared at that time, generating a total of 8 log files with timestamps, which led me to suspect a duplicate request.

Plaintext
[root@b21d3b4237a2 runtime]# ls -lt
total 56
drwxrwxr-x 2 nginx nginx 4096 Nov 27 16:15 debug
-rw-r--r-- 1 nginx nginx  305 Nov 27 16:15 msgXml.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 wx-msg-event-ticket-2020-11-27-16-15-09-1606464909.8787-571586970.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 decrypt_result.txt
-rw-r--r-- 1 nginx nginx  220 Nov 27 16:15 requestQueryParams.txt
-rw-r--r-- 1 nginx nginx  573 Nov 27 16:15 requestRowBody.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 wx-msg-event-ticket-2020-11-27-16-15-09-1606464909.858-528516846.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 wx-msg-event-ticket-2020-11-27-16-15-09-1606464909.8575-1518393836.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 wx-msg-event-ticket-2020-11-27-16-15-09-1606464909.8577-2077551670.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 wx-msg-event-ticket-2020-11-27-16-15-08-1606464908.3973-362685582.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 wx-msg-event-ticket-2020-11-27-16-15-08-1606464908.3713-1831294750.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 wx-msg-event-ticket-2020-11-27-16-15-08-1606464908.3715-929485623.txt
-rw-r--r-- 1 nginx nginx    1 Nov 27 16:15 wx-msg-event-ticket-2020-11-27-16-15-08-1606464908.3718-843415591.txt
drwxrwxr-x 5 nginx nginx 4096 Nov 27 16:15 cache

10. Continuing to check the corresponding Nginx logs, I confirmed that 2 requests were received during that period, as shown in Figure 6.

Checking the corresponding Nginx logs, confirming 2 requests in that period.
Figure 6
JSON

{
  "request": {
    "headers": {
      "referer": "-",
      "host": "auth.channel-pub.wjdev.chinamcloud.cn",
      "x-request-id": "-",
      "x-forwarded-for": "81.69.19.7, 10.42.0.1",
      "user-agent": "Mozilla/4.0"
    },
    "method": "POST",
    "uri": "/wx-msg-event/ticket?signature=476b7eacb0c523eaa0e8db5f7cca491a46e572fd×tamp=1606464908&nonce=1528041077&encrypt_type=aes&msg_signature=ce607cecc737d31ec1f4edeb853e00539f492732",
    "url": "http://auth.channel-pub.wjdev.chinamcloud.cn/wx-msg-event/ticket?signature=476b7eacb0c523eaa0e8db5f7cca491a46e572fd×tamp=1606464908&nonce=1528041077&encrypt_type=aes&msg_signature=ce607cecc737d31ec1f4edeb853e00539f492732",
    "@timestamp": "2020-11-27T16:15:08+08:00",
    "upstreamaddr": "127.0.0.1:9000",
    "response": {
      "responsetime": "0.033",
      "upstream_response_time": "0.032"
    },
    "size": "17",
    "status": "200"
  },
  "module_name": "default-app"
}
{
  "request": {
    "headers": {
      "referer": "-",
      "host": "auth.channel-pub.wjdev.chinamcloud.cn",
      "x-request-id": "-",
      "x-forwarded-for": "81.69.19.7, 10.42.0.1",
      "user-agent": "Mozilla/4.0"
    },
    "method": "POST",
    "uri": "/wx-msg-event/ticket?signature=81e6b3061d378d78cdfcd9422a1fe42a0f53801d×tamp=1606464909&nonce=1530227115&encrypt_type=aes&msg_signature=0e9be2e04981d0a6895f39a83a4dd956d1ba3337",
    "url": "http://auth.channel-pub.wjdev.chinamcloud.cn/wx-msg-event/ticket?signature=81e6b3061d378d78cdfcd9422a1fe42a0f53801d×tamp=1606464909&nonce=1530227115&encrypt_type=aes&msg_signature=0e9be2e04981d0a6895f39a83a4dd956d1ba3337",
    "@timestamp": "2020-11-27T16:15:09+08:00",
    "upstreamaddr": "127.0.0.1:9000",
    "response": {
      "responsetime": "0.026",
      "upstream_response_time": "0.026"
    },
    "size": "17",
    "status": "200"
  },
  "module_name": "default-app"
}

11. Based on these observations, I initially focused the investigation on the process of obtaining the third-party platform access credentials, and added time logging before and after this process.

PHP
    file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-ticket-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);
    // 获取第三方平台component_access_token
    $this->getComponentAccessToken($appId, $appSecret);
    file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-ticket-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);

12. After checking the new logs, I found that a small number of requests took relatively longer, with the relevant time differences being about 25.26, 41.48, 44.26, and 39.62 milliseconds. These occurred approximately once every 2 hours, indicating a periodic time fluctuation in this stage.

Plaintext
[root@c0f75d7d937d runtime]# ls -lt
total 3388
drwxrwxr-x 2 nginx nginx 4096 Nov 30 14:05 debug
-rw-r--r-- 1 nginx nginx  305 Nov 30 14:05 msgXml.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 14:05 wx-msg-event-ticket-2020-11-30-14-05-10-1606716310.4137-1873366123.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 14:05 wx-msg-event-ticket-2020-11-30-14-05-10-1606716310.4058-1868469814.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 14:05 decrypt_result.txt
-rw-r--r-- 1 nginx nginx  219 Nov 30 14:05 requestQueryParams.txt
-rw-r--r-- 1 nginx nginx  573 Nov 30 14:05 requestRowBody.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:54 wx-msg-event-ticket-2020-11-30-13-54-53-1606715693.814-1286907546.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:54 wx-msg-event-ticket-2020-11-30-13-54-53-1606715693.807-1908386416.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:45 wx-msg-event-ticket-2020-11-30-13-45-39-1606715139.1002-262145071.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:45 wx-msg-event-ticket-2020-11-30-13-45-39-1606715139.0916-1941649228.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:35 wx-msg-event-ticket-2020-11-30-13-35-37-1606714537.8674-1076208919.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:35 wx-msg-event-ticket-2020-11-30-13-35-37-1606714537.8591-1789739322.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:24 wx-msg-event-ticket-2020-11-30-13-24-50-1606713890.7333-836935361.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:24 wx-msg-event-ticket-2020-11-30-13-24-50-1606713890.7254-1288654422.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:14 wx-msg-event-ticket-2020-11-30-13-14-53-1606713293.5465-595171024.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:14 wx-msg-event-ticket-2020-11-30-13-14-53-1606713293.5379-1890465225.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:05 wx-msg-event-ticket-2020-11-30-13-05-03-1606712703.5868-175987929.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 13:05 wx-msg-event-ticket-2020-11-30-13-05-03-1606712703.5789-499523977.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:54 wx-msg-event-ticket-2020-11-30-12-54-53-1606712093.5456-517560488.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:54 wx-msg-event-ticket-2020-11-30-12-54-53-1606712093.539-1514830621.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:44 wx-msg-event-ticket-2020-11-30-12-44-57-1606711497.9951-952342390.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:44 wx-msg-event-ticket-2020-11-30-12-44-57-1606711497.9872-1156452406.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:35 wx-msg-event-ticket-2020-11-30-12-35-13-1606710913.4813-704492469.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:35 wx-msg-event-ticket-2020-11-30-12-35-13-1606710913.4746-1170946877.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:25 wx-msg-event-ticket-2020-11-30-12-25-06-1606710306.5482-636662964.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:25 wx-msg-event-ticket-2020-11-30-12-25-06-1606710306.2956-1437541091.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:15 wx-msg-event-ticket-2020-11-30-12-15-17-1606709717.0774-1991485435.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:15 wx-msg-event-ticket-2020-11-30-12-15-17-1606709717.0692-1936841676.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:05 wx-msg-event-ticket-2020-11-30-12-05-31-1606709131.8725-994420621.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 12:05 wx-msg-event-ticket-2020-11-30-12-05-31-1606709131.8648-51752480.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:56 wx-msg-event-ticket-2020-11-30-11-56-31-1606708591.3933-287466388.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:56 wx-msg-event-ticket-2020-11-30-11-56-31-1606708591.3842-1789563881.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:45 wx-msg-event-ticket-2020-11-30-11-45-57-1606707957.6617-247752670.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:45 wx-msg-event-ticket-2020-11-30-11-45-57-1606707957.6533-827700557.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:35 wx-msg-event-ticket-2020-11-30-11-35-06-1606707306.0361-354498841.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:35 wx-msg-event-ticket-2020-11-30-11-35-06-1606707306.0294-534747288.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:25 wx-msg-event-ticket-2020-11-30-11-25-09-1606706709.9365-510187117.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:25 wx-msg-event-ticket-2020-11-30-11-25-09-1606706709.9275-1228189882.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:15 wx-msg-event-ticket-2020-11-30-11-15-15-1606706115.7896-694594424.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:15 wx-msg-event-ticket-2020-11-30-11-15-15-1606706115.7828-1133630583.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:05 wx-msg-event-ticket-2020-11-30-11-05-17-1606705517.4531-511638313.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 11:05 wx-msg-event-ticket-2020-11-30-11-05-17-1606705517.4452-62701110.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:55 wx-msg-event-ticket-2020-11-30-10-55-08-1606704908.0751-608617371.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:55 wx-msg-event-ticket-2020-11-30-10-55-08-1606704908.0672-1990040532.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:45 wx-msg-event-ticket-2020-11-30-10-45-10-1606704310.5205-1564843147.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:45 wx-msg-event-ticket-2020-11-30-10-45-10-1606704310.5096-904128001.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:35 wx-msg-event-ticket-2020-11-30-10-35-13-1606703713.2687-1794797087.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:35 wx-msg-event-ticket-2020-11-30-10-35-13-1606703713.2617-574660229.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:25 wx-msg-event-ticket-2020-11-30-10-25-07-1606703107.1274-1022925845.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:25 wx-msg-event-ticket-2020-11-30-10-25-06-1606703106.7126-570303079.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:15 wx-msg-event-ticket-2020-11-30-10-15-07-1606702507.5368-1891845424.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:15 wx-msg-event-ticket-2020-11-30-10-15-07-1606702507.5284-1189045409.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:05 wx-msg-event-ticket-2020-11-30-10-05-26-1606701926.1164-1301829973.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 10:05 wx-msg-event-ticket-2020-11-30-10-05-26-1606701926.1098-19999799.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:54 wx-msg-event-ticket-2020-11-30-09-54-59-1606701299.9273-1892722460.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:54 wx-msg-event-ticket-2020-11-30-09-54-59-1606701299.9206-744289104.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:44 wx-msg-event-ticket-2020-11-30-09-44-58-1606700698.5289-840958322.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:44 wx-msg-event-ticket-2020-11-30-09-44-58-1606700698.5214-19799683.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:35 wx-msg-event-ticket-2020-11-30-09-35-04-1606700104.5574-1357122254.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:35 wx-msg-event-ticket-2020-11-30-09-35-04-1606700104.5494-926833651.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:24 wx-msg-event-ticket-2020-11-30-09-24-59-1606699499.5724-956013272.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:24 wx-msg-event-ticket-2020-11-30-09-24-59-1606699499.5646-98047242.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:15 wx-msg-event-ticket-2020-11-30-09-15-00-1606698900.0026-1274517751.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:14 wx-msg-event-ticket-2020-11-30-09-14-59-1606698899.9952-865263368.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:05 wx-msg-event-ticket-2020-11-30-09-05-23-1606698323.3765-803667820.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 09:05 wx-msg-event-ticket-2020-11-30-09-05-23-1606698323.3688-847811911.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:54 wx-msg-event-ticket-2020-11-30-08-54-51-1606697691.0131-1616106688.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:54 wx-msg-event-ticket-2020-11-30-08-54-51-1606697691.0043-1274719846.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:44 wx-msg-event-ticket-2020-11-30-08-44-48-1606697088.7198-713896594.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:44 wx-msg-event-ticket-2020-11-30-08-44-48-1606697088.7117-729391381.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:34 wx-msg-event-ticket-2020-11-30-08-34-53-1606696493.7291-1091252621.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:34 wx-msg-event-ticket-2020-11-30-08-34-53-1606696493.7209-1259900036.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:24 wx-msg-event-ticket-2020-11-30-08-24-50-1606695890.2233-208955798.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:24 wx-msg-event-ticket-2020-11-30-08-24-49-1606695889.7807-1262611877.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:14 wx-msg-event-ticket-2020-11-30-08-14-53-1606695293.2129-2026598871.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:14 wx-msg-event-ticket-2020-11-30-08-14-53-1606695293.2053-621892636.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:05 wx-msg-event-ticket-2020-11-30-08-05-03-1606694703.3859-1206143554.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 08:05 wx-msg-event-ticket-2020-11-30-08-05-03-1606694703.3788-552730140.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:55 wx-msg-event-ticket-2020-11-30-07-55-32-1606694132.0565-273542586.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:55 wx-msg-event-ticket-2020-11-30-07-55-32-1606694132.0483-1577590092.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:45 wx-msg-event-ticket-2020-11-30-07-45-29-1606693529.9869-1588961410.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:45 wx-msg-event-ticket-2020-11-30-07-45-29-1606693529.978-1374459792.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:34 wx-msg-event-ticket-2020-11-30-07-34-49-1606692889.761-1368578201.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:34 wx-msg-event-ticket-2020-11-30-07-34-49-1606692889.7521-1226355572.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:24 wx-msg-event-ticket-2020-11-30-07-24-42-1606692282.7321-151951386.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:24 wx-msg-event-ticket-2020-11-30-07-24-42-1606692282.7241-1065783208.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:14 wx-msg-event-ticket-2020-11-30-07-14-41-1606691681.3935-1859290492.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:14 wx-msg-event-ticket-2020-11-30-07-14-41-1606691681.3858-1002164891.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:04 wx-msg-event-ticket-2020-11-30-07-04-43-1606691083.9039-279996091.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 07:04 wx-msg-event-ticket-2020-11-30-07-04-43-1606691083.8972-989623729.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:54 wx-msg-event-ticket-2020-11-30-06-54-28-1606690468.0174-1574288943.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:54 wx-msg-event-ticket-2020-11-30-06-54-28-1606690468.0091-911201926.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:44 wx-msg-event-ticket-2020-11-30-06-44-21-1606689861.9042-2146058034.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:44 wx-msg-event-ticket-2020-11-30-06-44-21-1606689861.8958-2132998504.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:34 wx-msg-event-ticket-2020-11-30-06-34-24-1606689264.1409-262443682.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:34 wx-msg-event-ticket-2020-11-30-06-34-24-1606689264.1334-1465973951.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:24 wx-msg-event-ticket-2020-11-30-06-24-14-1606688654.6932-1629623175.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:24 wx-msg-event-ticket-2020-11-30-06-24-14-1606688654.297-1470389398.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:14 wx-msg-event-ticket-2020-11-30-06-14-13-1606688053.6491-689012542.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:14 wx-msg-event-ticket-2020-11-30-06-14-13-1606688053.6406-1542612275.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:04 wx-msg-event-ticket-2020-11-30-06-04-15-1606687455.7216-1815949907.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 06:04 wx-msg-event-ticket-2020-11-30-06-04-15-1606687455.7148-433188306.txt

13. I continued to inspect the implementation of getComponentAccessToken() and added more logging, finding that it entered the access credential update process roughly once every 1 hour and 55 minutes.

PHP
    /**
     * 获取第三方平台 component_access_token
     *
     * @param $appId string  第三方平台appId
     * @param $appSecret string 第三方平台appSecret
     * @return bool
     * @throws \yii\web\ServerErrorHttpException
     * @throws \yii\web\NotFoundHttpException
     */
    public function getComponentAccessToken($appId, $appSecret)
    {
        $timeStamp = time();
        $redisCommandkeyPrefix = Yii::$app->params['redisCommand']['keyPrefix'];
        $componentVerifyTicketKey = $redisCommandkeyPrefix . $appId . ':component_verify_ticket';
        $componentVerifyTicket = $this->redis->get($componentVerifyTicketKey);
        if (!$componentVerifyTicket) {
            throw new NotFoundHttpException(Yii::t('error', 205059), 205059);
        }
        $data = [
            'component_appid' => $appId,
            'component_appsecret' => $appSecret,
            'component_verify_ticket' => $componentVerifyTicket,
        ];
        $componentAccessTokenKey = $redisCommandkeyPrefix . $appId . ':component_access_token';
        // 获取 redis 中的 component_access_token
        $componentAccessToken = $this->redis->get($componentAccessTokenKey);

        // 判断 redis 中的 component_access_token 是否存在
        if (!$componentAccessToken) {
            file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-get-component-access-token-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);
            $httpWxAuthAccessToken = new HttpWxAuthAccessToken();
            // http 请求获取 component_access_token
            $httpWxAuthAccessTokenResult = $httpWxAuthAccessToken->wxComponentAccessToken(Json::encode($data));
            file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-get-component-access-token-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);
            if ($httpWxAuthAccessTokenResult === false) {
                if ($httpWxAuthAccessToken->hasErrors()) {
                    $firstError = '';
                    foreach ($httpWxAuthAccessToken->getFirstErrors() as $message) {
                        $firstError = $message;
                        break;
                    }
                    throw new ServerErrorHttpException(Yii::t('error', Yii::t('error', Yii::t('error', '205058'), ['first_error' => $firstError])), 205058);
                } elseif (!$httpWxAuthAccessToken->hasErrors()) {
                    throw new ServerErrorHttpException('WeChat third-party platform HTTP requests fail for unknown reasons!');
                }
            }
            // 保存 component_access_token 到 redis
            $this->redis->set($componentAccessTokenKey, $httpWxAuthAccessTokenResult['data']['component_access_token']);
            // 设置 component_access_token 的过期时间
            $this->redis->expire($componentAccessTokenKey, $httpWxAuthAccessTokenResult['data']['expires_in'] - Yii::$app->params['accessToken']['timeOut']);
            file_put_contents(Yii::getAlias('@runtime') . '/wx-msg-event-get-component-access-token-' . Date('Y-m-d-H-i-s') . '-' . microtime(true) . '-' . mt_rand()  . '.txt', print_r('1', true), FILE_APPEND | LOCK_EX);
        }
        return true;
    }

14. Checking the logs around 2020-11-30 16:25, the two relevant time differences were about 42.85 milliseconds and 41.19 milliseconds. This allowed me to rule out the access credential request itself as the main source of the time spent.

Plaintext
[root@c0f75d7d937d runtime]# ls -lt
total 136
drwxrwxr-x 2 nginx nginx 4096 Nov 30 17:25 debug
-rw-r--r-- 1 nginx nginx  305 Nov 30 17:25 msgXml.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 17:25 wx-msg-event-ticket-2020-11-30-17-25-51-1606728351.9058-1469431681.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 17:25 wx-msg-event-ticket-2020-11-30-17-25-51-1606728351.8982-1150604336.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 17:25 decrypt_result.txt
-rw-r--r-- 1 nginx nginx  220 Nov 30 17:25 requestQueryParams.txt
-rw-r--r-- 1 nginx nginx  573 Nov 30 17:25 requestRowBody.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 17:16 wx-msg-event-ticket-2020-11-30-17-16-01-1606727761.6309-69054700.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 17:16 wx-msg-event-ticket-2020-11-30-17-16-01-1606727761.6227-457638769.txt
-rw-r--r-- 1 nginx nginx   18 Nov 30 17:09 actionReceive.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 17:06 wx-msg-event-ticket-2020-11-30-17-06-10-1606727170.4403-2006187811.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 17:06 wx-msg-event-ticket-2020-11-30-17-06-10-1606727170.4319-776558591.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:56 wx-msg-event-ticket-2020-11-30-16-56-26-1606726586.3357-1979248577.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:56 wx-msg-event-ticket-2020-11-30-16-56-26-1606726586.3275-633275275.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:46 wx-msg-event-ticket-2020-11-30-16-46-22-1606725982.4072-1717988297.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:46 wx-msg-event-ticket-2020-11-30-16-46-22-1606725982.3998-1543568297.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:36 wx-msg-event-ticket-2020-11-30-16-36-20-1606725380.2058-82967550.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:36 wx-msg-event-ticket-2020-11-30-16-36-20-1606725380.1981-1694960265.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:25 wx-msg-event-get-component-access-token-2020-11-30-16-25-30-1606724730.1885-15234176.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:25 wx-msg-event-ticket-2020-11-30-16-25-30-1606724730.1887-1337687937.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:25 wx-msg-event-get-component-access-token-2020-11-30-16-25-30-1606724730.1802-973471121.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:25 wx-msg-event-get-component-access-token-2020-11-30-16-25-29-1606724729.7683-502384296.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:25 wx-msg-event-ticket-2020-11-30-16-25-29-1606724729.76-1329550188.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:15 wx-msg-event-ticket-2020-11-30-16-15-35-1606724135.7504-1687789418.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:15 wx-msg-event-ticket-2020-11-30-16-15-35-1606724135.7424-862202167.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:05 wx-msg-event-ticket-2020-11-30-16-05-52-1606723552.4635-817272139.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 16:05 wx-msg-event-ticket-2020-11-30-16-05-52-1606723552.4569-1930886052.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 15:55 wx-msg-event-ticket-2020-11-30-15-55-16-1606722916.7846-1483875696.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 15:55 wx-msg-event-ticket-2020-11-30-15-55-16-1606722916.777-1116558620.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 15:45 wx-msg-event-ticket-2020-11-30-15-45-08-1606722308.2036-360563463.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 15:45 wx-msg-event-ticket-2020-11-30-15-45-08-1606722308.1971-2068264798.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 15:35 wx-msg-event-ticket-2020-11-30-15-35-14-1606721714.414-760396908.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 15:35 wx-msg-event-ticket-2020-11-30-15-35-14-1606721714.4055-895475717.txt
drwxrwxr-x 5 nginx nginx 4096 Nov 30 15:35 cache
[root@c0f75d7d937d runtime]#

15. I then reviewed the HTTP request model implementation in the project.

PHP

$httpWxAuthAccessTokenResult = $httpWxAuthAccessToken->wxComponentAccessToken(Json::encode($data));

$response = Yii::$app->wxAuthHttp->createRequest()
    ->setMethod('post')
    ->setHeaders([
        'content-type' => 'application/json; charset=utf-8',
    ])
    ->setUrl('cgi-bin/component/api_component_token')
    ->setContent($data)
    ->send();

16. Next, I added time logging to the HTTP request model to further confirm the actual time spent in the request phase.

PHP

$httpWxAuthAccessTokenResult = $httpWxAuthAccessToken->wxComponentAccessToken($data);

$response = Yii::$app->wxAuthHttp->createRequest()
    ->setMethod('post')
    ->setFormat('json')
    ->setUrl('cgi-bin/component/api_component_token')
    ->setData($data)
    ->send();

17. The new logs showed that multiple HTTP requests took about 42.26, 40.08, and 39.69 milliseconds, keeping the overall time within the tens of milliseconds range.

Plaintext
[root@c0f75d7d937d runtime]# ls -lt
total 780
drwxrwxr-x 2 nginx nginx 4096 Dec  1 09:46 debug
-rw-r--r-- 1 nginx nginx  305 Dec  1 09:46 msgXml.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:46 wx-msg-event-ticket-2020-12-01-09-46-40-1606787200.1924-384098389.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:46 wx-msg-event-ticket-2020-12-01-09-46-40-1606787200.184-1045658522.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:46 decrypt_result.txt
-rw-r--r-- 1 nginx nginx  219 Dec  1 09:46 requestQueryParams.txt
-rw-r--r-- 1 nginx nginx  573 Dec  1 09:46 requestRowBody.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:36 wx-msg-event-ticket-2020-12-01-09-36-22-1606786582.0585-1013103392.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:36 wx-msg-event-ticket-2020-12-01-09-36-22-1606786582.0505-970864071.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:25 wx-msg-event-ticket-2020-12-01-09-25-41-1606785941.8906-2041798728.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:25 wx-msg-event-ticket-2020-12-01-09-25-41-1606785941.8802-195187870.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:15 wx-msg-event-ticket-2020-12-01-09-15-45-1606785345.1548-475196816.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:15 wx-msg-event-ticket-2020-12-01-09-15-45-1606785345.1467-1129656952.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:06 wx-msg-event-ticket-2020-12-01-09-06-07-1606784767.8797-1783503091.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 09:06 wx-msg-event-ticket-2020-12-01-09-06-07-1606784767.8731-22763234.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:55 wx-msg-event-ticket-2020-12-01-08-55-25-1606784125.9631-425180789.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:55 wx-msg-event-ticket-2020-12-01-08-55-25-1606784125.9565-211048902.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:45 wx-msg-event-ticket-2020-12-01-08-45-23-1606783523.1237-862030637.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:45 wx-msg-event-ticket-2020-12-01-08-45-23-1606783523.1167-312880440.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:35 wx-msg-event-ticket-2020-12-01-08-35-25-1606782925.4178-2066789220.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:35 wx-msg-event-ticket-2020-12-01-08-35-25-1606782925.4104-1780781371.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:25 wx-msg-event-get-component-access-token-2020-12-01-08-25-14-1606782314.9202-330912324.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:25 wx-msg-event-ticket-2020-12-01-08-25-14-1606782314.9204-356089533.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:25 wx-msg-event-get-component-access-token-2020-12-01-08-25-14-1606782314.9124-958594011.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:25 wx-msg-event-get-component-access-token-2020-12-01-08-25-14-1606782314.4898-1980951097.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:25 wx-msg-event-ticket-2020-12-01-08-25-14-1606782314.4821-1622599529.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:15 wx-msg-event-ticket-2020-12-01-08-15-22-1606781722.7309-1378184776.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:15 wx-msg-event-ticket-2020-12-01-08-15-22-1606781722.7233-2062344384.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:05 wx-msg-event-ticket-2020-12-01-08-05-42-1606781142.3485-744441001.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 08:05 wx-msg-event-ticket-2020-12-01-08-05-42-1606781142.3409-890187836.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:55 wx-msg-event-ticket-2020-12-01-07-55-33-1606780533.7927-321132804.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:55 wx-msg-event-ticket-2020-12-01-07-55-33-1606780533.7847-1382205121.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:45 wx-msg-event-ticket-2020-12-01-07-45-32-1606779932.8478-999696249.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:45 wx-msg-event-ticket-2020-12-01-07-45-32-1606779932.838-1987962334.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:35 wx-msg-event-ticket-2020-12-01-07-35-34-1606779334.9738-1363413859.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:35 wx-msg-event-ticket-2020-12-01-07-35-34-1606779334.9653-2068220786.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:25 wx-msg-event-ticket-2020-12-01-07-25-29-1606778729.2231-738058693.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:25 wx-msg-event-ticket-2020-12-01-07-25-29-1606778729.2149-1863458868.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:15 wx-msg-event-ticket-2020-12-01-07-15-34-1606778134.2901-372169339.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:15 wx-msg-event-ticket-2020-12-01-07-15-34-1606778134.283-1709718914.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:05 wx-msg-event-ticket-2020-12-01-07-05-32-1606777532.1243-2010818083.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 07:05 wx-msg-event-ticket-2020-12-01-07-05-32-1606777532.1163-1852034553.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:55 wx-msg-event-ticket-2020-12-01-06-55-21-1606776921.2762-588795894.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:55 wx-msg-event-ticket-2020-12-01-06-55-21-1606776921.2688-1763253893.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:45 wx-msg-event-ticket-2020-12-01-06-45-16-1606776316.823-349359619.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:45 wx-msg-event-ticket-2020-12-01-06-45-16-1606776316.8152-1076127272.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:34 wx-msg-event-ticket-2020-12-01-06-34-37-1606775677.7764-775571138.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:34 wx-msg-event-ticket-2020-12-01-06-34-37-1606775677.7692-58599234.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:24 wx-msg-event-get-component-access-token-2020-12-01-06-24-26-1606775066.2637-574568818.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:24 wx-msg-event-ticket-2020-12-01-06-24-26-1606775066.2638-1092278848.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:24 wx-msg-event-get-component-access-token-2020-12-01-06-24-26-1606775066.254-1173116726.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:24 wx-msg-event-get-component-access-token-2020-12-01-06-24-25-1606775065.8532-1198103424.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:24 wx-msg-event-ticket-2020-12-01-06-24-25-1606775065.8441-1704836704.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:14 wx-msg-event-ticket-2020-12-01-06-14-20-1606774460.4333-759954230.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:14 wx-msg-event-ticket-2020-12-01-06-14-20-1606774460.4261-2019400249.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:04 wx-msg-event-ticket-2020-12-01-06-04-25-1606773865.473-739974480.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 06:04 wx-msg-event-ticket-2020-12-01-06-04-25-1606773865.4639-572998845.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:54 wx-msg-event-ticket-2020-12-01-05-54-12-1606773252.9456-493107095.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:54 wx-msg-event-ticket-2020-12-01-05-54-12-1606773252.9384-2012431998.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:44 wx-msg-event-ticket-2020-12-01-05-44-11-1606772651.9372-474948357.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:44 wx-msg-event-ticket-2020-12-01-05-44-11-1606772651.9291-402864750.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:34 wx-msg-event-ticket-2020-12-01-05-34-06-1606772046.8855-1427913395.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:34 wx-msg-event-ticket-2020-12-01-05-34-06-1606772046.8781-88996324.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:24 wx-msg-event-ticket-2020-12-01-05-24-04-1606771444.5239-1288137598.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:24 wx-msg-event-ticket-2020-12-01-05-24-04-1606771444.5164-608837871.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:14 wx-msg-event-ticket-2020-12-01-05-14-01-1606770841.7629-1181999397.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:14 wx-msg-event-ticket-2020-12-01-05-14-01-1606770841.755-1971758488.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:04 wx-msg-event-ticket-2020-12-01-05-04-02-1606770242.3264-1071187225.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 05:04 wx-msg-event-ticket-2020-12-01-05-04-02-1606770242.3189-670608731.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:53 wx-msg-event-ticket-2020-12-01-04-53-59-1606769639.0448-3386374.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:53 wx-msg-event-ticket-2020-12-01-04-53-59-1606769639.0369-1897343048.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:43 wx-msg-event-ticket-2020-12-01-04-43-58-1606769038.0198-1931996254.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:43 wx-msg-event-ticket-2020-12-01-04-43-58-1606769038.0113-1603472383.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:33 wx-msg-event-ticket-2020-12-01-04-33-58-1606768438.6776-720303540.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:33 wx-msg-event-ticket-2020-12-01-04-33-58-1606768438.6692-490408026.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:24 wx-msg-event-get-component-access-token-2020-12-01-04-24-46-1606767886.6364-1067545974.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:24 wx-msg-event-ticket-2020-12-01-04-24-46-1606767886.6366-1463566931.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:24 wx-msg-event-get-component-access-token-2020-12-01-04-24-46-1606767886.6284-596914487.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:24 wx-msg-event-get-component-access-token-2020-12-01-04-24-46-1606767886.2315-720853899.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:24 wx-msg-event-ticket-2020-12-01-04-24-46-1606767886.2236-1810890714.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:14 wx-msg-event-ticket-2020-12-01-04-14-45-1606767285.1813-173971590.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:14 wx-msg-event-ticket-2020-12-01-04-14-45-1606767285.1732-1121967222.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:04 wx-msg-event-ticket-2020-12-01-04-04-49-1606766689.3311-1538048300.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 04:04 wx-msg-event-ticket-2020-12-01-04-04-49-1606766689.3221-523777237.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:54 wx-msg-event-ticket-2020-12-01-03-54-47-1606766087.4762-1525066154.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:54 wx-msg-event-ticket-2020-12-01-03-54-47-1606766087.4658-1292924910.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:44 wx-msg-event-ticket-2020-12-01-03-44-07-1606765447.1236-409664564.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:44 wx-msg-event-ticket-2020-12-01-03-44-07-1606765447.1132-1394894206.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:34 wx-msg-event-ticket-2020-12-01-03-34-05-1606764845.0073-1387777703.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:34 wx-msg-event-ticket-2020-12-01-03-34-05-1606764845.0008-974432684.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:24 wx-msg-event-ticket-2020-12-01-03-24-06-1606764246.7578-1342539112.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:24 wx-msg-event-ticket-2020-12-01-03-24-06-1606764246.7492-1893978314.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:14 wx-msg-event-ticket-2020-12-01-03-14-04-1606763644.4555-720341412.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:14 wx-msg-event-ticket-2020-12-01-03-14-04-1606763644.4464-1671857882.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:04 wx-msg-event-ticket-2020-12-01-03-04-08-1606763048.7259-2143055995.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 03:04 wx-msg-event-ticket-2020-12-01-03-04-08-1606763048.7185-1193690580.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:54 wx-msg-event-ticket-2020-12-01-02-54-06-1606762446.2165-739995823.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:54 wx-msg-event-ticket-2020-12-01-02-54-06-1606762446.2095-1858779317.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:44 wx-msg-event-ticket-2020-12-01-02-44-05-1606761845.4562-457501145.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:44 wx-msg-event-ticket-2020-12-01-02-44-05-1606761845.4477-635809472.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:34 wx-msg-event-ticket-2020-12-01-02-34-07-1606761247.2821-1642870183.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:34 wx-msg-event-ticket-2020-12-01-02-34-07-1606761247.2747-1322735233.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:24 wx-msg-event-get-component-access-token-2020-12-01-02-24-01-1606760641.0821-1481979193.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:24 wx-msg-event-ticket-2020-12-01-02-24-01-1606760641.0823-920160809.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:24 wx-msg-event-get-component-access-token-2020-12-01-02-24-01-1606760641.0722-105574102.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:24 wx-msg-event-get-component-access-token-2020-12-01-02-24-00-1606760640.6884-1334268928.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:24 wx-msg-event-ticket-2020-12-01-02-24-00-1606760640.6786-701382904.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:14 wx-msg-event-ticket-2020-12-01-02-14-00-1606760040.7368-1670769553.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:14 wx-msg-event-ticket-2020-12-01-02-14-00-1606760040.7286-1176803526.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:04 wx-msg-event-ticket-2020-12-01-02-04-05-1606759445.824-1519493632.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 02:04 wx-msg-event-ticket-2020-12-01-02-04-05-1606759445.8173-1967281298.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:54 wx-msg-event-ticket-2020-12-01-01-54-04-1606758844.0423-1780051663.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:54 wx-msg-event-ticket-2020-12-01-01-54-04-1606758844.0338-66756438.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:44 wx-msg-event-ticket-2020-12-01-01-44-07-1606758247.5066-1363693687.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:44 wx-msg-event-ticket-2020-12-01-01-44-07-1606758247.4993-151888985.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:34 wx-msg-event-ticket-2020-12-01-01-34-09-1606757649.9249-1275381967.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:34 wx-msg-event-ticket-2020-12-01-01-34-09-1606757649.9159-339126942.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:24 wx-msg-event-ticket-2020-12-01-01-24-05-1606757045.2573-1561385935.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:24 wx-msg-event-ticket-2020-12-01-01-24-05-1606757045.2501-668714567.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:14 wx-msg-event-ticket-2020-12-01-01-14-08-1606756448.5321-2033193483.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:14 wx-msg-event-ticket-2020-12-01-01-14-08-1606756448.5236-1755134776.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:04 wx-msg-event-ticket-2020-12-01-01-04-59-1606755899.6917-2031828308.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 01:04 wx-msg-event-ticket-2020-12-01-01-04-59-1606755899.6835-657047289.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:54 wx-msg-event-ticket-2020-12-01-00-54-14-1606755254.3857-2146809427.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:54 wx-msg-event-ticket-2020-12-01-00-54-14-1606755254.379-1408837289.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:44 wx-msg-event-ticket-2020-12-01-00-44-15-1606754655.4169-1672754236.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:44 wx-msg-event-ticket-2020-12-01-00-44-15-1606754655.4091-869604583.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:34 wx-msg-event-ticket-2020-12-01-00-34-22-1606754062.3614-1510086858.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:34 wx-msg-event-ticket-2020-12-01-00-34-22-1606754062.3537-1370147506.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:24 wx-msg-event-get-component-access-token-2020-12-01-00-24-23-1606753463.0588-481023680.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:24 wx-msg-event-ticket-2020-12-01-00-24-23-1606753463.059-1861456234.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:24 wx-msg-event-get-component-access-token-2020-12-01-00-24-23-1606753463.0518-1634850724.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:24 wx-msg-event-get-component-access-token-2020-12-01-00-24-22-1606753462.6639-2125181805.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:24 wx-msg-event-ticket-2020-12-01-00-24-22-1606753462.6575-1139131739.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:14 wx-msg-event-ticket-2020-12-01-00-14-20-1606752860.8339-289574744.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:14 wx-msg-event-ticket-2020-12-01-00-14-20-1606752860.8249-1394522342.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:04 wx-msg-event-ticket-2020-12-01-00-04-34-1606752274.3779-235937116.txt
-rw-r--r-- 1 nginx nginx    1 Dec  1 00:04 wx-msg-event-ticket-2020-12-01-00-04-34-1606752274.3686-1052730961.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:54 wx-msg-event-ticket-2020-11-30-23-54-13-1606751653.0078-680117427.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:54 wx-msg-event-ticket-2020-11-30-23-54-13-1606751653.0005-1117289894.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:44 wx-msg-event-ticket-2020-11-30-23-44-14-1606751054.6151-1997692452.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:44 wx-msg-event-ticket-2020-11-30-23-44-14-1606751054.6071-1044148350.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:34 wx-msg-event-ticket-2020-11-30-23-34-19-1606750459.0669-494870141.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:34 wx-msg-event-ticket-2020-11-30-23-34-19-1606750459.0589-996872868.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:24 wx-msg-event-ticket-2020-11-30-23-24-22-1606749862.2343-876893111.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:24 wx-msg-event-ticket-2020-11-30-23-24-22-1606749862.2252-2057264373.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:15 wx-msg-event-ticket-2020-11-30-23-15-10-1606749310.2539-1935429237.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:15 wx-msg-event-ticket-2020-11-30-23-15-10-1606749310.2458-2092427951.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:05 wx-msg-event-ticket-2020-11-30-23-05-23-1606748723.8199-1646845185.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 23:05 wx-msg-event-ticket-2020-11-30-23-05-23-1606748723.8103-448599163.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:55 wx-msg-event-ticket-2020-11-30-22-55-17-1606748117.4809-1401582906.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:55 wx-msg-event-ticket-2020-11-30-22-55-17-1606748117.4735-1605481014.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:45 wx-msg-event-ticket-2020-11-30-22-45-26-1606747526.6753-585260776.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:45 wx-msg-event-ticket-2020-11-30-22-45-26-1606747526.6685-1440769296.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:35 wx-msg-event-ticket-2020-11-30-22-35-35-1606746935.0385-2843588.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:35 wx-msg-event-ticket-2020-11-30-22-35-35-1606746935.0314-1345068321.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:25 wx-msg-event-get-component-access-token-2020-11-30-22-25-34-1606746334.5391-1061436467.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:25 wx-msg-event-ticket-2020-11-30-22-25-34-1606746334.5392-726807423.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:25 wx-msg-event-get-component-access-token-2020-11-30-22-25-34-1606746334.5293-965003426.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:25 wx-msg-event-get-component-access-token-2020-11-30-22-25-34-1606746334.1075-1527687792.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:25 wx-msg-event-ticket-2020-11-30-22-25-34-1606746334.0994-1208139954.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:15 wx-msg-event-ticket-2020-11-30-22-15-37-1606745737.6861-1509351549.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:15 wx-msg-event-ticket-2020-11-30-22-15-37-1606745737.6791-104725536.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:05 wx-msg-event-ticket-2020-11-30-22-05-25-1606745125.5291-404181920.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 22:05 wx-msg-event-ticket-2020-11-30-22-05-25-1606745125.5221-971248792.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:55 wx-msg-event-ticket-2020-11-30-21-55-07-1606744507.8765-1704717090.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:55 wx-msg-event-ticket-2020-11-30-21-55-07-1606744507.8695-965101780.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:45 wx-msg-event-ticket-2020-11-30-21-45-00-1606743900.4269-2066158756.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:45 wx-msg-event-ticket-2020-11-30-21-45-00-1606743900.4187-1320980327.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:35 wx-msg-event-ticket-2020-11-30-21-35-34-1606743334.5332-197445622.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:35 wx-msg-event-ticket-2020-11-30-21-35-34-1606743334.5248-1836173532.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:25 wx-msg-event-ticket-2020-11-30-21-25-31-1606742731.9778-1837661693.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:25 wx-msg-event-ticket-2020-11-30-21-25-31-1606742731.9706-1108095330.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:15 wx-msg-event-ticket-2020-11-30-21-15-36-1606742136.1972-1007880751.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:15 wx-msg-event-ticket-2020-11-30-21-15-36-1606742136.1906-649721699.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:05 wx-msg-event-ticket-2020-11-30-21-05-58-1606741558.1541-1125447811.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 21:05 wx-msg-event-ticket-2020-11-30-21-05-58-1606741558.1441-842576238.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:55 wx-msg-event-ticket-2020-11-30-20-55-31-1606740931.8103-1319161929.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:55 wx-msg-event-ticket-2020-11-30-20-55-31-1606740931.8031-1384312038.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:45 wx-msg-event-ticket-2020-11-30-20-45-36-1606740336.4684-1333748366.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:45 wx-msg-event-ticket-2020-11-30-20-45-36-1606740336.4571-1717522519.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:35 wx-msg-event-ticket-2020-11-30-20-35-46-1606739746.9132-967751392.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:35 wx-msg-event-ticket-2020-11-30-20-35-46-1606739746.9069-189645814.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:25 wx-msg-event-get-component-access-token-2020-11-30-20-25-45-1606739145.5218-1234317233.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:25 wx-msg-event-ticket-2020-11-30-20-25-45-1606739145.5219-740613648.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:25 wx-msg-event-get-component-access-token-2020-11-30-20-25-45-1606739145.5138-83063487.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:25 wx-msg-event-get-component-access-token-2020-11-30-20-25-45-1606739145.1261-457325553.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:25 wx-msg-event-ticket-2020-11-30-20-25-45-1606739145.1181-293506606.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:16 wx-msg-event-ticket-2020-11-30-20-16-06-1606738566.7693-430128028.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:16 wx-msg-event-ticket-2020-11-30-20-16-06-1606738566.7632-337815723.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:07 wx-msg-event-ticket-2020-11-30-20-07-10-1606738030.6358-570043006.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 20:07 wx-msg-event-ticket-2020-11-30-20-07-10-1606738030.6259-1147801012.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 19:56 wx-msg-event-ticket-2020-11-30-19-56-43-1606737403.759-1187805995.txt
-rw-r--r-- 1 nginx nginx    1 Nov 30 19:56 wx-msg-event-ticket-2020-11-30-19-56-43-1606737403.7514-1773919284.txt
drwxrwxr-x 5 nginx nginx 4096 Nov 30 19:56 cache
[root@c0f75d7d937d runtime]#

18. I used Postman to run the same request test against the official WeChat API, and the response took about 371 ms; the request time recorded on the program side was about 40 ms, which is overall within a normal range, as shown in Figure 7.

Using Postman to test requests against the official WeChat API.
Figure 7

19. After checking the program request logs, I confirmed again that the relevant requests typically completed in about 40 milliseconds, as shown in Figure 8.

Checking the program request logs, confirming the request time is about tens of milliseconds.
Figure 8

20. Therefore, the 5-second alert did not appear to be caused by the processing time of the program itself. To further rule out differences in operating modes, I then enabled the production environment configuration and activated the program cache.

21. Checking the Nginx logs again, the response time showed no significant change, with upstream_response_time being about 0.032 seconds, indicating that the backend service was processing normally.

JSON
{
  "request": {
    "headers": {
      "referer": "-",
      "host": "auth.channel-pub.wjdev.chinamcloud.cn",
      "x-request-id": "-",
      "x-forwarded-for": "81.69.19.7, 10.42.0.1",
      "user-agent": "Mozilla/4.0"
    },
    "method": "POST",
    "uri": "/wx-msg-event/ticket?signature=4bd108fe9aac5f0c4b0727f859274433f6266287×tamp=1606797387&nonce=543080602&encrypt_type=aes&msg_signature=534641005b290dd9e0cd1c8f4daab3be25f53c0d",
    "url": "http://auth.channel-pub.wjdev.chinamcloud.cn/wx-msg-event/ticket?signature=4bd108fe9aac5f0c4b0727f859274433f6266287×tamp=1606797387&nonce=543080602&encrypt_type=aes&msg_signature=534641005b290dd9e0cd1c8f4daab3be25f53c0d",
    "@timestamp": "2020-12-01T12:36:28+08:00",
    "upstreamaddr": "127.0.0.1:9000",
    "response": {
      "responsetime": "0.034",
      "upstream_response_time": "0.032"
    },
    "size": "17",
    "status": "200"
  },
  "module_name": "default-app"
}

22. Based on the request information in the Nginx logs, I reproduced the same type of request in Postman. The response time was about 243 ms, still well below 5 seconds, as shown in Figure 9.

Reproducing the same type of request in Postman based on Nginx log information.
Figure 9

23. To further rule out business processing time, I returned success directly at the program entry point, but the same type of alert still appeared, as shown in Figure 10.

After returning success directly at the program entry point, the same type of alert still appeared.
Figure 10
PHP
<?php
exit('success');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
 
require __DIR__ . '/../../vendor/autoload.php';
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
require __DIR__ . '/../../common/config/bootstrap.php';
require __DIR__ . '/../config/bootstrap.php';
 
$config = yii\helpers\ArrayHelper::merge(
    require __DIR__ . '/../../common/config/main.php',
    require __DIR__ . '/../../common/config/main-local.php',
    require __DIR__ . '/../config/main.php',
    require __DIR__ . '/../config/main-local.php'
);
 
(new yii\web\Application($config))->run();

24. I then joined the notification group of another test environment for comparison, and the test environment did not show the same type of alert, as shown in Figure 11.

Joining the test environment notification group for comparison, the test environment did not show the same type of alert.
Figure 11

25. Both environments used the same program and were deployed via Docker, so I began focusing on comparing the configuration differences between the two third-party platform applications, trying to keep the development environment consistent with the test environment.

26. I then re-ran the online publishing process for the application that was receiving alerts, as shown in Figure 12.

Re-running the online publishing process for the application receiving alerts.
Figure 12

27. When submitting the online release for the first time, the platform indicated that the access check failed and needed to be rechecked, as shown in Figure 13.

When submitting the online release for the first time, the platform indicates that the access check failed.
Figure 13

28. Next, I compared the feature configurations of the two applications and found that the application receiving alerts had more permission items, so I first aligned the relevant configurations on both sides, as shown in Figure 14.

Comparing the feature configurations of the two applications and adjusting the relevant permission items.
Figure 14

29. After the adjustment, the relevant permission configurations on both sides were consistent, as shown in Figure 15.

After the adjustment, the relevant permission configurations on both sides are consistent.
Figure 15

30. I ran the online release access check again. This time the check succeeded and was submitted for processing, with the submission time being 2020-12-03 20:08, as shown in Figure 16.

Running the online release access check again and submitting it successfully.
Figure 16

31. At 2020-12-04 16:44:41, I received a platform notification that the official account third-party platform [XXX] had completed its online release, as shown in Figure 17.

The official account third-party platform has completed its online release.
Figure 17

32. After completing these adjustments, the same type of timeout alert no longer appeared in the notification group. The last alert time was 2020-12-04 15:54:56. Combined with the before-and-after comparison, I could confirm that the issue was related to the application’s online release status, as shown in Figure 18.

After completing the adjustments, the same type of timeout alert no longer appears in the notification group.
Figure 18

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系