Background job queue keep growing?

Hi @tmatteson ,
Looking for help to start/stop background job since it keeps growing with orange dot and short status.

Due to this issue email is not sent also email queue keep growing?


Can you please check error log and post here?

You should increase your background workers and gunicorn workers. I have beefy multiple VPS, and I started messing with performance tuning for my ERPNext instances, and editing those after increasing innodb cache size really helps. My emails are sent in an instant.

Just my experience though, your mileage may vary :slight_smile:

Here’s an old thread discussing about performance: What is the difference between background_workers and gunicorn_workers

@nmami Nofal, this was not the question I was expecting from the Telegram chat. I think @iMoshi’s suggestions are a good starting place. For further debug, run bench doctor and/or bench enable-scheduler or bench disable-scheduler.

Exited, it’s resolved.

Thanks for your support.

Action plan:
1- edit file frappe-bench/sites/common_site_config.json
2- update value of background_workers from 1 to 3
3- save
4- restart server

expected result :
Background jobs get cleared including sending email job which is added under file as cron.

But is it save to update under erpnext app? next update will get overwritten right?

what is the best approach to add cron part in the hooks?

my /home/frappe/frappe-bench/apps/erpnext/erpnext/ file after adding cron part:

scheduler_events = {
"all": [
"hourly": [
"daily": [
"daily_long": [
"monthly_long": [
"cron": {
    "* * * * *": [


unfortunately, still issue not resolved.

Any idea how to start background jobs? why system keep queuing jobs?

thanks in advance

I guess the issue maybe due to your server specification being low. Usually a 2GB RAM is the minimum requirement with Intel Xeon processor.

Hi @Muzzy currently I am using a wsl with Ubuntu 18.04, production, local (no Network)

I am able to get email send by doing below action plan, plz share your thoughts:

final solution:

add cron on server side

frappe@LAPTOP-5F23F7J8:~/frappe-bench$ sudo crontab -e

add this line in the end

* * * * * cd /home/frappe/frappe-bench && bench execute

save & exit

stop / start server
1 Like

Is there any way of dedicating 2 GB of RAM like a VM? Try it. Issue looks like there is not enough processing power.

After long time spend digging still I am not able to solve it, any advice for above issues.

only solution I have now is to restart server.

I am using wsl ubuntu under windows 10 home.


HI nmami,

you can resolve your problem? i am also using WSL under Windows 10… it unable to send email.


Is there any way to stop a selected background jobs?

Was facing this issue after upgrading to v12.12.0 and this fixed my problem. Thanks.

hey @nmami facing same issue when I migrated V12 from another server to AWS. Did as you mentioned above but the background worker starts queuing job every 2 minutes. Any additional help would be appreciated.

Server is 8 core, 32 GB RAM on AWS.


No unfortunately I lost interest as usual.


Did you found a solution to stop a particular background job?

No I did not. But I’ve forgotten about it and see no issue until now.

@rahy Thank you for your reply and i found the solution to stop a selected background job with its id.(In V14, there is a doctype rq job)

for <v14, we can just copy the function.

1 Like