[GH-ISSUE #1722] [BUG]: 504 Gateway Time-out #1128

Closed
opened 2026-02-22 18:23:14 -05:00 by yindo · 2 comments
Owner

Originally created by @cyberlink1 on GitHub (Jun 19, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1722

How are you running AnythingLLM?

Docker (local)

What happened?

AnythingLLM is running in my docker swarm, Im using Ollama on a seperate server that has 8 cores/16 threads, 32g of ram and 2x GTX1660's.

When I do a chat api call through api/docs, the system responds with

`<html>

504 Gateway Time-out


The server didn't respond in time.

</html>`

about 60% of the time.

Through the anythingllm interface I always get a response though it can take up to 45 seconds to respond.

Are there known steps to reproduce?

No response

Originally created by @cyberlink1 on GitHub (Jun 19, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1722 ### How are you running AnythingLLM? Docker (local) ### What happened? AnythingLLM is running in my docker swarm, Im using Ollama on a seperate server that has 8 cores/16 threads, 32g of ram and 2x GTX1660's. When I do a chat api call through api/docs, the system responds with `<html><body><h1>504 Gateway Time-out</h1> The server didn't respond in time. </body></html>` about 60% of the time. Through the anythingllm interface I always get a response though it can take up to 45 seconds to respond. ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:23:14 -05:00
yindo closed this issue 2026-02-22 18:23:14 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jun 19, 2024):

We dont run a webserver/proxy in AnythingLLM by default so this is a configuration with whatever webserver is running your swarm - which looks like nginx and would be outside of scope for this repo.

I would check that layer of your stack as that is where the error is coming from. All request should be proxy-passed to the :3001 URL of the docker container.

@timothycarambat commented on GitHub (Jun 19, 2024): We dont run a webserver/proxy in AnythingLLM by default so this is a configuration with whatever webserver is running your swarm - which looks like nginx and would be outside of scope for this repo. I would check that layer of your stack as that is where the error is coming from. All request should be proxy-passed to the <Ipaddress>:3001 URL of the docker container.
Author
Owner

@cyberlink1 commented on GitHub (Jun 19, 2024):

@timothycarambat Thank you for the reply. I had completely forgotten that I have haproxy offloading SSL. You were correct, that was the problem.

@cyberlink1 commented on GitHub (Jun 19, 2024): @timothycarambat Thank you for the reply. I had completely forgotten that I have haproxy offloading SSL. You were correct, that was the problem.
yindo changed title from [BUG]: 504 Gateway Time-out to [GH-ISSUE #1722] [BUG]: 504 Gateway Time-out 2026-06-05 14:39:06 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1128