Issue 1:
Checklist

I have verified that the issue exists against the master branch of Celery.

This has already been asked to the discussion group first.

I have read the relevant section in the

contribution guide

on reporting bugs.

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

I have included the contents of pip freeze in the issue.

I have included all the versions of all the external dependencies required

to reproduce this bug.

Optional Debugging Information

I have tried reproducing the issue on more than one Python version

and/or implementation.

I have tried reproducing the issue on more than one message broker and/or

result backend.

I have tried reproducing the issue on more than one version of the message

broker and/or result backend.

I have tried reproducing the issue on more than one operating system.

I have tried reproducing the issue on more than one workers pool.

I have tried reproducing the issue with autoscaling, retries,

ETA/Countdown & rate limits disabled.

I have tried reproducing the issue after downgrading

and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

#6009

#5230

#4809

#6023

Possible Duplicates

None

Environment & Settings

Celery version:

celery report Output:

# With broker rabbitmq
software -> celery:4.4.2 (cliffs) kombu:4.6.8 py:3.8.0
billiard:3.6.3.0 py-amqp:2.5.2
platform -> system:Darwin arch:64bit
kernel version:19.4.0 imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:pyamqp results:disabled

broker_url: 'amqp://guest:********@localhost:5672//'

# With broker redis
software -> celery:4.4.2 (cliffs) kombu:4.6.8 py:3.8.0
billiard:3.6.3.0 redis:3.4.1
platform -> system:Darwin arch:64bit
kernel version:19.4.0 imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:disabled

broker_url: 'redis://localhost:6379/0'

Steps to Reproduce

Required Dependencies

Minimal Python Version: N/A or Unknown

Minimal Celery Version: N/A or Unknown

Minimal Kombu Version: N/A or Unknown

Minimal Broker Version: N/A or Unknown

Minimal Result Backend Version: N/A or Unknown

Minimal OS and/or Kernel Version: N/A or Unknown

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

amqp==2.5.2
billiard==3.6.3.0
celery==4.4.2
kombu==4.6.8
pytz==2019.3
redis==3.4.1
vine==1.3.0

Other Dependencies

N/A

Minimally Reproducible Test Case

from celery import Celery

app = Celery('tasks', broker='pyamqp://guest:guest@localhost:5672') # for rabitmq broker
# app = Celery('tasks', broker='redis://localhost:6379/0') for refis broker

@app.task
def task_example():
s = 'a' * 256 * (10**6) # Create a string of 256MB
raise

Expected Behavior

I will describe all the scenarios that I tested.

Scenario 1: I ran the worker with the command celery worker -A tasks -lINFO and after this I executed the task with the command python -c "from tasks import task_example; task_example.delay()".

Scenario 2: I ran the worker with the command celery worker -A tasks -lINFO -P threads and after this I executed the task with the command python -c "from tasks import task_example; task_example.delay()".

Scenario 3: I ran the worker with the command celery worker -A tasks -lINFO --max-memory-per-child 125000 and after this I executed the task with the command python -c "from tasks import task_example; task_example.delay()".

Scenario 4: I ran the worker with the command celery worker -A tasks -lINFO -P threads --max-memory-per-child 125000 and after this I executed the task with the command python -c "from tasks import task_example; task_example.delay()".

In all of this scenarios I expect that after run the task, celery will not continue consume the memory.

Actual Behavior

Only in scenario 3, as the documentation explains, the celery not continue consume memory because celery replaced the child process.

On scenarios 1, 2, and 4 the celery keep the memory that the task allocate(256MB for each task ran in this case).

Issue 2:
Checklist

[x ] I have read the relevant section in the

contribution guide

on reporting bugs.

[ x] I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

I have included the contents of pip freeze in the issue.

I have included all the versions of all the external dependencies required

to reproduce this bug.

Optional Debugging Information

I have tried reproducing the issue on more than one Python version

and/or implementation.

I have tried reproducing the issue on more than one message broker and/or

result backend.

I have tried reproducing the issue on more than one version of the message

broker and/or result backend.

I have tried reproducing the issue on more than one operating system.

I have tried reproducing the issue on more than one workers pool.

I have tried reproducing the issue with autoscaling, retries,

ETA/Countdown & rate limits disabled.

I have tried reproducing the issue after downgrading

and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

#5157

Possible Duplicates

None

Environment & Settings

Celery version:

celery --version

4.3.0 (rhubarb)

celery report Output:

software -> celery:4.3.0 (rhubarb) kombu:4.5.0 py:3.6.8

billiard:3.6.0.0 librabbitmq:2.0.0

platform -> system:Linux arch:64bit

kernel version:3.10.0-327.el7.x86_64 imp:CPython

loader -> celery.loaders.app.AppLoader

settings -> transport:librabbitmq results:celery_redis_cluster_backend.redis_cluster.RedisClusterBackend

ABSOLUTE_URL_OVERRIDES: {

}

ADMINS: []

AES_KEY: ''

ALLOWED_HOSTS: ['']

ALTER_URL: 'http://'

AMQP_URL: 'amqp://:@:5672/ws?heartbeat=30'

APPEND_SLASH: True

AUTHENTICATION_BACKENDS: ['django.contrib.auth.backends.ModelBackend']

AUTH_PASSWORD_VALIDATORS: ''

AUTH_USER_MODEL: 'auth.User'

BASE_DIR: '/schedule_center'

BROKER_URL: 'amqp://yunwei:@:5672/CRON-celery'

CACHES: {

'default': { 'BACKEND': 'django_redis_cluster.cache.RedisClusterCache',

'LOCATION': [ 'redis://:@:/0',

'redis://:@:/0'

'redis://:@:/0'

'redis://:@:/0'

'redis://:@:/0'

'redis://:@:/0'],

'OPTIONS': { 'CLIENT_CLASS': 'django_redis_cluster.client.DefaultClient',

'COMPRESS_COMPRESSOR': ,

'COMPRESS_DECOMPRESSOR': ,

'COMPRESS_DECOMPRESSOR_ERROR': <class 'zlib.error'>,

'PASSWORD': ''}}}

CACHE_MIDDLEWARE_ALIAS: 'default'

CACHE_MIDDLEWARE_KEY_PREFIX: ''

CACHE_MIDDLEWARE_SECONDS: 600

CAPTCHA_FONT_SIZE: 26

CAPTCHA_IMAGE_SIZE:

(92, 34)

CAPTCHA_TIMEOUT: 3

CELERYD_CONCURRENCY: 50

CELERYD_MAX_TASKS_PER_CHILD: 200

CELERY_ACCEPT_CONTENT: ['application/json']

CELERY_BEAT_SCHEDULER: 'django_celery_beat.schedulers:DatabaseScheduler'

CELERY_ENABLE_UTC: False

CELERY_FORCE_EXECV: True

CELERY_IGNORE_RESULT: False

CELERY_REDIS_CLUSTER_SETTINGS: {

'password': '',

'startup_nodes': [ {'host': '', 'port': ''},

{'host': '', 'port': ''},

{'host': '', 'port': ''},

{'host': '', 'port': ''},

{'host': '', 'port': ''},

{'host': '', 'port': ''}]}

CELERY_RESULT_BACKEND: 'celery_redis_cluster_backend.redis_cluster.RedisClusterBackend'

CELERY_RESULT_SERIALIZER: 'json'

CELERY_TASK_RESULT_EXPIRES: 5400

CELERY_TASK_SERIALIZER: 'json'

CELERY_TIMEZONE: 'Asia/Shanghai'

CHANNEL_LAYERS: {

'default': { 'BACKEND': 'asgi_rabbitmq.RabbitmqChannelLayer',

'CONFIG': { 'url': 'amqp://:@:5672/GM-channels'},

'ROUTING': 'Common.routing.channel_routing'}}

CMDBAPI: ''

CMDBAPIORG: ''

CMDBKEY: ''

CMDBSEC: '--'

CSRF_COOKIE_AGE: 31449600

CSRF_COOKIE_DOMAIN: None

CSRF_COOKIE_HTTPONLY: False

CSRF_COOKIE_NAME: 'csrftoken'

CSRF_COOKIE_PATH: '/'

CSRF_COOKIE_SECURE: False

CSRF_FAILURE_VIEW: 'django.views.csrf.csrf_failure'

