Open LaurierMantel opened 4 years ago
This is super frustrating https://api.slack.com/docs/rate-limits https://api.slack.com/methods/conversations.info Broadly, you'll encounter limits like these, applied on a "per app per workspace" basis.
The Slack Conversation Info (the one we use to get slack_conversation_reads
is rate limit Tier 3
What this means
This means that at scale, getting conversation reads for (> 5 users per workspace) does not work.
10 users * 20 conversations per user = 100 >> 50
What we can do
I have written a fix to make our stuff slightly more efficient on API calls but for now it's very frustrating.
[Thu Mar 05 19:00:34.642538 2020] [:error] [pid 14100] For user w/ ID: 3, 19 new SlackConversationQuery rows were created
[Thu Mar 05 19:00:35.938531 2020] [:error] [pid 14100] For user w/ ID: 6, 20 new SlackConversationQuery rows were created
[Thu Mar 05 19:00:37.042829 2020] [:error] [pid 14100] For user w/ ID: 1, 11 new SlackConversationQuery rows were created
Further proof: they are cutting us off right at 50 (I removed all of the logs about rate limiting).
I filed a request to Slack, to reduce rate limiting or make the last_read
accessible in conversations_list
(it is accessible in the API call for private channels).
Y'all can't access this but my ticket is here for safekeeping. https://doxahq.slack.com/help/requests/2641239
Have had a lot of updates from Slack about this; basically my boy agrees with me that they API is inconsistent and needs improvement
Issue
tl;dr I was trying to figure out why some Slack read query issues were still happening regardless of fixes yesterday. Slack rate limits our API calls. @kushthaker @Callum-Mitchell
First (checking counts of successful Slack Conversation queries on a per user basis)
Then (looking for when these are
< 5
, as most users are in far more than 5 Slack channels.These show that misses in SlackConversationQuery stuff is kind of random.
I put in a job to record if an error was occurring (the only explanation) And a whole lot of these happened:
Gonna read up on here and figure out workaround: https://api.slack.com/docs/rate-limits