Forum Discussion
Facing 429 Error Now A Days
Hi,
I am trying to integrate Hubot with MS Teams and done with that stuff by following some useful links that are available.I have built an application using hubot framework and was uploaded into a channel previously a few months ago and worked at that moment.So I have uploaded the same into some other channel recently and facing an error as mentioned below:
ERROR Error: POST to 'https://smba.trafficmanager.net/amer/v3/conversations/19%3A6e011df0be3a4eb7934018bcf460370f%40thread.skype%3Bmessageid%3D1578941378382/activities/1578941378382' failed: [429] "
at Request._callback (/opt/hip_bot/node_modules/botbuilder/lib/bots/ChatConnector.js:675:46)
at Request.self.callback (/opt/hip_bot/node_modules/request/request.js:185:22)
at Request.emit (events.js:210:5)
at Request.<anonymous> (/opt/hip_bot/node_modules/request/request.js:1161:10)
at Request.emit (events.js:210:5)
at IncomingMessage.<anonymous> (/opt/hip_bot/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:299:28)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1184:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
In the recent days when I am trying to run the same app it is throwing the above mentioned error and as per my guess form the last line of the error it is found to be an 429 Error (Too Many Requests) and could anyone please help me on sorting this issue.
Thanks,
Acharya
AcharyaTejaswi963 , We found the bot is throttling the rate limit for teams channel which is 7 (max allowed operations) within 1 sec. Please take a look at per bot thread limit.
- Trinetra-MSFTMicrosoft
AcharyaTejaswi963 , Could you please send me the logs of request/messages sent before the 429 error occurs?
- AcharyaTejaswi963Copper Contributor
Thanks for your response.Please find the below logs:
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO @User indurthy, acharya tejaswi requested dialog incident creation
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO Channel/Message ID is: 19:6e011df0be3a4eb7934018bcf460370f@thread.skype;messageid=1579176143832
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO User room: 19:6e011df0be3a4eb7934018bcf460370f@thread.skypeName passed: indurthy, acharya tejaswi
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: send
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: reply
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-middleware: creating middleware...
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-msteams: Restricting tenants to [\"60ae5b28-c69f-4658-85bf-98ac6db337fa\"]
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-msteams: toSendable
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: send
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: reply
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-middleware: creating middleware...
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-msteams: Restricting tenants to [\"60ae5b28-c69f-4658-85bf-98ac6db337fa\"]
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-msteams: toSendable
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: send
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: reply
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-middleware: creating middleware...
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-msteams: Restricting tenants to [\"60ae5b28-c69f-4658-85bf-98ac6db337fa\"]
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-msteams: toSendable
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: send
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: reply
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-middleware: creating middleware...
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-msteams: Restricting tenants to [\"60ae5b28-c69f-4658-85bf-98ac6db337fa\"]
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] INFO hubot-msteams: toSendableAfter this I am getting the following error as I have mentioned in the previous message:
[Thu Jan 16 2020 12:02:24 GMT+0000 (Coordinated Universal Time)] ERROR Error: POST to 'https://smba.trafficmanager.net/amer/v3/conversations/19%3A6e011df0be3a4eb7934018bcf460370f%40thread.skype%3Bmessageid%3D1579176143832/activities/1579176143832' failed: [429]
at Request._callback (/opt/hip_bot/node_modules/botbuilder/lib/bots/ChatConnector.js:675:46)
at Request.self.callback (/opt/hip_bot/node_modules/request/request.js:185:22)
at Request.emit (events.js:210:5)
at Request.<anonymous> (/opt/hip_bot/node_modules/request/request.js:1161:10)
at Request.emit (events.js:210:5)
at IncomingMessage.<anonymous> (/opt/hip_bot/node_modules/request/request.js:1083:12)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1184:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[Thu Jan 16 2020 12:05:05 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: onBotEvents
[Thu Jan 16 2020 12:05:05 GMT+0000 (Coordinated Universal Time)] INFO hubot-botframework-adapter: Handling activity Channel: msteams; type: messageAs per the my requirement the functionality what I intended to do is working fine within my local environment.But facing the error that I have mentioned in the previous message when trying to run within the ms teams.
I have shared screenshots of the sequence of question & answers that are working in my local environment.Please find the attached images and let me know if you need any further info from my end.
- Trinetra-MSFTMicrosoft
AcharyaTejaswi963 , Thanks for the logs but it is very hard to read, Could you please send us the logs in a file so we can investigate it further.