CSRF_HEADER_NAME: 'HTTP_X_CSRFTOKEN'

CSRF_TRUSTED_ORIGINS: []

CSRF_USE_SESSIONS: False

DATABASES: {

'': { 'ATOMIC_REQUESTS': False,

'AUTOCOMMIT': True,

'CONN_MAX_AGE': 0,

'ENGINE': 'django.db.backends.mysql',

'HOST': '',

'NAME': '',

'OPTIONS': {},

'PASSWORD': '',

'PORT': ,

'TEST': { 'CHARSET': None,

'COLLATION': None,

'MIRROR': None,

'NAME': None},

'TIME_ZONE': None,

'USER': ''},

'default': { 'ATOMIC_REQUESTS': False,

'AUTOCOMMIT': True,

'CONN_MAX_AGE': 0,

'ENGINE': 'django.db.backends.mysql',

'HOST': '',

'NAME': '',

'OPTIONS': {},

'PASSWORD': '',

'PORT': ,

'TEST': { 'CHARSET': None,

'COLLATION': None,

'MIRROR': None,

'NAME': None},

'TIME_ZONE': None,

'USER': ''}}

DATABASE_ROUTERS: ''

DATA_UPLOAD_MAX_MEMORY_SIZE: 2621440

DATA_UPLOAD_MAX_NUMBER_FIELDS: 1000

DATETIME_FORMAT: 'N j, Y, P'

DATETIME_INPUT_FORMATS: ['%Y-%m-%d %H:%M:%S',

'%Y-%m-%d %H:%M:%S.%f',

'%Y-%m-%d %H:%M',

'%Y-%m-%d',

'%m/%d/%Y %H:%M:%S',

'%m/%d/%Y %H:%M:%S.%f',

'%m/%d/%Y %H:%M',

'%m/%d/%Y',

'%m/%d/%y %H:%M:%S',

'%m/%d/%y %H:%M:%S.%f',

'%m/%d/%y %H:%M',

'%m/%d/%y']

DATE_FORMAT: 'N j, Y'

DATE_INPUT_FORMATS: ['%Y-%m-%d',

'%m/%d/%Y',

'%m/%d/%y',

'%b %d %Y',

'%b %d, %Y',

'%d %b %Y',

'%d %b, %Y',

'%B %d %Y',

'%B %d, %Y',

'%d %B %Y',

'%d %B, %Y']

DEBUG: False

DEBUG_PROPAGATE_EXCEPTIONS: False

DECIMAL_SEPARATOR: '.'

DEFAULT_CHARSET: 'utf-8'

DEFAULT_CONTENT_TYPE: 'text/html'

DEFAULT_EXCEPTION_REPORTER_FILTER: 'django.views.debug.SafeExceptionReporterFilter'

DEFAULT_FILE_STORAGE: 'django.core.files.storage.FileSystemStorage'

DEFAULT_FROM_EMAIL: ''

DEFAULT_INDEX_TABLESPACE: ''

DEFAULT_TABLESPACE: ''

DISALLOWED_USER_AGENTS: []

DJANGO_CELERY_BEAT_TZ_AWARE: False

EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST: ''

EMAIL_HOST_PASSWORD: ''

EMAIL_HOST_USER: ''

EMAIL_PORT: 25

EMAIL_SSL_CERTFILE: None

EMAIL_SSL_KEYFILE: ''

EMAIL_SUBJECT_PREFIX: '[Django] '

EMAIL_TIMEOUT: None

EMAIL_USE_LOCALTIME: False

EMAIL_USE_SSL: False

EMAIL_USE_TLS: False

EXCHANGE_NAME: 'ws.fanout'

FILE_CHARSET: 'utf-8'

FILE_UPLOAD_DIRECTORY_PERMISSIONS: None

FILE_UPLOAD_HANDLERS: ['django.core.files.uploadhandler.MemoryFileUploadHandler',

'django.core.files.uploadhandler.TemporaryFileUploadHandler']

FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440

FILE_UPLOAD_PERMISSIONS: None

FILE_UPLOAD_TEMP_DIR: None

FIRST_DAY_OF_WEEK: 0

FIXTURE_DIRS: []

FORCE_SCRIPT_NAME: None

