Skip to content

Instantly share code, notes, and snippets.

@GitSumito
Last active March 29, 2018 06:25
Show Gist options
  • Save GitSumito/2fef53f9a648852ac5ae6d5da7914f09 to your computer and use it in GitHub Desktop.
Save GitSumito/2fef53f9a648852ac5ae6d5da7914f09 to your computer and use it in GitHub Desktop.
dockerで稼働するredashのトラブルと対策 ref: https://qiita.com/S-T/items/bee0ae9c8c0acbd940cc
worker:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries,scheduled_queries,celery"
WORKERS_COUNT: 1
restart: always
worker-queries:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries"
WORKERS_COUNT: 1
restart: always
worker-scheduled_queries:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "scheduled_queries"
WORKERS_COUNT: 1
restart: always
worker-celery:
image: redash/redash:latest
command: scheduler
environment:
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "celery"
WORKERS_COUNT: 1
restart: always
docker ps
docker exec -it redash_postgres_1 /bin/bash
pg_dump -U postgres postgres | gzip > /tmp/redash_backup.gz
exit
docker cp redash_postgres_1:/tmp/redash_backup.gz .
docker stop redash_worker-scheduled_queries_1 redash_worker-celery_1 redash_worker-queries_1 redash_server_1
docker rm redash_worker-scheduled_queries_1 redash_worker-celery_1 redash_worker-queries_1 redash_server_1
#image: redash/redash:latest
image: redash/redash:4.0.0-rc.1
# docker-compose run --rm server manage db upgrade
Starting redash_redis_1
[2018-03-29 05:52:16,551][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 05:52:16,586][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-03-29 05:52:17,848][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-03-29 05:52:17,848][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
#
# docker-compose -f docker-compose.production.yml run --rm server manage db upgrade
[2018-03-29 06:05:30,551][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 06:05:30,585][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-03-29 06:05:32,423][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-03-29 06:05:32,424][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
[2018-03-29 06:05:32,433][PID:1][INFO][alembic.runtime.migration] Running upgrade d1eae8b9893e -> 7671dca4e604, empty message
[2018-03-29 06:05:32,439][PID:1][INFO][alembic.runtime.migration] Running upgrade 7671dca4e604 -> 5ec5c84ba61e, Add Query.search_vector field for full text search.
[2018-03-29 06:05:32,565][PID:1][INFO][alembic.runtime.migration] Running upgrade 5ec5c84ba61e -> 6b5be7e0a0ef, Re-index Query.search_vector with existing queries.
[2018-03-29 06:05:32,661][PID:1][INFO][alembic.runtime.migration] Running upgrade 6b5be7e0a0ef -> 969126bd800f, Update widget's position data based on dashboard layout.
Updating dashboards position data:
Updating dashboard: 1
Building widgets map:
Widget: 1
Widget: 2
Iterating over layout:
Row: 0 - [1, 2]
Column: 0 - 1
Column: 1 - 2
Updating dashboard: 2
Building widgets map:
Widget: 3
Iterating over layout:
Row: 0 - [3]
Column: 0 - 3
Updating dashboard: 4
Building widgets map:
Widget: 18
Iterating over layout:
Row: 0 - [18]
Column: 0 - 18
Updating dashboard: 5
Building widgets map:
Widget: 21
Widget: 22
Widget: 31
Widget: 32
Widget: 41
Widget: 42
Widget: 82
Widget: 93
Iterating over layout:
Row: 0 - [93]
Column: 0 - 93
Row: 1 - [21]
Column: 0 - 21
Row: 2 - [22]
Column: 0 - 22
Row: 3 - [31]
Column: 0 - 31
Row: 4 - [32]
Column: 0 - 32
Row: 5 - [41]
Column: 0 - 41
Row: 6 - [42]
Column: 0 - 42
Row: 7 - [82]
Column: 0 - 82
Updating dashboard: 9
Building widgets map:
Widget: 53
Widget: 94
Iterating over layout:
Row: 0 - [94]
Column: 0 - 94
Row: 1 - [53]
Column: 0 - 53
Updating dashboard: 7
Building widgets map:
Widget: 38
Widget: 40
Widget: 95
Iterating over layout:
Row: 0 - [95]
Column: 0 - 95
Row: 1 - [38]
Column: 0 - 38
Row: 2 - [40]
Column: 0 - 40
Updating dashboard: 11
Building widgets map:
Widget: 71
Widget: 67
Widget: 70
Iterating over layout:
Row: 0 - [67]
Column: 0 - 67
Row: 1 - [70]
Column: 0 - 70
Row: 2 - [71]
Column: 0 - 71
Updating dashboard: 3
Building widgets map:
Widget: 5
Widget: 11
Widget: 13
Widget: 14
Widget: 15
Widget: 16
Widget: 17
Widget: 28
Widget: 51
Widget: 77
Widget: 78
Widget: 80
Iterating over layout:
Row: 0 - [14, 15]
Column: 0 - 14
Column: 1 - 15
Row: 1 - [17, 16]
Column: 0 - 17
Column: 1 - 16
Row: 2 - [11, 13]
Column: 0 - 11
Column: 1 - 13
Row: 3 - [28]
Column: 0 - 28
Row: 4 - [5]
Column: 0 - 5
Row: 5 - [77, 78]
Column: 0 - 77
Column: 1 - 78
Row: 6 - [51, 80]
Column: 0 - 51
Column: 1 - 80
Updating dashboard: 13
Building widgets map:
Widget: 83
Iterating over layout:
Row: 0 - [83]
Column: 0 - 83
Updating dashboard: 14
Building widgets map:
Iterating over layout:
Updating dashboard: 12
Building widgets map:
Iterating over layout:
Row: 0 - [
Column: 0 - [
Row: 1 - ]
Column: 0 - ]
Updating dashboard: 16
Building widgets map:
Widget: 102
Widget: 103
Widget: 104
Widget: 105
Iterating over layout:
Row: 0 - [102, 103]
Column: 0 - 102
Column: 1 - 103
Row: 1 - [104, 105]
Column: 0 - 104
Column: 1 - 105
Updating dashboard: 6
Building widgets map:
Widget: 25
Widget: 26
Widget: 29
Widget: 30
Widget: 33
Widget: 34
Widget: 43
Widget: 45
Widget: 46
Widget: 47
Widget: 48
Widget: 91
Iterating over layout:
Row: 0 - [91, 48]
Column: 0 - 91
Column: 1 - 48
Row: 1 - [47, 45]
Column: 0 - 47
Column: 1 - 45
Row: 2 - [46]
Column: 0 - 46
Row: 3 - [43]
Column: 0 - 43
Row: 4 - [25]
Column: 0 - 25
Row: 5 - [26]
Column: 0 - 26
Row: 6 - [29]
Column: 0 - 29
Row: 7 - [30]
Column: 0 - 30
Row: 8 - [33]
Column: 0 - 33
Row: 9 - [34]
Column: 0 - 34
Updating dashboard: 10
Building widgets map:
Widget: 57
Widget: 59
Widget: 61
Widget: 63
Widget: 65
Widget: 62
Widget: 92
Iterating over layout:
Row: 0 - [92]
Column: 0 - 92
Row: 1 - [62]
Column: 0 - 62
Row: 2 - [57]
Column: 0 - 57
Row: 3 - [63]
Column: 0 - 63
Row: 4 - [59]
Column: 0 - 59
Row: 5 - [65]
Column: 0 - 65
Row: 6 - [61]
Column: 0 - 61
Updating dashboard: 17
Building widgets map:
Widget: 108
Widget: 107
Widget: 109
Widget: 110
Widget: 111
Iterating over layout:
Row: 0 - [108]
Column: 0 - 108
Row: 1 - [109]
Column: 0 - 109
Row: 2 - [107]
Column: 0 - 107
Row: 3 - [110, 111]
Column: 0 - 110
Column: 1 - 111
Updating dashboard: 15
Building widgets map:
Widget: 98
Widget: 99
Widget: 100
Widget: 101
Iterating over layout:
Row: 0 - [99, 100]
Column: 0 - 99
Column: 1 - 100
Row: 1 - [98, 101]
Column: 0 - 98
Column: 1 - 101
Updating dashboard: 18
Building widgets map:
Widget: 112
Widget: 113
Widget: 114
Iterating over layout:
Row: 0 - [112, 113]
Column: 0 - 112
Column: 1 - 113
Row: 1 - [114]
Column: 0 - 114
Updating dashboard: 8
Building widgets map:
Widget: 68
Widget: 85
Widget: 86
Widget: 87
Widget: 88
Widget: 89
Widget: 115
Widget: 116
Iterating over layout:
Row: 0 - [68, 116]
Column: 0 - 68
Column: 1 - 116
Row: 1 - [115]
Column: 0 - 115
Row: 2 - [85]
Column: 0 - 85
Row: 3 - [86, 89]
Column: 0 - 86
Column: 1 - 89
Row: 4 - [87]
Column: 0 - 87
Row: 5 - [88]
Column: 0 - 88
Updating dashboard: 20
Building widgets map:
Iterating over layout:
Updating dashboard: 21
Building widgets map:
Widget: 122
Iterating over layout:
Row: 0 - [122]
Column: 0 - 122
Updating dashboard: 19
Building widgets map:
Widget: 120
Widget: 121
Widget: 124
Widget: 118
Iterating over layout:
Row: 0 - [118]
Column: 0 - 118
Row: 1 - [124]
Column: 0 - 124
Row: 2 - [120]
Column: 0 - 120
Row: 3 - [121]
Column: 0 - 121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment