Django python-rq -- DatabaseError SSL error: decryption failed or bad record mac
Asked Answered
I

1

11

I'm using the django-redis and django_rq frameworks to support both redis caching and redis background task processing for my Django application on Heroku. It's worked smoothly in the past, however now I keep getting a DatabaseError SSL error: decryption failed or bad record mac every time one of my jobs get run.

I read that this error occurs commonly with Postgres in the https://devcenter.heroku.com/articles/postgres-logs-errors article, but it hasn't really been giving me anything useful for my python setup.

Inerasable answered 8/7, 2013 at 10:3 Comment(0)
I
18

The problem is solved by closing the DB connection at the beginning of each job.

For example,

@job
some_job():
    from django.db import connection
    connection.close()
    some_more_code()
Inerasable answered 8/7, 2013 at 10:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.