Hello,

I just updated to v9 beta, and then there is an error when I refresh schema, showing a message that “schema refresh failed”. No matter it is mysql or postgresql.

I tried to downgrade to v8 and it looks fine, schema can be refreshed…may I know what is wrong? Or anyone has the same problem? Thanks.

What kind of database are you using?

Tried mysql & PostgreSQL, both have the same issue. Thanks.

Hey @kk934, could you find a resolution to this? I am also facing the same issue wherin refresh schema is failing for PostgreSQL. I can see from the logs that this api is not returning any value /api/data_sources/1/schema

Yes, I found the solution here recently,

" Following this example it seems to be missing “schemas” on the scheduled_worker queues."

https://github.com/getredash/redash/issues/5115

I’ve installed the latest docker available last week (preview 10f641019ddb) and I’m facing the same refresh problem with schema.
By looking at the following issue 5115 I’ve updated the scheduled worker with the following value:

           QUEUES: "scheduled_queries,schemas"

But it does not help.

Am I missing something ?

image

The logs from the scheduler worker:

[2021-02-01 18:39:47,233][PID:8][DEBUG][rq_scheduler.scheduler] Checking for scheduled jobs
[2021-02-01 18:39:47,234][PID:8][DEBUG][rq_scheduler.scheduler] Pushing 305c0cae0a196ae96915fd2b6f81001c435aad65 to periodic
[2021-02-01 18:39:47,236][PID:8][DEBUG][rq_scheduler.scheduler] Pushing 59a84668e68687338646f735965213c58e814b32 to periodic
[2021-02-01 18:39:47,238][PID:8][DEBUG][rq_scheduler.scheduler] Pushing c33b2b69cac2aa765fa2d2eb42301a0fc1ae774c to periodic
[2021-02-01 18:39:47,239][PID:8][DEBUG][rq_scheduler.scheduler] Sleeping 4.99 seconds
[2021-02-01 18:39:52,237][PID:8][DEBUG][rq_scheduler.scheduler] Entering run loop
[2021-02-01 18:39:52,238][PID:8][DEBUG][rq_scheduler.scheduler] Checking for scheduled jobs

I can’t say with these logs if the schema are updated or not…

Help is welcome

In Queue list separate it by space instead of , like below

  QUEUES: "scheduled_queries schemas"

I’ve checked the other QUEUES parameters (in adhocWorker a comma is used)

## Configuration for Redash ad-hoc workers
adhocWorker:
  # adhocWorker.env -- Redash ad-hoc worker specific envrionment variables.
  env:
    QUEUES: "queries,celery"
    WORKERS_COUNT: 2

But I did a try and unfortunately it does not changed anything;

Config display for Kubernetes Pod

    - name: QUEUES
      value: scheduled_queries schemas
    - name: WORKERS_COUNT
      value: '2'

The logs of the pod shows that at last some scheduled processes seem to be started

[2021-02-10 22:52:15,841][PID:8][INFO][rq_scheduler.scheduler] Registering birth
[2021-02-10 22:52:15,843][PID:8][DEBUG][rq_scheduler.scheduler] Entering run loop
[2021-02-10 22:52:15,844][PID:8][DEBUG][rq_scheduler.scheduler] Checking for scheduled jobs
[2021-02-10 22:52:15,845][PID:8][DEBUG][rq_scheduler.scheduler] Pushing 305c0cae0a196ae96915fd2b6f81001c435aad65 to periodic
[2021-02-10 22:52:15,848][PID:8][DEBUG][rq_scheduler.scheduler] Pushing 18281a865ed3d1a60f366aeb8596fe2283aa421f to periodic
[2021-02-10 22:52:15,850][PID:8][DEBUG][rq_scheduler.scheduler] Pushing 59a84668e68687338646f735965213c58e814b32 to periodic
[2021-02-10 22:52:15,853][PID:8][DEBUG][rq_scheduler.scheduler] Pushing e27209059575fcc17c527c47d0957cb21756e551 to periodic
[2021-02-10 22:52:15,855][PID:8][DEBUG][rq_scheduler.scheduler] Sleeping 4.99 seconds
[2021-02-10 22:52:20,848][PID:8][DEBUG][rq_scheduler.scheduler] Entering run loop
[2021-02-10 22:52:20,849][PID:8][DEBUG][rq_scheduler.scheduler] Checking for scheduled jobs
[2021-02-10 22:52:20,851][PID:8][DEBUG][rq_scheduler.scheduler] Sleeping 5.00 seconds

But no outcome (at least in the logs)

Am I missing a config for a worker to execute them ?

It seems to be working if I’m adding to adhoWorker (and not the scheduledWorker) the schemas queue

adhocWorker:

adhocWorker.env – Redash ad-hoc worker specific envrionment variables.

env:
QUEUES: “queries,celery,schemas,periodic,default”
WORKERS_COUNT: 2

or in my case (self helm deploy) the Pull Request solves my issues: WIP: Changes required for redash v9 by jimsparkman · Pull Request #36 · getredash/contrib-helm-chart · GitHub