By Rashmi Joshi
After initially implementing Celery in my project, it was working fine. However, after adding SSL to the project, Celery has stopped functioning, and emails are not being sent.The other functionalities in my project are sending emails successfully, but the emails triggered by Celery tasks are not being sent.
the below is the output that means celery running in background properly.
root@django-project:/myprojects# source projectenv/bin/activate
(projectenv) root@django-project:/myprojects# cd ..
(projectenv) root@django-project:/# sudo supervisorctl stop celery_worker
celery_worker: stopped
(projectenv) root@django-project:/# sudo supervisorctl stop celery_beat
celery_beat: stopped
(projectenv) root@django-project:/# sudo supervisorctl restart celery_worker
celery_worker: ERROR (not running)
celery_worker: started
(projectenv) root@django-project:/# sudo supervisorctl restart celery_beat
celery_beat: ERROR (not running)
celery_beat: started
(projectenv) root@django-project:/# sudo supervisorctl status celery_worker
celery_worker RUNNING pid 353104, uptime 0:00:27
(projectenv) root@django-project:/# sudo supervisorctl status celery_beat
celery_beat RUNNING pid 353113, uptime 0:00:25
(projectenv) root@django-project:/#
the below is celery_beat.conf file
[program:celery_beat]
command=/myprojects/projectenv/bin/celery -A core beat -l info
directory=/myprojects/green_bill
user=root
autostart=true
autorestart=true
stderr_logfile=/var/log/celery_beat.err.log
stdout_logfile=/var/log/celery_beat.out.log
environment=PATH="/myprojects/projectenv/bin:%(ENV_PATH)s"
the below is celery_worker.conf file
[program:celery_worker]
command=/myprojects/projectenv/bin/celery -A core.celery worker --pool=solo -l info
directory=/myprojects/green_bill
user=root
autostart=true
autorestart=true
stderr_logfile=/var/log/celery_worker.err.log
stdout_logfile=/var/log/celery_worker.out.log
environment=PATH="/myprojects/projectenv/bin:%(ENV_PATH)s"
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya @rashmijoshi,
It’s hard to pinpoint the exact reason like that so here are some steps you can try to further troubleshoot the issue.
EMAIL_USE_TLS or EMAIL_USE_SSL), and valid SMTP server credentials./var/log/celery_worker.err.log and /var/log/celery_beat.err.log) for any errors or warnings that occurred during the task execution, especially those related to email sending or SSL issues.Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.