open-hand / choerodon-asgard Goto Github PK
View Code? Open in Web Editor NEWThe Asgard Service is a task scheduling service, and support taskOutputJsonData consistency through saga
Home Page: http://choerodon.io
The Asgard Service is a task scheduling service, and support taskOutputJsonData consistency through saga
Home Page: http://choerodon.io
我们有个环境的asgard-service正常运行了一段时间,并且可以调度任务,但由于开发配置的cron表达式不正确(在秒级使用了*号),导致任务频繁执行,查看asgard_quartz_task_instance已存在4万+记录。今天触发了OOM,之后任务调度相关功能无法正常使用,每次重新启动asgard-service后大约有3分钟正常,前端的任务调度可以正常显示,过了一会儿会每隔15秒打印一次下面的WARN:
WARN 8 --- [pool-7-thread-1] i.c.a.common.AbstractAsgardConsumer : error.asgard.scheduleRunning, msg: Read timed out executing POST http://asgard-service/v1/schedules/tasks/instances/poll
进pod容器使用:127.0.0.1:18080/v1/schedules/tasks/instances/poll
调试,查看端口有监听,但curl无任何响应,长时间阻塞
后来实在找不到有用的信息,打开DEBUG,发现有大量的查询在反复执行:
DEBUG 8 --- [ XNIO-3 task-2] i.c.a.i.m.Q.pollBathByMethod : ==> Preparing: SELECT aqti.id, aqti.execute_method AS method, aqti.execute_params, aqti.instance_lock, aqti.object_version_number, aqt.execute_strategy, aqt.user_details AS user_details_json, aqti.task_id FROM asgard_quartz_task_instance aqti INNER JOIN asgard_quartz_task aqt on aqt.id = aqti.task_id WHERE aqti.status = 'RUNNING' AND aqti.execute_method = ?
在数据库中查询此语句,响应时间过长,基本定位为任务过多阻塞了,删除了所有RUNNING的任务恢复正常,但上面那个警告仍然存在,发现其实这个WARN信息没什么用,影响了之前排查的方向~Orz
由于此问题影响面比较大,为了不影响平台正常功能,建议:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.