Queries not executing on Dokku app

Hi,

My queries aren’t executing and remain as pending. I am using Dokku on DigitalOcean.

Logs:

2021-03-11T18:54:16.452924933Z app[worker.1]: Starting scheduler and 1 workers for queues: celery...
2021-03-11T18:54:31.496614171Z app[worker.1]: [2021-03-11 18:54:31,466][PID:6][INFO][MainProcess] Connected to redis://:**@dokku-redis-redash:6379//
2021-03-11T18:54:31.545182664Z app[worker.1]: [2021-03-11 18:54:31,544][PID:6][INFO][MainProcess] mingle: searching for neighbors
2021-03-11T18:54:32.708581021Z app[worker.1]: [2021-03-11 18:54:32,707][PID:6][INFO][MainProcess] mingle: sync with 1 nodes
2021-03-11T18:54:32.712452921Z app[worker.1]: [2021-03-11 18:54:32,712][PID:6][INFO][MainProcess] mingle: sync complete
2021-03-11T18:54:32.832754307Z app[worker.1]: [2021-03-11 18:54:32,832][PID:6][INFO][MainProcess] celery@61ed164275e4 ready.
2021-03-11T18:54:52.232994970Z app[worker.1]: [2021-03-11 18:54:52,232][PID:12][INFO][Beat] beat: Starting...
2021-03-11T18:55:12.608327799Z app[worker.1]: [2021-03-11 18:55:12,577][PID:6][INFO][MainProcess] Received task: redash.tasks.refresh_queries[3996e2ac-dd95-41a7-b3ea-2a5c87f71db5]
2021-03-11T18:55:12.624153020Z app[worker.1]: [2021-03-11 18:55:12,619][PID:13][INFO][ForkPoolWorker-2] task_name=redash.tasks.refresh_queries task_id=3996e2ac-dd95-41a7-b3ea-2a5c87f71db5 Refreshing queries...
2021-03-11T18:55:19.321072795Z app[worker.1]: [2021-03-11 18:55:19,275][PID:13][INFO][ForkPoolWorker-2] task_name=redash.tasks.refresh_queries task_id=3996e2ac-dd95-41a7-b3ea-2a5c87f71db5 Done refreshing queries. Found 0 outdated queries: []
2021-03-11T18:55:19.776737423Z app[worker.1]: [2021-03-11 18:55:19,756][PID:13][INFO][ForkPoolWorker-2] Task redash.tasks.refresh_queries[3996e2ac-dd95-41a7-b3ea-2a5c87f71db5] succeeded in 7.137625701s: None
2021-03-11T18:55:22.539227193Z app[worker.1]: [2021-03-11 18:55:22,538][PID:12][INFO][Beat] Scheduler: Sending due task refresh_queries (redash.tasks.refresh_queries)
2021-03-11T18:55:47.062687680Z app[worker.1]: [2021-03-11 18:55:47,039][PID:6][ERROR][MainProcess] Process 'ForkPoolWorker-2' pid:13 exited with 'signal 9 (SIGKILL)'
2021-03-11T18:55:52.453073598Z app[worker.1]: [2021-03-11 18:55:52,452][PID:12][INFO][Beat] Scheduler: Sending due task sync_user_details (redash.tasks.sync_user_details)
2021-03-11T18:55:52.471690222Z app[worker.1]: [2021-03-11 18:55:52,468][PID:6][INFO][MainProcess] Received task: redash.tasks.sync_user_details[42f3e58d-a73e-4eb6-98d9-4575ca42fddf]   expires:[2021-03-11 18:56:37.456637+00:00]
2021-03-11T18:55:52.475581774Z app[worker.1]: [2021-03-11 18:55:52,475][PID:12][INFO][Beat] Scheduler: Sending due task refresh_queries (redash.tasks.refresh_queries)
2021-03-11T18:55:53.133441127Z app[worker.1]: [2021-03-11 18:55:53,127][PID:14][INFO][ForkPoolWorker-3] Task redash.tasks.sync_user_details[42f3e58d-a73e-4eb6-98d9-4575ca42fddf] succeeded in 0.0229886029992s: None
2021-03-11T18:55:53.146369808Z app[worker.1]: [2021-03-11 18:55:53,145][PID:6][INFO][MainProcess] Received task: redash.tasks.refresh_queries[8f4caac8-2f52-47dc-9050-c0b7c3509ee9]
2021-03-11T18:55:53.156806504Z app[worker.1]: [2021-03-11 18:55:53,156][PID:14][INFO][ForkPoolWorker-3] task_name=redash.tasks.refresh_queries task_id=8f4caac8-2f52-47dc-9050-c0b7c3509ee9 Refreshing queries...
2021-03-11T18:55:53.816001394Z app[worker.1]: [2021-03-11 18:55:53,814][PID:14][INFO][ForkPoolWorker-3] task_name=redash.tasks.refresh_queries task_id=8f4caac8-2f52-47dc-9050-c0b7c3509ee9 Done refreshing queries. Found 0 outdated queries: []
2021-03-11T18:55:53.832776271Z app[worker.1]: [2021-03-11 18:55:53,832][PID:14][INFO][ForkPoolWorker-3] Task redash.tasks.refresh_queries[8f4caac8-2f52-47dc-9050-c0b7c3509ee9] succeeded in 0.676344801002s: None

When Running Query:

    2021-03-11T19:38:47.805426614Z app[web.1]: [2021-03-11 19:38:47,805][PID:92][INFO][root] Inserting job for 54d8677065a4e43bd1d9ca968c8573fe with metadata={'Username': u'daniyalmajeedmirza@yahoo.com', 'Query ID': 'adhoc'}
    2021-03-11T19:38:47.815259116Z app[web.1]: [2021-03-11 19:38:47,815][PID:92][INFO][root] [54d8677065a4e43bd1d9ca968c8573fe] Created new job: 233e3444-9433-42b0-a435-c90a1b502b53
    2021-03-11T19:38:47.818188337Z app[web.1]: [2021-03-11 19:38:47,818][PID:92][INFO][metrics] method=POST path=/api/query_results endpoint=query_results status=200 content_type=application/json content_length=123 duration=30.90 query_count=7 query_duration=8.28
    2021-03-11T19:38:48.049950829Z app[web.1]: [2021-03-11 19:38:48,049][PID:90][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=1.58 query_count=2 query_duration=2.89
    2021-03-11T19:38:48.805868379Z app[web.1]: [2021-03-11 19:38:48,805][PID:92][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=1.18 query_count=2 query_duration=10.51
    2021-03-11T19:38:48.817212760Z app[web.1]: [2021-03-11 19:38:48,816][PID:93][INFO][metrics] method=POST path=/api/events endpoint=events status=200 content_type=application/json content_length=4 duration=10.58 query_count=2 query_duration=11.11
    2021-03-11T19:38:49.604211939Z app[web.1]: [2021-03-11 19:38:49,603][PID:92][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=0.94 query_count=2 query_duration=2.51
    2021-03-11T19:38:50.333923989Z app[web.1]: [2021-03-11 19:38:50,333][PID:91][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=1.53 query_count=2 query_duration=2.63
    2021-03-11T19:38:51.063938376Z app[web.1]: [2021-03-11 19:38:51,063][PID:92][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=1.19 query_count=2 query_duration=3.43
    2021-03-11T19:38:51.830021247Z app[web.1]: [2021-03-11 19:38:51,829][PID:91][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=0.98 query_count=2 query_duration=3.36
    2021-03-11T19:38:52.559662050Z app[web.1]: [2021-03-11 19:38:52,559][PID:92][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=1.00 query_count=2 query_duration=2.58
    2021-03-11T19:38:53.299266871Z app[web.1]: [2021-03-11 19:38:53,298][PID:91][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=1.11 query_count=2 query_duration=3.16
    2021-03-11T19:38:54.036612255Z app[web.1]: [2021-03-11 19:38:54,036][PID:92][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=1.14 query_count=2 query_duration=2.56
    2021-03-11T19:38:54.810308919Z app[web.1]: [2021-03-11 19:38:54,809][PID:91][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=0.90 query_count=2 query_duration=9.54
    2021-03-11T19:38:55.568301211Z app[web.1]: [2021-03-11 19:38:55,567][PID:93][INFO][metrics] method=GET path=/api/jobs/233e3444-9433-42b0-a435-c90a1b502b53 endpoint=job status=200 content_type=application/json content_length=123 duration=1.60 query_count=2 query_duration=3.11

Redash Installation on Dokku App:

DockerFile

FROM redash/redash:latest
WORKDIR /app
COPY . ./

Procfile

web: server
worker: scheduler

Thanks in advance!

Has anyone had the solution? Knowing the Redash is now EOL, I tried to deploy Redash using Dokku and can confirm that the query is not working :frowning:

I haven’t worked with dokku. What steps did you follow to set this up? What version of Redash?

Hi,

I’ve managed to run queries. I’ve put the step-by-step tutorial here: GitHub - dennypradipta/deploy-redash-using-dokku: A step-by-step tutorial to deploy self-hosted Redash using Dokku

For your information, I used the Redash latest image from Docker.

It seems that yesterday the problem was there are no workers and schedulers available. So I took a peek to the Procfile and Docker Compose file, and managed to run the queries.

1 Like