-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.3.9
Python version
3.9
Steps to Reproduce
- Configure Netbox to use a Redis Sentinel cluster
- Add RQ_DEFAULT_TIMEOUT=300 in configuration.py
- Run a report with a
time.sleep(310)in the code (simulate long run)
logs are
File "/opt/netbox/venv/lib/python3.9/site-packages/rq/timeouts.py", line 61, in handle_death_penalty
raise self._exception('Task exceeded maximum timeout value 'rq.timeouts.JobTimeoutException: Task exceeded maximum timeout value (180 seconds)
Expected Behavior
the RQ_DEFAULT_TIMEOUT parameter should be used for Redis Sentinel as the same way of Redis.
180s seems to be the default value of Python RQ.
https://github.com/rq/rq/blob/0691b4d46eb721b5fb5395a03fd770db7e1651f4/rq/queue.py#L41
Observed Behavior
the RQ_PARAMS in
netbox/netbox/netbox/settings.py
Line 626 in 860805b
| RQ_PARAMS = { |
'DEFAULT_TIMEOUT': RQ_DEFAULT_TIMEOUT, for the Redis Sentinel case.
I successfully tested to add that parameter in RQ_PARAMS.
The logs became
File "/opt/netbox/venv/lib/python3.9/site-packages/rq/timeouts.py", line 61, in handle_death_penalty
raise self._exception('Task exceeded maximum timeout value 'rq.timeouts.JobTimeoutException: Task exceeded maximum timeout value (300 seconds)
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application