Tagged: bash sleep

模拟出 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

浏览量: 14 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...

在 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)

浏览量: 16 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...

查看写入的文本文件,以检测命令行运行的间隔时间,符合预期 0

Docker deployment, the implementation of Supervisor-based crontab (bash sleep) to reduce memory footprint

浏览量: 15 1. The operation of the command-line script is supported based on Supervisor. During the continuous operation, the problem of occupying too much memory is still not fundamentally solved. Check the URL:https://www.shuijingwanwq.com/2019/07/24/3376/ 2....