HI There ,
When I invoke deepseek/openai api. if the message is "hi" or short message , it will feedback the reply correctly. but if I send more words ,for examples 1000 words (it will take long time), it will show error below ( same message I use postman , it will be fine.):
Error Executing Test. The underlying connection was closed: An unexpected error occurred on a receive.
Thanks in advance , if you could help.
Jack
Hi @Jack Bao ,
Can you please give us more details on how you integrated this api ? You're using O11 or ODC?
Also please take a look at this post: Tip: The underlying connection was closed: An unexpected error occurred on a receive | OutSystems .
Hi Jack, Which one are you on, ODC or O11? Try increasing the timeout of your application. You can find this setting in your application properties in Studio. However, ODC allows up to 60 seconds. In O11, there is no hard ceiling.
If you're on ODC and still going over that 60s cap, move the call into a Timer or Workflow instead, so it runs outside the request timeout, and have the UI poll for the result.
Check the length of the text attribute, where you are storing the response.
It is probably still set to 50 characters. Just increase it and it should work
This looks like a timeout issue in OutSystems, especially since the same request works in Postman.
Try increasing the REST API request timeout and test with smaller inputs first.
If small prompts work but larger ones fail, the request is likely taking longer than the OutSystems timeout allows.
I noticed that several replies in this thread are repeating essentially the same suggestion about increasing the timeout. While that can be relevant, repeating the same recommendation without additional context doesn't really help move the discussion forward.
Also, @Mihai Melencu comment is a good example of adding value by asking for the missing details and pointing to a relevant troubleshooting resource.
It's a timeout, not a real error — long prompts take longer, and OutSystems cuts the connection before the API responds. Short ones finish before that limit, so they work.
Fix: Go to the REST method → Properties → increase the Timeout value (e.g., 30000 → 120000 ms).