PHP calls RabbitMQ message middleware error solution

Due to the large magnitude of the supplier's master data, the unbalanced number of concurrency, and the short time, in order to achieve peak shaving and valley filling, and to achieve stable data storage, mq, which has a better extension with PHP, is selected.

1. Tester feedback

 

[Supplier + Zilong delivery results list] Add a new supplier, when pushing Zilong, the interface will report 500
supplier code: GYS11870, click the sync button, the interface will report 500 

接口
URL        /supplier/base/now/sync
参数:
{
        "supplierCode": "GYS11870",
        "sync": 1
}
返回:
{
        "code": 1,
        "data": "",
        "msg": "500 Internal Server Error",
        "success": false,
        "timestamp": 1666666596261
}

 

 

2. Check the server log

3. Problem Analysis

Due to the addition of mq heartbeat, the declaration of static variables was missing. After the modification, the test passed and the problem was solved.

Guess you like

Origin blog.csdn.net/qq_33665793/article/details/127788314