Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase users.list page size (or make it configurable) #557

Closed
4 of 9 tasks
iancward opened this issue Mar 28, 2019 · 6 comments
Closed
4 of 9 tasks

Increase users.list page size (or make it configurable) #557

iancward opened this issue Mar 28, 2019 · 6 comments
Labels
enhancement M-T: A feature request for new functionality
Milestone

Comments

@iancward
Copy link

Description

Describe your issue here.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Enhancement

When the service fires up, it attempts to retrieve the entire list of users from Slack. In large workspaces, that can take a very long time, often slowing the bot down in the process.

Currently, this code hard-codes the page size limit to 100 (see code); however, the API documentation recommends 200 and the value can be up to 1000.

Please increase the default to 200 and ideally also provide a way to make this configurable to the end-user.

@iancward iancward changed the title Increase User page size (or make it configurable) Increase users.list page size (or make it configurable) Mar 28, 2019
@aoberoi
Copy link
Contributor

aoberoi commented Mar 28, 2019

Hi @iancward,

I see how 100 can quickly exhaust the API limits for a large team. I can't think of a reason for it to be quite that low. So, I'm happy to increase it quite a bit. The only issue with going too large is that the responses may timeout if Slack ends up processing the query too long. I don't think we should go quite up until the limit. How does 800 sound to you?

@iancward
Copy link
Author

Maybe set it to 200 (the recommendation) and make it configurable with an environment variable?

@ahmeduddin1132
Copy link

@aoberoi I have been having the same issue for a while, but however after increasing the PAGESIZE value the bots works for fine for couple days then suddenly go offline for couple of hours that makes our support system completely offline. we have almost around 8K users in slack.

what would be the best value for the PAGESIZE variable. i tried 400, 600, 800 and 1000 as well but encountered same problem.

current config value we are using is 1000

@seratch seratch added the enhancement M-T: A feature request for new functionality label Apr 14, 2020
@seratch
Copy link
Member

seratch commented Apr 14, 2020

If someone is interested in making a pull request on this, I'm happy to review and ship the change in forthcoming releases.

@seratch seratch added this to the 4.10.0 milestone Apr 24, 2020
@kintarowins
Copy link

kintarowins commented Dec 4, 2020

PR to make PAGE_SIZE configurable #612

@seratch
Copy link
Member

seratch commented Jan 27, 2021

Fixed by #612

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality
Projects
None yet
Development

No branches or pull requests

5 participants