kombu
kombu copied to clipboard
autoretry interval may overflow interval_max setting
In the attached example I set interval_max=6 in the call to Connection.autoretry() However should the connection fail the retry interval goes above 6:
$ python ~/test1.py WARNING:root:on_error called, interval=0 exc=[Errno 104] Connection reset by peer WARNING:root:on_error called, interval=1.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=3.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=5.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused WARNING:root:on_error called, interval=7.0 exc=[Errno 111] Connection refused
To reproduce:
start rabbitmq server run test1.py in separate shell - allow it to connect stop rabbitmq server this causes the auto retry loop and interval will overflow the max
kombu version 4.2.1 platform fedora 28 x86_64 python2.7