ChatGPT-API-server icon indicating copy to clipboard operation
ChatGPT-API-server copied to clipboard

Request takes forever

Open marrocksd opened this issue 3 years ago • 6 comments

Hi, Thank you for this project. I've successfully installed agent and server, I passed the "no available client" prompt and all other API errors Anyway, when I send the POST request, it just loads forever. Any ideas, thank! image

marrocksd avatar Dec 28 '22 06:12 marrocksd

This might be an uncaught error on the side of the agent. Open up the console and check there

acheong08 avatar Dec 28 '22 06:12 acheong08

image No more logs, I feel like the Agent didn't receive the signal when I send the request to the Server

marrocksd avatar Dec 28 '22 14:12 marrocksd

I'm seeing the same thing. Post request to /api/ask hangs with no output. I had this working a few days ago, then I updated to the latest version on the main branch and I'm seeing the issue. I am running with docker-compose. I have the same output as @marrocksd in the console on the agent side.

tdwhite0 avatar Dec 28 '22 16:12 tdwhite0

It started working again without me doing anything, seems like it was on the ChatGPT side.

tdwhite0 avatar Dec 28 '22 16:12 tdwhite0

image No more logs, I feel like the Agent didn't receive the signal when I send the request to the Server

Strange that an empty string was sent. There might be something wrong with the websocket connection.

acheong08 avatar Dec 28 '22 16:12 acheong08

It started working again without me doing anything, seems like it was on the ChatGPT side.

Possibly. Their system is notoriously prone to overload.

acheong08 avatar Dec 28 '22 16:12 acheong08

I think I found the issue on my side. it's a case of concurrent access. I'm trying to fix it but need help

acheong08 avatar Dec 29 '22 07:12 acheong08

Check out the https://github.com/ChatGPT-Hackers/ChatGPT-API-server/tree/dev branch

acheong08 avatar Dec 29 '22 07:12 acheong08

@tdwhite0 Same case with you. It just worked again without doing anything

marrocksd avatar Dec 29 '22 09:12 marrocksd

I'll try to explain the error: I locked the Connection pool before querying for the available connections. When a ping fails, it tries to delete the dead connection. However, because it is locked, it freezes the program. This error will therefore only occur when a ping fails. I have just fixed it with https://github.com/ChatGPT-Hackers/ChatGPT-API-server/releases/tag/0.2

acheong08 avatar Dec 29 '22 09:12 acheong08