mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #1073] HTTP 413: JSON body too large #751
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#751
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davidfrickert on GitHub (Mar 27, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1073
🐞 Describe the bug
It seems that the JSON method to send notifications to ntfy has a body size limit. Did not find any documentation on what this size is and if it's possible to increase.
💻 Components impacted
ntfy server
💡 Screenshots and/or logs
2024/03/27 17:22:35 INFO Connection closed with HTTP 413 (ntfy error 41303) (error=JSON body too large, error_code=41303, http_method=POST, http_path=/, http_status=413, tag=http, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:10.42.0.229, visitor_ip=10.42.0.229, visitor_messages=14, visitor_messages_limit=17280, visitor_messages_remaining=17266, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=60, visitor_seen=2024-03-27T17:22:35.243Z)
🔮 Additional context
Trying to get Grafana to send notifications to ntfy and sometimes Grafana will try to merge multiple related warnings in one notification, which becomes quite big. It seems that ntfy rejects these requests due to the payload size being too big.
@wunter8 commented on GitHub (Mar 27, 2024):
By default, the message size limit is 4 KiB. If you're sending a JSON body and use the new templating system, the body can be 32 KiB, so long as the resulting message after applying the templating is <= 4 KiB
@wunter8 commented on GitHub (Mar 27, 2024):
If you're self-hosting, the message size limit is configurable: https://docs.ntfy.sh/config/#message-limits
But see the warning!
@davidfrickert commented on GitHub (Mar 27, 2024):
@wunter8 thanks! Will test it out as I am indeed self-hosting.