-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Description
Related Code
- https://github.com/airlift/airlift/blob/master/http-client/src/main/java/io/airlift/http/client/HttpClientConfig.java#L76
- https://github.com/trinodb/trino-gateway/blob/main/gateway-ha/src/main/java/io/trino/gateway/proxyserver/ProxyResponseHandler.java
If result from Trino is large, larger than default 16mb, a buffering capacity error would occur by the http client.
A hard limit was imposed for logging, but this does not solve the issue.
Suggested Solution
- Increase proxy.http-client.max-content-length beyond your largest expected response. Ensure heap sizing matches.
Pro. Simple http client option to use.
Con. Gateway uses great amount of memory.
- Re-enable compression (keep/forward Accept-Encoding: gzip) to reduce payloads.
Add Gzip(or custom) format when making request.
https://github.com/trinodb/trino-gateway/blob/main/gateway-ha/src/main/java/io/trino/gateway/proxyserver/ProxyRequestHandler.java#L168-L176
- Change the proxy to stream responses instead of buffering, so large result sets don’t need to fit in memory.
@oneonestar Wdyt? On the long run, option 3 sounds best but I think option 2 is also needed.
Metadata
Metadata
Assignees
Labels
No labels