Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

定时执行大SQL,工单执行状态一直显示【定时执行】[ 问题咨询 ] #231

Closed
fancy-lee opened this issue May 28, 2019 · 8 comments
Labels
area/qcluster bug Something isn't working question Further information is requested

Comments

@fancy-lee
Copy link
Contributor

问题描述

定时执行时间很短的SQL可以正常结束,定时执行大SQL,执行时间大约3分钟左右的工单执行状态一直显示【定时执行】

版本信息

  • 应用版本/分支:Release v1.5.2
  • 部署方式:Docker
@fancy-lee fancy-lee added the question Further information is requested label May 28, 2019
@LeoQuote
Copy link
Collaborator

LeoQuote commented May 28, 2019

感谢你的问题反馈 ,为了尽快解决问题, 请尽量提供详细的供后台日志 日志路径在 downloads/log 目录下.

另外大sql 是多大请尽量提供, 多少行? 多大的文件?

@fancy-lee
Copy link
Contributor Author

[2019-05-28 18:26:08,884][MainThread:139947515209536][task_id:default][sendmsg.py:108][DEBUG]- 邮件推送成功
[2019-05-28 18:26:08,910][MainThread:139947515209536][task_id:django-q][cluster.py:333][INFO]- Processed [white-emma-delaware-eighteen]
[2019-05-28 18:26:30,527][MainThread:139881131456320][task_id:default][tasks.py:26][DEBUG]- 删除task:sqlreview-87失败,任务不存在
[2019-05-28 18:26:30,532][MainThread:139881131456320][task_id:default][tasks.py:16][DEBUG]- 添加SQL定时执行任务:sqlreview-87 执行时间:2019-05-28 18:30:00
[2019-05-28 18:30:24,694][MainThread:139947515209536][task_id:django-q][tasks.py:60][INFO]- Enqueued 1
[2019-05-28 18:30:24,694][MainThread:139947515209536][task_id:django-q][tasks.py:61][DEBUG]- Pushed ('india-five-east-nine', '82a66027beee45529342ef06f66d2121')
[2019-05-28 18:30:24,694][MainThread:139947515209536][task_id:django-q][cluster.py:305][DEBUG]- queueing from django_q:archery:q
[2019-05-28 18:30:24,694][MainThread:139947515209536][task_id:django-q][cluster.py:542][INFO]- Process-1 created a task from schedule [sqlreview-87]
[2019-05-28 18:30:24,695][MainThread:139947515209536][task_id:django-q][cluster.py:356][INFO]- Process-1:1 processing [india-five-east-nine]
[2019-05-28 18:31:25,418][MainThread:139947515209536][task_id:django-q][cluster.py:178][WARNING]- reincarnated worker Process-1:1 after timeout
[2019-05-28 18:31:25,420][MainThread:139947515209536][task_id:django-q][cluster.py:348][INFO]- Process-1:13 ready for work at 556

@fancy-lee
Copy link
Contributor Author

两表关联更新3213351条数据

@fancy-lee
Copy link
Contributor Author

不定时执行是可以正常结束的

@hhyo
Copy link
Owner

hhyo commented May 28, 2019

看日志是task超时终止了,可能由schedule调用的task使用了默认超时时间,修改下配置文件中qcluster的timeout试试

@fancy-lee
Copy link
Contributor Author

看日志是task超时终止了,可能由schedule调用的task使用了默认超时时间,修改下配置文件中qcluster的timeout试试

麻烦教我一下,这个配置文件在什么位置?

@hhyo
Copy link
Owner

hhyo commented May 28, 2019

@LeoQuote
Copy link
Collaborator

LeoQuote commented May 28, 2019

def add_sql_schedule(name, run_date, workflow_id):
"""添加/修改sql定时任务"""
del_schedule(name)
schedule('sql.utils.execute_sql.execute', workflow_id,
hook='sql.utils.execute_sql.execute_callback',
name=name, schedule_type='O', next_run=run_date, repeats=1)
logger.debug(f"添加SQL定时执行任务:{name} 执行时间:{run_date}")
@hhyo 这里可以设置一下超时为 -1 有空改一下吧

@LeoQuote LeoQuote added area/qcluster bug Something isn't working labels May 28, 2019
@hhyo hhyo closed this as completed in a4d2622 May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qcluster bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants