Issue 1:
Checklist

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

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

Steps to reproduce

I am running a celery task queue on AWS using SQS as my transport and several amazon ec2 instances as my workers.

Expected behavior

The workers stay connected to the server

Actual behavior

After a couple of hours, the workers somehow lose connection to the message broker, initiated by a promise rejection due to an empty reply from the server, which throws a SQSError 599 exception. I have investigated this topic and solely found one related issue where this could be solved by reinstalling pycurl with openssl rather than gnutls. I have tried this solution, which unfortunately does not work for me.

I have included both, the worker log and the celery report in this issue.

Celery config

CELERY_BROKER_URL = 'sqs://{0}:{1}@'.format(
urllib.quote(AWS_SQS_ACCESS_KEY, safe=''),
urllib.quote(AWS_SQS_SECRET_ACCESS_KEY, safe='')
)

CELERY_RESULT_BACKEND ='django-db'
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'Europe/Berlin'
CELERY_TRACK_STARTED=True
CELERY_WORKER_PREFETCH_MULTIPLIER = 0
CELERY_BROKER_TRANSPORT_OPTIONS['queue_name_prefix'] = 'berries-prod-'
CELERY_SEND_TASK_ERROR_EMAILS = True

CELERY_BROKER_TRANSPORT_OPTIONS = {
'region': 'eu-central-1',
'polling_interval': 30,
'wait_time_seconds': 20,
'visibility_timeout': 3600,
}

Worker logs

2017-04-23 10:12:48,431: INFO/MainProcess] Connected to sqs://AKIAIPAKNCSMWZUH7OOA:**@localhost//
[2017-04-23 10:12:48,473: INFO/MainProcess] celery@ip-172-31-17-229 ready.
[2017-04-23 10:29:54,042: ERROR/MainProcess] Empty body: SQSError: 599 Empty reply from server

[2017-04-23 10:29:54,043: ERROR/MainProcess] Callback <promise@0x7f11afd98808> raised exception: SQSError: 599 Empty reply from server
Traceback (most recent call last):
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 178, in _process
buffer=buffer, effective_url=effective_url, error=error,
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 146, in __call__
svpending(*ca, **ck)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 139, in __call__
return self.throw()
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 136, in __call__
retval = fun(*final_args, **final_kwargs)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/funtools.py", line 100, in _transback
return callback(ret)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 139, in __call__
return self.throw()
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 136, in __call__
retval = fun(*final_args, **final_kwargs)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/funtools.py", line 98, in _transback
callback.throw()
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/funtools.py", line 96, in _transback
ret = filter_(*args + (ret,), **kwargs)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/kombu/async/aws/connection.py", line 269, in _on_list_ready
raise self._for_status(response, body)
SQSError: SQSError: 599 Empty reply from server

[2017-04-23 10:29:54,046: WARNING/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 318, in start
blueprint.start(self)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 594, in start
c.loop(*c.loop_args())
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/celery/worker/loops.py", line 88, in asynloop
next(loop)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/kombu/async/hub.py", line 345, in create_loop
cb(*cbargs)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 111, in on_readable
return self._on_event(fd, _pycurl.CSELECT_IN)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 124, in _on_event
self._process_pending_requests()
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 132, in _process_pending_requests
self._process(curl, errno, reason)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 178, in _process
buffer=buffer, effective_url=effective_url, error=error,
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 146, in __call__
svpending(*ca, **ck)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 139, in __call__
return self.throw()
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 136, in __call__
retval = fun(*final_args, **final_kwargs)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/funtools.py", line 100, in _transback
return callback(ret)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 139, in __call__
return self.throw()
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/promises.py", line 136, in __call__
retval = fun(*final_args, **final_kwargs)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/funtools.py", line 98, in _transback
callback.throw()
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/vine/funtools.py", line 96, in _transback
ret = filter_(*args + (ret,), **kwargs)
File "/home/ubuntu/.virtualenvs/berries/local/lib/python2.7/site-packages/kombu/async/aws/connection.py", line 269, in _on_list_ready
raise self._for_status(response, body)
SQSError: SQSError: 599 Empty reply from server

[2017-04-23 10:29:54,083: INFO/MainProcess] Connected to sqs://AKIAIPAKNCSMWZUH7OOA:**@localhost//

Output from celery -A project report

software -> celery:4.0.2 (latentcall) kombu:4.0.2 py:2.7.12
billiard:3.5.0.2 sqs:N/A
platform -> system:Linux arch:64bit, ELF imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:sqs results:django-db

SECURE_SSL_REDIRECT: False
SECURE_HSTS_SECONDS: 0
USE_X_FORWARDED_PORT: False
CSRF_COOKIE_SECURE: False
CELERY_TRACK_STARTED: True
LANGUAGE_CODE: 'de-de'
ROOT_URLCONF: 'project.urls'
LOGIN_URL: u'/accounts/login/'
BASE_DIR: '/home/ubuntu/webapps/project/project'
TEST_NON_SERIALIZED_APPS: []
DEFAULT_CHARSET: u'utf-8'
AWS_S3_CUSTOM_DOMAIN: 'dxbsrkzoxdmkb.cloudfront.net'
ACCOUNT_EMAIL_REQUIRED: True
CELERY_WORKER_PREFETCH_MULTIPLIER: 0
ACCOUNT_EMAIL_SUBJECT_PREFIX: ''
ALLOWED_HOSTS: ['*']
MESSAGE_STORAGE: u'django.contrib.messages.storage.fallback.FallbackStorage'
EMAIL_SUBJECT_PREFIX: u'[Django] '
SERVER_EMAIL: u'root@localhost'
CELERY_RESULT_SERIALIZER: 'json'
STATICFILES_FINDERS: [u'django.contrib.staticfiles.finders.FileSystemFinder',
u'django.contrib.staticfiles.finders.AppDirectoriesFinder']
SESSION_CACHE_ALIAS: u'default'
SESSION_COOKIE_DOMAIN: None
SESSION_COOKIE_NAME: u'sessionid'
AWS_SES_RETURN_PATH: 'it@***.com'
CELERY_BROKER_URL: u'sqs://****:********@localhost//'
AWS_STORAGE_BUCKET_NAME: '***-static'
TIME_INPUT_FORMATS: [u'%H:%M:%S', u'%H:%M:%S.%f', u'%H:%M']
SECURE_REDIRECT_EXEMPT: []
DATABASES: {
'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'HOST': '**.com',
'NAME': '***_prod',
'PASSWORD': u'********',
'PORT': '****',
'USER': '****'}}
EMAIL_SSL_KEYFILE: u'********'
FILE_UPLOAD_DIRECTORY_PERMISSIONS: None
FILE_UPLOAD_PERMISSIONS: None
FILE_UPLOAD_HANDLERS: [u'django.core.files.uploadhandler.MemoryFileUploadHandler',
u'django.core.files.uploadhandler.TemporaryFileUploadHandler']
DEFAULT_CONTENT_TYPE: u'text/html'
SCARFACE_REGION_NAME: 'eu-central-1'
ACCOUNT_EMAIL_VERIFICATION: 'mandatory'
APPEND_SLASH: True
FIRST_DAY_OF_WEEK: 0
DATABASE_ROUTERS: u'********'
DEFAULT_TABLESPACE: u''
YEAR_MONTH_FORMAT: u'F Y'
STATICFILES_STORAGE: 'storages.backends.s3boto.S3BotoStorage'
CACHES: {
u'default': { u'BACKEND': u'django.core.cache.backends.locmem.LocMemCache'}}
SESSION_COOKIE_PATH: u'/'
SILENCED_SYSTEM_CHECKS: []
MIDDLEWARE_CLASSES:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware')
USE_I18N: True

SECRET_KEY: u'********'
AWS_SES_REGION_NAME: 'us-west-2'
DEFAULT_INDEX_TABLESPACE: u''
LOGGING_CONFIG: u'logging.config.dictConfig'

WSGI_APPLICATION: 'project.wsgi.application'
AUTHENTICATION_METHOD: 'email'
X_FRAME_OPTIONS: u'SAMEORIGIN'
AUTHENTICATION_BACKENDS:
('django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend')
USE_THOUSAND_SEPARATOR: False
USE_X_FORWARDED_HOST: False
CSRF_HEADER_NAME: u'HTTP_X_CSRFTOKEN'
EMAIL_TIMEOUT: None
SECURE_SSL_HOST: None
SIGNING_BACKEND: u'django.core.signing.TimestampSigner'
SESSION_COOKIE_SECURE: False
CSRF_COOKIE_DOMAIN: None
FILE_CHARSET: u'utf-8'
DEBUG: False
DATA_UPLOAD_MAX_MEMORY_SIZE: 2621440
SCARFACE_DEVICE_OWNER_MODEL: 'authentication.Profile'
DEFAULT_FILE_STORAGE: u'django.core.files.storage.FileSystemStorage'
INSTALLED_APPS:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django_celery_beat',
'django_celery_results',
'allauth',
'allauth.account',
'authentication',
'**',
'rest_framework',
'rest_framework.authtoken',
'rest_auth.registration',
'scarface',
'setup',
'tasks',
'storages')

USE_L10N: True
STATIC_ROOT: 'https://project-static.s3.amazonaws.com/'
SECURE_HSTS_INCLUDE_SUBDOMAINS: False
MIDDLEWARE: None
is_overridden: <bound method Settings.is_overridden of <Settings "project.settings.prod">>
PREPEND_WWW: False
SECURE_PROXY_SSL_HEADER: None
LANGUAGE_COOKIE_AGE: None
SESSION_COOKIE_HTTPONLY: True
AWS_SECRET_ACCESS_KEY: u'********'
DEBUG_PROPAGATE_EXCEPTIONS: False
ACCOUNT_USERNAME_REQUIRED: False
MEDIA_URL: u''
AWS_SES_SECRET_ACCESS_KEY: u'********'
MONTH_DAY_FORMAT: u'F j'
MANAGERS: []
SESSION_EXPIRE_AT_BROWSER_CLOSE: False
AUTH_PASSWORD_VALIDATORS: u'********'
TIME_FORMAT: u'P'
AWS_SQS_SECRET_ACCESS_KEY: u'********'
AUTH_USER_MODEL: u'auth.User'
DATE_INPUT_FORMATS: [u'%Y-%m-%d',
u'%m/%d/%Y',
u'%m/%d/%y',
u'%b %d %Y',
u'%b %d, %Y',
u'%d %b %Y',
u'%d %b, %Y',
u'%B %d %Y',
u'%B %d, %Y',
u'%d %B %Y',
u'%d %B, %Y']
CELERY_BROKER_TRANSPORT_OPTIONS: {
'polling_interval': 30,
'queue_name_prefix': 'project-prod-',
'region': 'eu-central-1',
'visibility_timeout': 3600,
'wait_time_seconds': 20}
CSRF_TRUSTED_ORIGINS: []
CSRF_COOKIE_NAME: u'csrftoken'
EMAIL_HOST_PASSWORD: u'********'
AWS_SES_REGION_ENDPOINT: 'email.us-west-2.amazonaws.com'
PASSWORD_RESET_TIMEOUT_DAYS: u'********'
LANGUAGE_COOKIE_DOMAIN: None
CACHE_MIDDLEWARE_ALIAS: u'default'
SESSION_SAVE_EVERY_REQUEST: False
NUMBER_GROUPING: 0
SESSION_ENGINE: u'django.contrib.sessions.backends.db'
AWS_SQS_ACCESS_KEY: u'********'
CSRF_FAILURE_VIEW: u'django.views.csrf.csrf_failure'
CSRF_COOKIE_PATH: u'/'
LOGIN_REDIRECT_URL: u'/accounts/profile/'
CELERY_TASK_SERIALIZER: 'json'
DECIMAL_SEPARATOR: u'.'
CACHE_MIDDLEWARE_KEY_PREFIX: u'********'
LOCALE_PATHS: []
AWS_ACCESS_KEY: u'********'
SESSION_FILE_PATH: None
SECURE_BROWSER_XSS_FILTER: False
FIXTURE_DIRS: []
EMAIL_HOST: u'localhost'
DATE_FORMAT: u'N j, Y'
MEDIA_ROOT: u''
ENCRYPTED_FIELDS_KEYDIR: u'********'
DEFAULT_EXCEPTION_REPORTER_FILTER: u'django.views.debug.SafeExceptionReporterFilter'
ADMINS: []
FORMAT_MODULE_PATH: None
DEFAULT_FROM_EMAIL: 'some@project.com'
THOUSAND_SEPARATOR: u','
REST_FRAMEWORK: {
'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework.authentication.TokenAuthentication',)}
STATICFILES_DIRS:
('/home/ubuntu/webapps/project/project/../static',)
SECURE_CONTENT_TYPE_NOSNIFF: False
DATETIME_FORMAT: u'N j, Y, P'
CELERY_ACCEPT_CONTENT: ['json']
AWS_SES_ACCESS_KEY_ID: u'********'
SITE_ID: 1
DISALLOWED_USER_AGENTS: []
REST_AUTH_REGISTER_SERIALIZERS: {
'REGISTER_SERIALIZER': 'authentication.serializers.RegistrationSerializer'}
CELERY_TIMEZONE: 'Europe/Berlin'
LOGGING: {
'disable_existing_loggers': False,
'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse'}},
'handlers': { 'mail_admins': { 'class': 'django.utils.log.AdminEmailHandler',
'filters': ['require_debug_false'],
'level': 'ERROR'}},
'loggers': { 'django.request': { 'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True}},
'version': 1}
SHORT_DATE_FORMAT: u'm/d/Y'
TEMPLATES: [{'APP_DIRS': True,
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['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']}}]
LOGOUT_REDIRECT_URL: None
TEST_RUNNER: u'django.test.runner.DiscoverRunner'
ACCOUNT_LOGOUT_ON_PASSWORD_CHANGE: u'********'
IGNORABLE_404_URLS: []
EMAIL_USE_TLS: False
TIME_ZONE: 'Europe/Berlin'
FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440
EMAIL_BACKEND: 'django_ses.SESBackend'
S3_URL: 'https://project-static.s3.amazonaws.com/'
LANGUAGE_COOKIE_NAME: u'django_language'
CSRF_COOKIE_AGE: 31449600
EMAIL_USE_SSL: False
CELERY_SEND_TASK_ERROR_EMAILS: True
MIGRATION_MODULES: {
}
REST_AUTH_SERIALIZERS: {
'LOGIN_SERIALIZER': 'authentication.serializers.CustomLoginSerializer',
'USER_DETAILS_SERIALIZER': 'authentication.serializers.UserSerializer'}
DATA_UPLOAD_MAX_NUMBER_FIELDS: 1000
SESSION_COOKIE_AGE: 1209600
SESSION_SERIALIZER: u'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE: u'project.settings.prod'
USE_ETAGS: False

LANGUAGES_BIDI: [u'he', u'ar', u'fa', u'ur']
FILE_UPLOAD_TEMP_DIR: None
INTERNAL_IPS: []
STATIC_URL: 'https://project-static.s3.amazonaws.com/'
EMAIL_PORT: 25
USE_TZ: True
SHORT_DATETIME_FORMAT: u'm/d/Y P'
CELERY_RESULT_BACKEND: 'django-db'
PASSWORD_HASHERS: u'********'
ACCOUNT_UNIQUE_EMAIL: True
ABSOLUTE_URL_OVERRIDES: {
}
LANGUAGE_COOKIE_PATH: u'/'
CACHE_MIDDLEWARE_SECONDS: 600
EMAIL_SSL_CERTFILE: None
CSRF_COOKIE_HTTPONLY: False
DATETIME_INPUT_FORMATS: [u'%Y-%m-%d %H:%M:%S',
u'%Y-%m-%d %H:%M:%S.%f',
u'%Y-%m-%d %H:%M',
u'%Y-%m-%d',
u'%m/%d/%Y %H:%M:%S',
u'%m/%d/%Y %H:%M:%S.%f',
u'%m/%d/%Y %H:%M',
u'%m/%d/%Y',
u'%m/%d/%y %H:%M:%S',
u'%m/%d/%y %H:%M:%S.%f',
u'%m/%d/%y %H:%M',
u'%m/%d/%y']
FORCE_SCRIPT_NAME: None
EMAIL_HOST_USER: u''

Issue 2:
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

I used to Django Web and when celery result contains Chinese fomat,the Chinese characters in the SQL database are encoded in Unicode format, not UTF8,Please advice,thanks.

Possible Duplicates

Environment & Settings

Celery version: 4.4.5

celery report Output:

-------------- celery@CN-GZWNH42 v4.4.5 (cliffs)
--- ***** -----
-- ******* ---- Windows-10-10.0.18362-SP0 2020-06-10 17:39:54
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: sms:0x157d51ba9c8
- ** ---------- .> transport: redis://xxxxxxxxxxxx:6379/13
- ** ---------- .> results:
- *** --- * --- .> concurrency: 4 (eventlet)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery

[tasks]
. mycelery.sms.tasks.send_sms
. mycelery.sms.tasks.send_sms2

[2020-06-10 17:39:55,655: INFO/MainProcess] Connected to redis://xxxxxxxxx:6379/13
[2020-06-10 17:39:55,689: INFO/MainProcess] mingle: searching for neighbors
[2020-06-10 17:39:58,855: INFO/MainProcess] mingle: all alone
[2020-06-10 17:39:59,824: INFO/MainProcess] celery@CN-GZWNH42 ready.
[2020-06-10 17:39:59,869: INFO/MainProcess] pidbox: Connected to redis://xxxxxxxxxxxx:6379/13.
[2020-06-10 17:40:09,649: INFO/MainProcess] Received task: mycelery.sms.tasks.send_sms2[9b686dc8-c
398-4c98-9284-cf91fec762a5]
[2020-06-10 17:40:09,651: WARNING/MainProcess] 向手机号110发送短信成功2!
[2020-06-10 17:40:10,953: INFO/MainProcess] Task mycelery.sms.tasks.send_sms2[9b686dc8-c398-4c98-9
284-cf91fec762a5] succeeded in 1.2959999999984575s: '向手机号110发送短信成功!!'

Steps to Reproduce

Settings:

BROKER_URL = 'redis://xxxxxx:6379/13'
CELERY_RESULT_BACKEND = 'django-db'

CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'Asia/Shanghai'
CELERY_TASK_SERIALIZER = 'json'
CELERY_ENABLE_UTC = True
# CELERY_ACCEPT_CONTENT = ["json"]
# CELERY_RESULT_SERIALIZER = 'json'
# CELERY_TASK_RESULT_EXPIRES = 60 * 60 * 24
# CELERY_ACCEPT_CONTENT = ["json"]

Required Dependencies

Minimal Python Version: 3.7.5

Minimal Celery Version: 4.4.5

Minimal Kombu Version: 4.6.10

Minimal Broker Version: redis 3.5.3

Minimal Result Backend Version: PyMySQL 0.9.3

Minimal OS and/or Kernel Version: Window10

Minimal Broker Client Version: Redis

Minimal Result Backend Client Version: django-db

Python Packages

pip freeze Output:

Other Dependencies

N/A

Minimally Reproducible Test Case

task code：

@app.task
def send_sms2(mobile):
print("向手机号%s发送短信成功2!" % mobile)
time.sleep(1)
return "向手机号%s发送短信成功!!" % mobile

Expected Behavior

Chinese used UTF-8 format to displayed in normally and the SQL database(may include others)

Actual Behavior

Chinese used Unicode format to display