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

Too rapid polling/querying #389

Closed
KrzysztofMadejski opened this issue Dec 10, 2018 · 3 comments
Closed

Too rapid polling/querying #389

KrzysztofMadejski opened this issue Dec 10, 2018 · 3 comments

Comments

@KrzysztofMadejski
Copy link

Why slackin is querying slack (I guess that is what happens) so often? Each 300-800ms? Each 5 mins would be totally enough. Isn't there any flag to configure it to happen less often?

Mon Dec 10 2018 13:58:43 GMT+0000 (Coordinated Universal Time) – online 36, total 572 (+797ms)
Mon Dec 10 2018 13:58:48 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:58:48 GMT+0000 (Coordinated Universal Time) – online 36, total 572 (+342ms)
Mon Dec 10 2018 13:58:53 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:58:54 GMT+0000 (Coordinated Universal Time) – online 36, total 572 (+824ms)
Mon Dec 10 2018 13:58:59 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:00 GMT+0000 (Coordinated Universal Time) – online 36, total 572 (+803ms)
Mon Dec 10 2018 13:59:05 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:06 GMT+0000 (Coordinated Universal Time) – online 35, total 572 (+817ms)
Mon Dec 10 2018 13:59:11 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:11 GMT+0000 (Coordinated Universal Time) – online 35, total 572 (+786ms)
Mon Dec 10 2018 13:59:16 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:17 GMT+0000 (Coordinated Universal Time) – online 36, total 572 (+702ms)
Mon Dec 10 2018 13:59:22 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:23 GMT+0000 (Coordinated Universal Time) – online 36, total 572 (+680ms)
Mon Dec 10 2018 13:59:28 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:29 GMT+0000 (Coordinated Universal Time) – online 35, total 572 (+854ms)
Mon Dec 10 2018 13:59:34 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:35 GMT+0000 (Coordinated Universal Time) – online 35, total 572 (+836ms)
Mon Dec 10 2018 13:59:40 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:40 GMT+0000 (Coordinated Universal Time) – online 35, total 572 (+859ms)
Mon Dec 10 2018 13:59:45 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:46 GMT+0000 (Coordinated Universal Time) – online 35, total 572 (+329ms)
Mon Dec 10 2018 13:59:51 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:52 GMT+0000 (Coordinated Universal Time) – online 35, total 572 (+808ms)
Mon Dec 10 2018 13:59:57 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 13:59:57 GMT+0000 (Coordinated Universal Time) – online 35, total 572 (+812ms)
Mon Dec 10 2018 14:00:02 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 14:00:03 GMT+0000 (Coordinated Universal Time) – online 36, total 572 (+371ms)
Mon Dec 10 2018 14:00:08 GMT+0000 (Coordinated Universal Time) – fetching
Mon Dec 10 2018 14:00:08 GMT+0000 (Coordinated Universal Time) – Error: Too Many Requests
    at Request.callback (/srv/slackin/node_modules/superagent/lib/node/index.js:686:11)
    at /srv/slackin/node_modules/superagent/lib/node/index.js:868:18
    at IncomingMessage.<anonymous> (/srv/slackin/node_modules/superagent/lib/node/parsers/json.js:16:7)
    at IncomingMessage.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1107:12)
    at process.internalTickCallback (internal/process/next_tick.js:72:19)
@sntxrr
Copy link

sntxrr commented Feb 24, 2019

@KrzysztofMadejski if you pass in --interval 300000 you can slow down how often it checks. See https://github.com/rauchg/slackin/blob/master/bin/slackin#L11

@KrzysztofMadejski
Copy link
Author

Perfect! Thanks @sntxrr !

@loleg
Copy link

loleg commented Apr 17, 2020

Setting the SLACK_INTERVAL environment variable to 300000 also solved the issue for me. It's a good workaround until #303 is merged, and might be good to add to the default vars if it persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants