These are chat archives for getredash/redash

19th
Jan 2015
Cory
@clevinson
Jan 19 2015 15:16
hey, can someone explain what the queuing logic is for redash? we have an instance setup (querying redshift). Quite often only two queries will run at a time, yet we have our redshift workload management set so that the "redash" user has a limit of 4 query concurrency
ie. is there a concurrency limit of queries implemented on redashes end? so that only X number of queries can be executing at a time?
Arik Fraimovich
@arikfr
Jan 19 2015 15:17
@clevinson yes, if you used the provided images, they start with only two celery workers for running queries.
Cory
@clevinson
Jan 19 2015 15:18
@arikfr i believe we are using the AMI images if that's what you're referring to. Can you point me to documentation of how to change that?
Arik Fraimovich
@arikfr
Jan 19 2015 15:20
@clevinson you need to edit the supervisord conf file (/opt/redash/supervisord/supervisord.conf) and change line 24. add the option "-c4" to have 4 workers.
@clevinson after that you need to restart the workers, this is done using the command:
sudo supervisorctl restart redash_celery
Arik Fraimovich
@arikfr
Jan 19 2015 15:33
@clevinson let me know if it worked
Cory
@clevinson
Jan 19 2015 16:09
@arikfr yep thanks!
Arik Fraimovich
@arikfr
Jan 19 2015 16:09
@clevinson glad to hear. I will add it to the documentation too later on. feel free to ask any other questions, if you have
Cory
@clevinson
Jan 19 2015 16:12
@arikfr another question- how would i go about retreiving metadata on the Task-ID found at the beginning of each query? ie. 3023309f-6eaa-4def-a929-9d7bbe3a1981
@arikfr i'd love some way to retreive the google account user who triggered the query
Arik Fraimovich
@arikfr
Jan 19 2015 16:14
@clevinson hmm... it's a bit tricky; because re:dash doesn't associate query execution with a single user, as in theory, it's possible that two users will execute the same query and re:dash will run it only once
@clevinson but of course in reality that rarely happens :) I guess it's possible to figure out a way to find it, but as an alternative I can look into adding this information into the comment we add to the query
@clevinson one more thing, there is a table named ActivityLog that stores all query executions. While at the moment you can't correlate it to task-id, you can see the last executions and find it by the query.
@clevinson it's easy to extend it to have the task id too
Arik Fraimovich
@arikfr
Jan 19 2015 16:29
@clevinson let me know if this helpful for you, I will add it to my list.
Cory
@clevinson
Jan 19 2015 16:33
@arikfr cool. how do i get access the ActivityLog table?
digging around hte source.... is there a local postgresql database that stores all the queries? or is this in redis (i'm seeing some redis configuration stuff as well....)?
Cory
@clevinson
Jan 19 2015 16:42
@arikfr nvm. i've found the ActivityLog table. and yes, adding some metadata into the comments would be very helpful for us. Particularly the user who ran it, and the user who wrote it.
Arik Fraimovich
@arikfr
Jan 19 2015 21:00
@clevinson re. activity log, you can add it to the permissions of the redash_reader user, that the "re:dash metadata" data source is using. then you can query it from re:dash:
(from /opt/redash/current:) sudo -u redash psql -c "grant select on activity_log to redash_reader;" redash
@clevinson I will let you know once I add more details there or in the comment.