Skip to content

Celery hangs indefinitely (instead of failing) if redis is not started #4556

@nemesifier

Description

@nemesifier

Checklist

  • 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.
software -> celery:4.1.0 (latentcall) kombu:4.1.0 py:2.7.12
            billiard:3.5.0.3 redis:2.10.6
platform -> system:Linux arch:64bit, ELF imp:CPython
loader   -> celery.loaders.app.AppLoader
settings -> transport:redis results:disabled

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

Steps to reproduce

Stop redis-server.
Initialize a celery instance configured with redis.

Expected behavior

I expected an OperationalError or another exception communicating that celery cannot connect to the broker server.

Actual behavior

It hangs indefinitely.

Why this is important

In the current situation is not possible to write automated functional and integration tests that check whether the software handles failures when brokers are not reachable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions