永夜 Blog

模拟出 8 条任务。事务ID为 57、58、59、63、64、65、68、69 的同步时间(分钟)分别为:11、12、13、12、11、12、11、12 。事务ID为 57、58、59、63、64、65、68、69 的同步次数分别为:21、22、22、19、17、5、17、17 。事务ID为 57、58、59、63、64、65、68、69 的同步频率分别为:11 * 60 / 21 = 31、12 * 60 / 22 = 33、13 * 60 / 22 = 35、12 * 60 / 19 = 38、11 * 60 / 17 = 39、12 * 60 / 5 = 144、11 * 60 / 17 = 39、12 * 60 / 17 = 42。得出平均值:(31 + 33 + 35 + 38 + 39 + 144 + 39 + 42) / 8 = 50。理论上的计算公式,进一法取整(事务数量 / 5) / 容器数量 * 60。符合预期 0

Deploy and test clusters in Rancher

浏览量: 1 1. In Rancher, clone the existing Docker container channel-pub-api-prev is channel-pub-api-prev-1, channel-pub-api-prev-2, as shown in Figure 1 2. The final 3 containers form a cluster, as shown in Figure 2 3. In...

查看 Console,报错:Access to XMLHttpRequest at 'https://verify.snssdk.com/reportError' from origin 'https://www.toutiao.com' has been blocked by CORS policy: Request header field ra-ver is not allowed by Access-Control-Allow-Headers in preflight response. 0

In the Google Chrome browser, after Toutiao is opened, a blank analysis is solved

浏览量: 74 1. In the Google Chrome browser, after today’s Toutiao is opened, it is blank, as shown in Figure 1 2. Check the console, report an error: access to xmlHttpRequest athttps://verify.snssdk.com/reportErrorfrom originhttps://www.toutiao.comHas been...

在 bash sleep 60 秒 的情况下,很难出现并发锁定的情况。或者增加更多的容器,或者提升执行命令行的频率。设置 bash sleep 10 秒。已经出现并发锁定(防止同一个租户下的用户同步同时在多个容器中执行)的情况。当部署为集群时,已经可以保证同一个租户下的用户同步,在某一时间段,仅在 1 个容器中执行。理论上的计算公式,一个租户的同步时间间隔为:4 / 3 * 10 = 13,结果单位为秒。符合设计预期。总结:部署的容器数量不要超过租户的数量,以防止并发锁定的情况过于频繁。 0

In Yii 2.0, the cluster implementation of the console commands, the lock implementation of the Redis model (to ensure that even if multiple servers are running the command line, the tasks run by each server are not repeated to improve the overall processing performance of the command line)

浏览量: 0 1. Docker deployment, the implementation of Crontab (Bash Sleep) based on Supervisor, to reduce memory usage, refer to:https://www.shuijingwanwq.com/2019/10/12/3555/. /console/controllers/cmcConsoleUserController.php 2. Break ends the execution of the current Foreach structure, that is, each...

在生产环境中,基于 Docker 部署,操作系统为 CentOS,获取日志列表的最后一页,响应超时:504 Gateway Time-out 0

In the Nginx + FastCGI (PHP-FPM) environment, when the length of the data in the log table is in GB, get the last page of the log list, and the response timeout: 504 Gateway time-out analysis solution

浏览量: 0 1. When the data length of PA_LOG is: 6.16 GB, as shown in Figure 1 2. Get the first page of the log list, the response time is about 1000ms, which is...