redash: Scheduler not working, setting refresh_schedules is not making queries to be queued
Issue Summary
We have an issue where it seems like the Scheduler is not picking up the queries that we’ve put a refresh_schedule on. The interval does not matter, no queries are automatically being scheduled.
Technical details:
- Compose yml:
version: "2"
x-redash-service: &redash-service
image: redash/redash:10.1.0.b50633
depends_on:
- postgres
- redis
env_file: /opt/redash/env
restart: always
services:
server:
<<: *redash-service
command: server
ports:
- "5000:5000"
environment:
REDASH_WEB_WORKERS: 4
scheduler:
<<: *redash-service
command: scheduler
scheduled_worker:
<<: *redash-service
command: worker
adhoc_worker:
<<: *redash-service
command: worker
redis:
image: redis:5.0-alpine
restart: always
postgres:
image: postgres:9.6-alpine
env_file: /opt/redash/env
volumes:
- /opt/redash/postgres-data:/var/lib/postgresql/data
restart: always
nginx:
image: nginx:latest
ports:
- "80:80"
- "443:443"
depends_on:
- server
links:
- server:redash
volumes:
- /opt/redash/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- /opt/redash/nginx/certs:/etc/letsencrypt
- /opt/redash/nginx/certs-data:/data/letsencrypt
restart: always
worker:
<<: *redash-service
command: worker
environment:
QUEUES: "periodic emails default"
WORKERS_COUNT: 1
Scheduler logs
[2023-08-04 09:22:11,640][PID:1][INFO][redash.tasks.schedule] Scheduling 305c0cae0a196ae96915fd2b6f81001c435aad65 (refresh_queries) with interval 30.
[2023-08-04 09:22:11,642][PID:1][INFO][redash.tasks.schedule] Scheduling 59a84668e68687338646f735965213c58e814b32 (remove_ghost_locks) with interval 60.
[2023-08-04 09:22:11,643][PID:1][INFO][redash.tasks.schedule] Scheduling 75540cdf868e7873f5eec072177423b13b98dece (empty_schedules) with interval 3600.
[2023-08-04 09:22:11,644][PID:1][INFO][redash.tasks.schedule] Scheduling 52bcd40c254552539398db3cdb15055d4a9a536a (refresh_schemas) with interval 1800.
[2023-08-04 09:22:11,648][PID:1][INFO][redash.tasks.schedule] Scheduling 18281a865ed3d1a60f366aeb8596fe2283aa421f (sync_user_details) with interval 60.
[2023-08-04 09:22:11,649][PID:1][INFO][redash.tasks.schedule] Scheduling 797f4f959c6c96c738efd445b17db75742db80a9 (send_aggregated_errors) with interval 3600.
[2023-08-04 09:22:11,650][PID:1][INFO][redash.tasks.schedule] Scheduling e27209059575fcc17c527c47d0957cb21756e551 (cleanup_query_results) with interval 300.
Workers
We have 5 workers that are always idle for work. So it’s not the case that there is no workers to pick up the work. But the queue remains 0, no queries with refresh schedules are being added to the queue.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 27 (7 by maintainers)
@amrendraupadhyay you should follow the instructions outlined in this comment. If you need any additional support, please feel free to open a new issue with specific steps to reproduce your errors.
Closing the issue since the original issue seems to have been resolved.
@veshus do you have a worker designated for scheduled queries?
You’ll notice here that the scheduled worker listens to a different queue than the regular workers do. In the OP’s docker compose there is no such worker, so I’m guessing that is the problem. I’m also unable to reproduce this error.
No, it doesn’t start at all, even in first time. I can set schedule, disable it, set it again. Nothing happens.
Yes, correct. I have 3 queries (all from JSON datasource). No one refreshed.