Issue Summary

A query cannot be saved with very small and seemingly innocuous changes, for example:

  1. This query can be saved

  2. Adding a space between “ROUND” and “CAST” on line 6 and the query can no longer be saved

Technical details:

  • Redash Version: V10
  • Browser/OS: Chrome/ MAC
  • How did you install Redash: DigitalOcean v8, then upgraded to v10

The docker-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
    environment:
      QUEUES: "scheduled_queries,schemas"
      WORKERS_COUNT: 1
  adhoc_worker:
    <<: *redash-service
    command: worker
    environment:
      QUEUES: "queries"
      WORKERS_COUNT: 12
  worker:
    <<: *redash-service
    command: worker
    environment:
      QUEUES: "periodic emails default"
      WORKERS_COUNT: 1
  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

Your docker-compose file looks good :+1:

A few questions for you:

  1. Please open your browser’s network inspector. When you click the save button, what does the network response look like when the save operation fails?
  2. On your droplet, run the following and then click the save button in your browser: cd /opt/redash && sudo docker-compose logs -f --tail 100. You should see a more precise error about what went wrong.
  3. What kind of data source does this query use?

Oh thanks for your pointer! Upon checking the browser’s network inspector, I think the error is because I set the DO instance hosting redash as a subdomain of another website protected by Cloudflare. The error from the network inspector is from cloudflare blocking the POST request sent to that subdomain

Do you have any tips for this scenario besides moving the Digital Ocean instance outside of Cloudflare firewall?

I think I figured it out. I can specify firewall rules specific to each subdomain. Thanks! You can close this topic.

Thanks for posting your solution! Please continue posting questions if you have them :slight_smile: Love to see the community engagement.