FORMAT_MODULE_PATH: None

FORM_RENDERER: 'django.forms.renderers.DjangoTemplates'

IGNORABLE_404_URLS: []

INSTALLED_APPS: ['django.contrib.admin',

'django.contrib.auth',

'django.contrib.contenttypes',

'django.contrib.sessions',

'django.contrib.messages',

'django.contrib.staticfiles',

'system_cron.apps.SystemCronConfig',

'django_celery_beat',

'django_redis_cluster',

'channels']

INTERNAL_IPS: []

LANGUAGES: [('af', 'Afrikaans'),

('ar', 'Arabic'),

('ast', 'Asturian'),

('az', 'Azerbaijani'),

('bg', 'Bulgarian'),

('be', 'Belarusian'),

('bn', 'Bengali'),

('br', 'Breton'),

('bs', 'Bosnian'),

('ca', 'Catalan'),

('cs', 'Czech'),

('cy', 'Welsh'),

('da', 'Danish'),

('de', 'German'),

('dsb', 'Lower Sorbian'),

('el', 'Greek'),

('en', 'English'),

('en-au', 'Australian English'),

('en-gb', 'British English'),

('eo', 'Esperanto'),

('es', 'Spanish'),

('es-ar', 'Argentinian Spanish'),

('es-co', 'Colombian Spanish'),

('es-mx', 'Mexican Spanish'),

('es-ni', 'Nicaraguan Spanish'),

('es-ve', 'Venezuelan Spanish'),

('et', 'Estonian'),

('eu', 'Basque'),

('fa', 'Persian'),

('fi', 'Finnish'),

('fr', 'French'),

('fy', 'Frisian'),

('ga', 'Irish'),

('gd', 'Scottish Gaelic'),

('gl', 'Galician'),

('he', 'Hebrew'),

('hi', 'Hindi'),

('hr', 'Croatian'),

('hsb', 'Upper Sorbian'),

('hu', 'Hungarian'),

('ia', 'Interlingua'),

('id', 'Indonesian'),

('io', 'Ido'),

('is', 'Icelandic'),

('it', 'Italian'),

('ja', 'Japanese'),

('ka', 'Georgian'),

('kk', 'Kazakh'),

('km', 'Khmer'),

('kn', 'Kannada'),

('ko', 'Korean'),

('lb', 'Luxembourgish'),

('lt', 'Lithuanian'),

('lv', 'Latvian'),

('mk', 'Macedonian'),

('ml', 'Malayalam'),

('mn', 'Mongolian'),

('mr', 'Marathi'),

('my', 'Burmese'),

('nb', 'Norwegian Bokmål'),

('ne', 'Nepali'),

('nl', 'Dutch'),

('nn', 'Norwegian Nynorsk'),

('os', 'Ossetic'),

('pa', 'Punjabi'),

('pl', 'Polish'),

('pt', 'Portuguese'),

('pt-br', 'Brazilian Portuguese'),

('ro', 'Romanian'),

('ru', 'Russian'),

('sk', 'Slovak'),

('sl', 'Slovenian'),

('sq', 'Albanian'),

('sr', 'Serbian'),

('sr-latn', 'Serbian Latin'),

('sv', 'Swedish'),

('sw', 'Swahili'),

('ta', 'Tamil'),

('te', 'Telugu'),

('th', 'Thai'),

('tr', 'Turkish'),

('tt', 'Tatar'),

('udm', 'Udmurt'),

('uk', 'Ukrainian'),

('ur', 'Urdu'),

('vi', 'Vietnamese'),

('zh-hans', 'Simplified Chinese'),

('zh-hant', 'Traditional Chinese')]

LANGUAGES_BIDI: ['he', 'ar', 'fa', 'ur']

LANGUAGE_CODE: 'zh-Hans'

LANGUAGE_COOKIE_AGE: None

LANGUAGE_COOKIE_DOMAIN: None

LANGUAGE_COOKIE_NAME: 'django_language'

LANGUAGE_COOKIE_PATH: '/'

LOCALE_PATHS: []

LOGGING: {

'disable_existing_loggers': False,

'filters': {},

'formatters': { 'standard': { 'format': '{"date":%(asctime)s,"threadName":%(threadName)s,"thread":%(thread)d,"name":%(name)s,"lineno":%(lineno)d,"module":%(module)s,"funcName":%(funcName)s,"levelname":%(levelname)s,"message":%(message)s}'}},

'handlers': { 'console': { 'class': 'logging.StreamHandler',

'formatter': 'standard',

'level': 'DEBUG'},

'default': { 'backupCount': 5,

'class': 'logging.handlers.RotatingFileHandler',

'filename': '/schedule_center/logs/access.log',

'formatter': 'standard',

'level': 'INFO',

'maxBytes': 5242880},

'error': { 'backupCount': 5,

'class': 'logging.handlers.RotatingFileHandler',

'filename': '/schedule_center/logs/error.log',

'formatter': 'standard',

'level': 'ERROR',

'maxBytes': 5242880},

'mail_admins': { 'class': 'django.utils.log.AdminEmailHandler',

'include_html': True,

'level': 'ERROR'}},

'loggers': { 'django': { 'handlers': ['default', 'console'],

'level': 'INFO',

'propagate': False},

'django.request': { 'handlers': ['error'],

'level': 'INFO',

'propagate': False},

'sourceDns.webdns.util': { 'handlers': ['error'],

'level': 'ERROR',

'propagate': True},

'sourceDns.webdns.views': { 'handlers': [ 'default',

'error'],

'level': 'INFO',

'propagate': True}},

'version': 1}

LOGGING_CONFIG: 'logging.config.dictConfig'

LOGIN_REDIRECT_URL: '/accounts/profile/'

LOGIN_URL: '/accounts/login/'

LOGOUT_REDIRECT_URL: None

MANAGERS: []

MEDIA_ROOT: ''

MEDIA_URL: ''

MESSAGE_STORAGE: 'django.contrib.messages.storage.fallback.FallbackStorage'

MIDDLEWARE: ['django.middleware.security.SecurityMiddleware',

'django.contrib.sessions.middleware.SessionMiddleware',

'django.middleware.common.CommonMiddleware',

'django.middleware.csrf.CsrfViewMiddleware',

'django.contrib.auth.middleware.AuthenticationMiddleware',

'django.contrib.messages.middleware.MessageMiddleware',

'django.middleware.clickjacking.XFrameOptionsMiddleware']

MIDDLEWARE_CLASSES: ['django.middleware.common.CommonMiddleware',

'django.middleware.csrf.CsrfViewMiddleware']

MIGRATION_MODULES: {

}

MONTH_DAY_FORMAT: 'F j'

NUMBER_GROUPING: 0

OPERATIONCMD: 4

OPERATIONCMDBYDIY: 5

OPERATIONERROR: 10

PASSWORD_HASHERS: ''

PASSWORD_RESET_TIMEOUT_DAYS: ''

PREPEND_WWW: False

QUEUE: ''

REDIS_DB: 1

REDIS_HOST: ''

REDIS_PORT: ******

REDIS_PWD: ''

REDIS_URL: 'redis://:@:/1'

ROOT_URLCONF: 'schedule_center.urls'

SALTAPI: ''

SALTPWD: ''

SALTUSER: ''

SECRET_KEY: ''

SECURE_BROWSER_XSS_FILTER: False

SECURE_CONTENT_TYPE_NOSNIFF: False

SECURE_HSTS_INCLUDE_SUBDOMAINS: False

SECURE_HSTS_PRELOAD: False

SECURE_HSTS_SECONDS: 0

SECURE_PROXY_SSL_HEADER: None

SECURE_REDIRECT_EXEMPT: []

SECURE_SSL_HOST: None

SECURE_SSL_REDIRECT: False

SERVER_EMAIL: 'root@localhost'

SESSION_CACHE_ALIAS: 'default'

SESSION_COOKIE_AGE: 5400

SESSION_COOKIE_DOMAIN: None

SESSION_COOKIE_HTTPONLY: True

SESSION_COOKIE_NAME: 'sessionid'

SESSION_COOKIE_PATH: '/schedule_center'

SESSION_COOKIE_SECURE: False

SESSION_ENGINE: 'django.contrib.sessions.backends.db'

SESSION_EXPIRE_AT_BROWSER_CLOSE: True

SESSION_FILE_PATH: None

SESSION_SAVE_EVERY_REQUEST: False

SESSION_SERIALIZER: 'django.contrib.sessions.serializers.JSONSerializer'

SETTINGS_MODULE: 'schedule_center.settings_prd'

SHORT_DATETIME_FORMAT: 'm/d/Y P'

SHORT_DATE_FORMAT: 'm/d/Y'

SIGNING_BACKEND: 'django.core.signing.TimestampSigner'

SILENCED_SYSTEM_CHECKS: []

STATICFILES_DIRS: ['/schedule_center/schedule_center/static']

STATICFILES_FINDERS: ['django.contrib.staticfiles.finders.FileSystemFinder',

'django.contrib.staticfiles.finders.AppDirectoriesFinder']

STATICFILES_STORAGE: 'django.contrib.staticfiles.storage.StaticFilesStorage'

STATIC_ROOT: None

STATIC_URL: '/schedule_center/static/'

TEMPLATES: [{'APP_DIRS': True,

'BACKEND': 'django.template.backends.django.DjangoTemplates',

'DIRS': ['/schedule_center/templates'],

'OPTIONS': {'context_processors': ['django.template.context_processors.debug',

'django.template.context_processors.request',

'django.contrib.auth.context_processors.auth',

'django.contrib.messages.context_processors.messages']}}]

TEST_NON_SERIALIZED_APPS: []

TEST_RUNNER: 'django.test.runner.DiscoverRunner'

THOUSAND_SEPARATOR: ','

TIME_FORMAT: 'P'

TIME_INPUT_FORMATS: ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']

TIME_ZONE: 'Asia/Shanghai'

TOKEN: ''

USERLOGIN: 11

USERLOGOUT: 12

USE_ETAGS: False

USE_I18N: True

USE_L10N: True

USE_THOUSAND_SEPARATOR: False

USE_TZ: False

USE_X_FORWARDED_HOST: False

USE_X_FORWARDED_PORT: False

WSGI_APPLICATION: 'schedule_center.wsgi.application'

X_FRAME_OPTIONS: 'SAMEORIGIN'

YEAR_MONTH_FORMAT: 'F Y'

ZABBIX_PASSWORD: ''

ZABBIX_URL: 'http:///api_jsonrpc.php'

ZABBIX_USERNAME: '**'

is_overridden: <bound method Settings.is_overridden of <Settings "schedule_center.settings_prd">>

BROKER_URL = 'amqp://username:password@10.222.248.125:5672/CRON-celery?heartbeat=30'

AMQP_URL = 'amqp://username:password@10.222.248.125:5672/ws?heartbeat=30'

EXCHANGE_NAME = "ws.fanout"

CELERY_BEAT_SCHEDULER = 'django_celery_beat.schedulers:DatabaseScheduler'

CELERY_RESULT_BACKEND = "celery_redis_cluster_backend.redis_cluster.RedisClusterBackend"

CELERY_BEAT_SCHEDULER = 'Common.schedulers:DatabaseScheduler'

CELERY_RESULT_BACKEND = 'django_celery_beat.backends.database:DatabaseBackend'

CELERY_IGNORE_RESULT = True

CELERY_FORCE_EXECV = True

CELERY_ACCEPT_CONTENT = ['application/json']

CELERY_TASK_SERIALIZER = 'json'

CELERY_RESULT_SERIALIZER = 'json'

CELERYD_CONCURRENCY = 50

CELERYD_MAX_TASKS_PER_CHILD = 200

CELERY_TIMEZONE = TIME_ZONE

CELERY_ENABLE_UTC=False

DJANGO_CELERY_BEAT_TZ_AWARE = False

CELERY_TASK_RESULT_EXPIRES = 60*90

CELERY_IGNORE_RESULT = False

Steps to Reproduce

Required Dependencies

Minimal Python Version: 3.6 for me

Minimal Celery Version: 4.3.0 for me

Minimal Kombu Version: 4.5.0 for me

Minimal Broker Version: rabbitmq with 3.7.12

Minimal Result Backend Version: redis with 4.0

Minimal OS and/or Kernel Version: Debian GNU/Linux 9 3.10.0-327.el7.x86_64

