Skip to content

bug: truncation of body response using http_logger plugin #12134

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

Open
edda25 opened this issue Apr 10, 2025 · 1 comment
Open

bug: truncation of body response using http_logger plugin #12134

edda25 opened this issue Apr 10, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@edda25
Copy link

edda25 commented Apr 10, 2025

Current Behavior

We’re currently using http_logger plugin on routes in Apisix. The aim is to capture and forward HTTP responses to a mirroring service, thus the attribute include_resp_body is set to true. However, we’ve encountered an issue where response bodies are being truncated at ca. 500KB. Some of the responses we deal with can have order of magnitude of MBs, and having the complete body is crucial for our use case. We didn't find any reference in the documentation about this limitation.

To summarize:

  • Response bodies larger than 500KB are being cut off.
  • We need the full response body in order to mirror server responses accurately.

Questions:

  • Where is this 500KB threshold defined? Is this a limitation of Nginx or is it an internal setting of http_logger?
  • Is there a way to configure this threshold and increase the maximum captured body size?

We’d appreciate any guidance on how to lift or modify this limit. Thanks in advance!

Expected Behavior

No truncation of body responses.

Error Logs

No response

Steps to Reproduce

  1. Configure http_logger
  2. Send requests to the route with response size bigger than 500K
  3. Monitor http_logger destination

Environment

  • APISIX version (run apisix version): 3.10
  • Operating system (run uname -a): Linux
  • OpenResty / Nginx version (run openresty -V or nginx -V): openresty/1.25.3.2
@dosubot dosubot bot added the bug Something isn't working label Apr 10, 2025
@edda25
Copy link
Author

edda25 commented Apr 15, 2025

This issue is currently blocking us in production, and we really need to overcome it as soon as possible.
Is there maybe any workaround or change in the NGINX configuration that could help? It seems to us that this limitation in size is independent of the http_logger configuration and resides somewhere else.

Any update or hint would be greatly appreciated. Thanks in advance for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant