-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] Cosmos is Extremely Slow Due to Excessive URL Querying #380
Comments
Relavent Log Output 2025/01/13 17:21:54 [ERROR] HTTP Request returned Error 504 : Gateway Timeout : There WERE way more URLs but I tried to see if I could solve the issue by deleting almost all of them and the issue still persists. |
|
I've not seen that the favicon fetching is multithreaded because when the logs start showing that Cosmos is timing out when querying either docker containers or favicons, Cosmos is stuck loading until all that querying is done. Which sometimes will take so long that I end up restarting Cosmos. When it finally stops querying, Cosmos finally loads the requested webpage. I don't know what to do then because I'm pretty positive this is what's causing the speed issue. Also I have quite a few apps that use the Cosmos reverse proxy and they also go slow because of Cosmos doing what I just explained earlier. |
What happened?
Running Cosmos 17.5
I've been watching the Cosmos logs for weeks now. What I've been able to gather is that it uses a cron job to periodically query for docker container IP addresses, if the URL is a SERVAPP url and also trying to fetch the favicon of the docker container. I have about 50 URLS. I don't run 50 docker containers at the same time but maybe like 15. Cosmos will try to fetch the favicon and the docker container IP of all 50 URLs but it takes forever because every docker container or website that is not currently up, I have to wait for it to time out on getting the docker container IP address, and wait for it to time out on fetching the favicon. Which is causing an insane amount of overhead and slows down my entire server.
I'm making a suggestion to remove the cron job or scheduled event that is always querying for the docker container IP and favicon and make it optional for to fetch the favicon. For example, have a "Fetch favicon" button and once you click it, then try to fetch the favicon. At least then you can choose what docker containers you want to query. But all the upstream querying and waiting for timeouts, is causing Cosmos and my entire server to go extremely slow. Restarting Cosmos always fixes that issue but it just happens again. This is the only issue I'm having with Cosmos, otherwise I love this app. But this speed issue is almost making me decide to go with something else.
What should have happened?
Not to query docker containers or only query docker containers and favicons of containers that are actually running.
How to reproduce the bug?
Configure 5+ URLs and once Cosmos starts trying to query for the docker container and or favicon, if the docker container is not running, it will timeout.
Relevant log output
No response
Other details
No response
System details
The text was updated successfully, but these errors were encountered: