Comments (1)
task_proc_watcher.sh脚本内"ps -fC java | grep $process_flag | wc -l" 此行代码在mac系统不支持"ps -fC java "。
(1)因为不识别 "-C" 参数,在 if 判断进程的个数时进入重启逻辑,按理说,应该一分钟重启4次。
然而因为端口占用,重启的应用会死亡,但是重启的进程暂未消亡。
解决方案:判断进程的执行逻辑改为
count=`ps -ef | grep java | grep $process_flag | wc -l`
脚本run4config.sh保活功能可采用 */1 * * * * flock -xn file.lock -c ''实现
(2)flock文件锁只是预防定时任务并行执行,而在保活脚本中,执行时长<60S,不会有并行执行问题。
即使并行执行了,只要判断进程的逻辑没问题,则保活脚本啥都不做。
总之,flock文件锁能解决crontab冲突问题,与保活脚本的正确性无关。
from sia-task.
Related Issues (20)
- sia-task-config,sia-task-hunter has removed? HOT 3
- docker部署提示401 HOT 3
- 是否有完整Demo可以分享
- o.o.2版本打包出错 HOT 2
- 最新的sql脚本存在错误
- 角色权限控制何时加上?? HOT 1
- 修复databind 存在漏洞的问题,统一升级为2.9.9.1
- 提问:是否可以直接配置接口地址,触发任务调度? HOT 3
- 提问: 是否考虑升级到 SpringBoot 2.1.X & SpringCloud Greenwich SR2 HOT 4
- 调度器故障转移 HOT 4
- 数据库的表DDL优化 HOT 1
- 作业为什么总是不执行 HOT 3
- 部署包config目录中的sia-task-config和sia-task-schedule没办法覆盖默认配置
- 多级任务 HOT 1
- 当数据库使用Mysql 8.0时连接数据库报错
- HTTP处理长时间调用 HOT 1
- zk链接断开超时后需要重启服务
- 多个任务分别在多个调度器上工作时,会导致在某个调度器上任务出现异常
- 请问跟linkedin的azkaban相比有什么优势?
- docker部署方式不能用 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sia-task.