# Action server is blocking even though I have async run function

**URL:** https://forum.rasa.com/t/action-server-is-blocking-even-though-i-have-async-run-function/56822
**Category:** Rasa Open Source
**Created:** [January 10, 2023, 2:51pm UTC](https://forum.rasa.com/t/action-server-is-blocking-even-though-i-have-async-run-function/56822 "2023-01-10T14:51:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![christos](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@christos](https://forum.rasa.com/u/christos)
#### Post date: [January 10, 2023, 2:51pm UTC](https://forum.rasa.com/t/action-server-is-blocking-even-though-i-have-async-run-function/56822/1 "2023-01-10T14:51:42Z")

</div>

I have a bot which makes a request on an api that is implemented with fastapi(but it is not asynchronous). I want the bot not to be blocked when I call it from action server, as it takes more than 30 seconds the response to come. I have implemented the following code in actions.py but does not work. When I test it in rasa shell, the console is blocked until the response come back. What am I missing

```auto
class ActionTest(Action):

    def name(self) -> Text:
        return "action_test"

    async def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

        async with aiohttp.ClientSession() as session:
            async with session.get("non async api url") as resp:
                response = await resp.json()

        dispatcher.utter_message(text=response["abstract"])

        return []

```

@nik202
