KenyonY/openai-forward

http error: connection closed before message completed

Yunlongs opened this issue · 1 comments

Hi,
when i am using your openai api forward as service, i found it frequently reported http error like that:

http error: error sending request for url (http://xxx/v1/chat/completions): connection closed before message 
completed

Caused by:
   0: error sending request for url (http://xxx/v1/chat/completions): connection closed before message completed
   1: connection closed before message completed

I found a sultion for this issue in: https://help.mulesoft.com/s/article/Getting-Error-sending-HTTP-request-when-sending-request-using-http-requester

This error indicates that the request has been successfully sent from the Mule Application, but the http response timeout occurred before the http response is received from the called service. By default, the http response timeout will inherit it's value from defaultResponseTimeout under global settings which is 10 Seconds, thus it will timeout if the service provider doesn't serve the request and send the response back to the client in 10 seconds.

Can you fix that issue? Thanks.

Hello @yunlong ,
it seems that the issue is caused by some network reasons or timeout settings. The default timeout for openai-forward is 600 seconds, and I have never encountered this issue before. I am not familiar with the Mulesoft platform. Based on the information you provided, it seems that you need to modify the corresponding configuration to increase the default timeout.