Minimal Broker Client Version: librabbitmq 2.0.0

Minimal Result Backend Client Version: celery_redis_cluster_backend NA

Python Packages

pip freeze Output:

amqp==2.4.2
anyjson==0.3.3
APScheduler==3.5.3
asgi-rabbitmq==0.5.5
asgi-redis==1.4.3
asgiref==1.1.2
asn1crypto==0.24.0
attrs==18.2.0
autobahn==19.2.1
Automat==0.7.0
Babel==2.6.0
billiard==3.6.0.0
cached-property==1.5.1
celery==4.3.0
-e git://github.com/hbasria/celery-redis-cluster-backend.git@943e9c0d41272c52c57e5ef205ada6d141a92931#egg=celery_redis_cluster_backend
certifi==2018.11.29
cffi==1.12.2
channels==1.1.8
chardet==3.0.4
Click==7.0
configparser==3.5.0
constantly==15.1.0
cryptography==2.4.2
daphne==1.4.2
defusedxml==0.5.0
diff-match-patch==20181111
Django==1.11.18
django-apscheduler==0.2.12
django-cas-client==1.4.0
django-celery==3.2.2
django-celery-beat==1.1.0
django-cors-headers==2.4.0
django-crispy-forms==1.7.2
django-filter==1.1.0
django-formtools==2.1
django-import-export==1.1.0
django-nose==1.4.6
django-ranged-response==0.2.0
django-redis==4.10.0
django-redis-sessions==0.5.0
django-rest-framework==0.1.0
django-reversion==3.0.0
django-simple-captcha==0.5.9
django-websocket-redis==0.4.5
djangorestframework==3.8.2
djangorestframework-jwt==1.11.0
dnspython==1.16.0
ephem==3.7.6.0
et-xmlfile==1.0.1
eventlet==0.24.1
Flask==1.0.2
flower==0.9.2
funcsigs==1.0.2
gevent==1.4.0
greenlet==0.4.15
hyperlink==18.0.0
idna==2.8
incremental==17.5.0
IPy==0.83
itsdangerous==1.1.0
itypes==1.1.0
jdcal==1.4
Jinja2==2.10
kombu==4.5.0
librabbitmq==2.0.0
Markdown==2.6.11
MarkupSafe==1.0
mock==2.0.0
monotonic==1.5
msgpack==0.6.0
msgpack-python==0.5.6
multi-key-dict==2.0.3
mysqlclient==1.3.13
nose==1.3.7
numpy==1.16.0
odfpy==1.4.0
openpyxl==2.5.12
pbr==4.0.4
pika==0.11.2
Pillow==5.2.0
pyasn1==0.4.3
pyasn1-modules==0.2.2
pycparser==2.18
pycryptodome==3.8.1
PyHamcrest==1.9.0
PyJWT==1.6.4
pymongo==3.6.1
PyMySQL==0.9.2
pyOpenSSL==18.0.0
python-dateutil==2.7.3
python-jenkins==1.2.1
pytz==2018.9
PyYAML==3.13
pyzabbix==0.7.5
redis==2.10.6
redis-py-cluster==1.3.6
requests==2.21.0
service-identity==18.1.0
six==1.12.0
tablib==0.12.1
tornado==5.1.1
Twisted==18.9.0
txaio==18.8.1
tzlocal==1.5.1
unicodecsv==0.14.1
urllib3==1.22
uWSGI==2.0.18
vine==1.3.0
virtualenv==16.0.0
websocket-client==0.35.0
Werkzeug==0.14.1
xlrd==1.2.0
xlwt==1.3.0
zope.interface==4.6.0

Other Dependencies

N/A

Minimally Reproducible Test Case

Expected Behavior

Actual Behavior

The Celery Worker Log Output

[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-lv8dv
[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-zg5tj
[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-dlctr
[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-q7x8v
[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-cgthd
[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-dgh8r
[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-pkklk
[2019-04-23 12:48:39,250: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-fscqx
[2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-28hz7
[2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-pz4zv
[2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-gt4mw
[2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-796s5
[2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-w2rnc
[2019-04-23 12:48:39,251: INFO/MainProcess] missed heartbeat from celery@schedule-center-worker-846c58c85f-5rmfb