Skip to content

server: do not log certain endpoints (avoid log spam)#19028

Merged
ngxson merged 1 commit intoggml-org:masterfrom
ngxson:xsn/server_less_spam_log
Jan 22, 2026
Merged

server: do not log certain endpoints (avoid log spam)#19028
ngxson merged 1 commit intoggml-org:masterfrom
ngxson:xsn/server_less_spam_log

Conversation

@ngxson
Copy link
Copy Markdown
Contributor

@ngxson ngxson commented Jan 22, 2026

Avoid spamming the log with requests on /health or /models API

@ngxson ngxson requested a review from ggerganov as a code owner January 22, 2026 15:49
@ngxson ngxson requested a review from CISC January 22, 2026 15:49
Copy link
Copy Markdown
Member

@CISC CISC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to at least add a SRV_DBG so you can see the requests being made when debug is enabled?

@ngxson
Copy link
Copy Markdown
Contributor Author

ngxson commented Jan 22, 2026

In my experience, I haven't found any occasions where I find these lines (and the request logging in general) helpful. Mostly because this function only log a request when it's already finished.

Probably I will remove this or refactor into something more useful (i.e. log before the request is processed)

@ngxson ngxson merged commit 4e595b2 into ggml-org:master Jan 22, 2026
73 of 78 checks passed
ronaldmannak pushed a commit to PicoMLX/llama.cpp that referenced this pull request Jan 24, 2026
ronaldmannak pushed a commit to PicoMLX/llama.cpp that referenced this pull request Jan 24, 2026
shaofeiqi pushed a commit to qualcomm/llama.cpp that referenced this pull request Feb 6, 2026
@aviallon
Copy link
Copy Markdown
Contributor

aviallon commented Feb 9, 2026

@ngxson How about the /metrics endpoint? I don't find it useful to log either.

Comment on lines +32 to +37
if (req.path == "/health"
|| req.path == "/v1/health"
|| req.path == "/models"
|| req.path == "/v1/models"
|| req.path == "/props"
|| req.path == "/metrics"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aviallon should be skipped too, but I think we will get rid of this logic soon

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, I saw you work a lot on the HTTP code recently.
By chance, did you fix the /health requests starvation when the server is overloaded?

Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants