#DECRYPTION_FAILED_OR_BAD_RECORD_MAC

2 messages · Page 1 of 1 (latest)

gloomy otter
#

Hi,

I'm running a Celery worker with 16 concurrent workers and recently enabled the experimental logging feature in the Python SDK. Everything works fine initially, but after a while I start seeing this error repeatedly:

[2025-06-08 08:23:14,183: WARNING/ForkPoolWorker-27] Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(1, '[SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2570)')': /api/4509207728947280/envelope/

This happens under high task load, and workers eventually become unresponsive. If I disable the Sentry logging integration, the problem disappears.

Setup details:

Celery 5.5.2

Python Sentry SDK versions tried: 2.28.0 and 2.29.1

Python version: 3.12.8

Worker command:

celery worker
--concurrency=16
--loglevel=info
-Q q1,q2
--max-memory-per-child=2621440
--max-tasks-per-child=10
--without-gossip
--without-mingle
--heartbeat-interval=10

Any idea what could be causing this SSL error with the logging feature?

grave island
#

Hey @gloomy otter - please open a GitHub issue https://github.com/getsentry/sentry-python. The SDK maintainers will help triage and dig further.

issues like this we will prioritize to fix asap, the sentry sdks should not be erroring your app like this.