JobRunr数据库性能问题

huangapple go评论61阅读模式
英文:

JobRunr Database performance issue

问题

我们已经开始在我们的应用程序中使用Jobrunr 5.13进行简单的后台作业处理。我们正在使用Postgres 12进行持久化。然而,我们注意到下面的查询具有高达~8分钟的延迟并且占用了数据库。

select * from jobrunr_jobs_stats ORDER BY total ASC LIMIT $1 OFFSET $2

select * from jobrunr_jobs_stats;的输出是:

<?xml version="1.0" encoding="UTF-8"?> <dataset> <SELECT_FROM_JOBRUNR_JOBS_STATS_JJS_ TOTAL="1411870" SCHEDULED="0" ENQUEUED="3343" PROCESSING="0" FAILED="19" SUCCEEDED="57528" ALLTIMESUCCEEDED="2521443.0" DELETED="1350980" NBROFBACKGROUNDJOBSERVERS="1" NBROFRECURRINGJOBS="0"/> </dataset>

我们在需要处理大量后台作业的突发情况下开始遇到了这个问题。虽然所有作业都已经处理完成,但它在jobrunr_jobs表中创建了大量的条目。

英文:

We have started using Jobrunr 5.13 in our application for simple background job processing. We are using Postgres 12 for persistence. However we have noticed that below query is having high latency of ~8 minutes and choking up the DB.

select * from jobrunr_jobs_stats ORDER BY total ASC LIMIT $1 OFFSET $2

The output of select * from jobrunr_jobs_stats; is:

<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<SELECT_FROM_JOBRUNR_JOBS_STATS_JJS_ TOTAL="1411870" SCHEDULED="0" ENQUEUED="3343" PROCESSING="0" FAILED="19" SUCCEEDED="57528" ALLTIMESUCCEEDED="2521443.0" DELETED="1350980" NBROFBACKGROUNDJOBSERVERS="1" NBROFRECURRINGJOBS="0"/>
</dataset>

We started facing this issue when we had a burst of background jobs to be processed. Though all the jobs were processed, it created a lot of entries in jobrunr_jobs table.

答案1

得分: 3

以下是翻译好的部分:

"自去年6月以来,您的仪表板上一直有一个大的弹出窗口,要求您升级到最新版本的JobRunr。弹出窗口提到新版本带来了错误修复、性能改进和新功能。

作为JobRunr的开发者,我不知道还能采取什么措施来鼓励用户升级..."

英文:

Well, there is a big popup since June last year on your dashboard asking you to upgrade to the latest version of JobRunr. The popup mentions that new a version comes with bugfixes, performance improvements and new features.

As the developer of JobRunr, I don't know what more I can do to incentive users to upgrade...

huangapple
  • 本文由 发表于 2023年3月12日 11:00:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/75710834.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定