Whenever my Mistral LLM from Ollama takes too much time for a response I receive an error executing my custom action: action_give_llm_answer. Responses from the LLM with less than 1 minute and around 30 seconds work fine:
I am using: Rasa Version : 3.6.21 Rasa SDK Version : 3.6.2 Python Version : 3.9.11
2025-07-08 13:20:08 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘action_give_llm_answer’. 2025-07-08 13:21:22 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘50114’. 2025-07-08 13:21:22 ERROR rasa.core.channels.rest - [error ] rest.message.received.timeout
In my endpoints.yml I tried to increase the time for a timeout:
action_endpoint: url: “http://localhost:5055/webhook” timeout: 350
I use Websocket between my ollama on port: 11434 and my .NET at my localhost:9000
@app.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
try:
# Client (.NET)
prompt_data = await websocket.receive_text()
print(f"\n🟢 Prompt vom Client: {prompt_data}")
ollama_url = "http://localhost:11434/api/generate"
payload = {
"model": "mistral",
"prompt": prompt_data,
"stream": True
}
try:
response = requests.post(
ollama_url,
json=payload,
stream=True,
timeout=350
)
In .NET program.cs I increased timeout time for the RasaService for http request to 5 minutes
builder.Services.AddHttpClient<IRasaService, RasaService>(client => { client.Timeout = TimeSpan.FromMinutes(5); });