# Performance error

**URL:** <https://forum.rasa.com/t/performance-error/66862>\
**Category:** Getting Started with Rasa\
**Created:** [April 23, 2025, 11:15am UTC](https://forum.rasa.com/t/performance-error/66862 "2025-04-23T11:15:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![guhua](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@guhua](https://forum.rasa.com/u/guhua)\
**Post date:** [April 23, 2025, 11:15am UTC](https://forum.rasa.com/t/performance-error/66862/1 "2025-04-23T11:15:35Z")

</div>

if i send request to action server by postman only 3ms，but in rasa run , the same request need 400ms

---

<div class="post-metadata">

**Author:** ![m\_ashurkina](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/m_ashurkina/32/25068_2.png) [@m\_ashurkina](https://forum.rasa.com/u/m_ashurkina)\
**Post date:** [April 23, 2025, 4:22pm UTC](https://forum.rasa.com/t/performance-error/66862/2 "2025-04-23T16:22:16Z")

</div>

Hi @guhua, thank you for your message. Could you please share some more context? Are you using Rasa Pro?

---

<div class="post-metadata">

**Author:** ![guhua](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@guhua](https://forum.rasa.com/u/guhua)\
**Post date:** [April 24, 2025, 3:02am UTC](https://forum.rasa.com/t/performance-error/66862/3 "2025-04-24T03:02:13Z")

</div>

this is source code，it create session every time with 2s，  
async with self.session() as session: async with session.request( method, url, headers=headers, params=self.combine\_parameters(kwargs), compress=compress, ssl=sslcontext, \*\*kwargs, ) as response:

but instead with this, start\_at = time.time() response = await self.httpx\_client.request( method, url, headers=headers, params=self.combine\_parameters(kwargs), \*\*kwargs) logger.debug(f"httpx time: {time.time()} cost: {time.time() - start\_at}") return response.json() only cost 20ms

---

<div class="post-metadata">

**Author:** ![m\_ashurkina](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/m_ashurkina/32/25068_2.png) [@m\_ashurkina](https://forum.rasa.com/u/m_ashurkina)\
**Post date:** [April 24, 2025, 8:37am UTC](https://forum.rasa.com/t/performance-error/66862/4 "2025-04-24T08:37:50Z")

</div>

Hi @guhua, thank you for your response. A couple of questions to understand your issue: is the latency too great when rasa pro server calls the action server? How was this calculated?

One way to improve latency is to use direct custom action or gRPC instead of HTTP when launching the action server, you find docs here: [Rasa Action Server gRPC API | Rasa Documentation](https://rasa.com/docs/reference/integrations/action-server/action-server-grpc-api/)

---

<div class="post-metadata">

**Author:** ![guhua](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@guhua](https://forum.rasa.com/u/guhua)\
**Post date:** [April 24, 2025, 12:11pm UTC](https://forum.rasa.com/t/performance-error/66862/5 "2025-04-24T12:11:34Z")

</div>

hi，nothing in action server, just mocker data, i print the cost time

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/4/3/43181208f03d53058666ddfb49282a1852e4a504.png)
