# Problem timeout webhook fb messanger

**URL:** <https://forum.rasa.com/t/problem-timeout-webhook-fb-messanger/31838>\
**Category:** Rasa Open Source\
**Created:** [July 26, 2020, 2:39pm UTC](https://forum.rasa.com/t/problem-timeout-webhook-fb-messanger/31838 "2020-07-26T14:39:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wassimgt](https://avatars.discourse-cdn.com/v4/letter/w/439d5e/32.png) [@wassimgt](https://forum.rasa.com/u/wassimgt)\
**Post date:** [July 26, 2020, 2:39pm UTC](https://forum.rasa.com/t/problem-timeout-webhook-fb-messanger/31838/1 "2020-07-26T14:39:11Z")

</div>

Hi, My custom action takes a long time in the response because I have a great deal of treatment in it. The problem that the Fb messenger webhook sends a post every 20 seconds until the custom action sends the response. This problem will do this :

 ![Capture 1](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/8/84393787eea542c6447a298dc943f1b72c465de4.png)

doc fb messanger webhook

 ![Capture fb](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/1/113d7de4e50000830eee126253ac3fedf0d8b82f.png)can you help me ?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 28, 2020, 8:27am UTC](https://forum.rasa.com/t/problem-timeout-webhook-fb-messanger/31838/2 "2020-07-28T08:27:48Z")

</div>

Hey @wassimgt, this is an interesting problem! I urge you to think about the user experience… how does it feel to have a conversation with a bot that you ask something and it takes multiple minutes to respond, without being able to ask it anything in the meantime?

What I would recommend in this case is actually having your custom action trigger an external service that processes the information which sends an [External Event](https://rasa.com/docs/rasa/core/reminders-and-external-events/#external-events) when it is done. This will allow the user to continue the conversation while they’re waiting for their results, and will also avoid this facebook issue.

---

<div class="post-metadata">

**Author:** ![wassimgt](https://avatars.discourse-cdn.com/v4/letter/w/439d5e/32.png) [@wassimgt](https://forum.rasa.com/u/wassimgt)\
**Post date:** [July 28, 2020, 9:33pm UTC](https://forum.rasa.com/t/problem-timeout-webhook-fb-messanger/31838/3 "2020-07-28T21:33:55Z")

</div>

@erohmensing my chatbot is for **stock market investors** , the chatbot will ask questions about the stock market and in the custom action, I have to make a prediction on the next 30 day of market action price … this custom action will take a long time to respond to the user. my problem is in the Facebook webhook every 20s send a post

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 29, 2020, 8:20am UTC](https://forum.rasa.com/t/problem-timeout-webhook-fb-messanger/31838/4 "2020-07-29T08:20:10Z")

</div>

Yes, so what I recommended with external events sounds like a good solution then. When the user asks for it, the bot can trigger the calcuation and respond with something like “let me calculate that for you. this might take a few minutes…” and then send the information through an external event when it’s ready.
