Skip to content
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

Error 431 Request Header Fields Too Large after adding trino gateway #571

Open
lozbrown opened this issue Dec 13, 2024 · 4 comments
Open

Comments

@lozbrown
Copy link

lozbrown commented Dec 13, 2024

After implementing Trino Gateway and putting it between trino and clients users are seeing rejects with 431,

Caused by: java.sql.SQLException: Error executing query: Error starting query at https://trino-prd.someplace/v1/statement returned an invalid response: JsonResponse{statusCode=431, headers={cache-control=[must-revalidate,no-cache,no-store], content-length=[2057], content-type=[text/html;charset=iso-8859-1], date=[Fri, 13 Dec 2024 14:12:30 GMT]}, hasValue=false} [Error: \n\n<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>\n<title>Error 431 Request Header Fields Too Large</title>\n\n\n

HTTP ERROR 431 Request Header Fields Too Large

\n\n\n\n\n
URI:/v1/statement
STATUS:431
MESSAGE:Request Header Fields Too Large
\n

trino version 453
JDBC driver 439

Any ideas what could be causing this?

@prakhar10
Copy link
Member

prakhar10 commented Dec 14, 2024

Adding proxy.http-client.request-buffer-size in the serverConfig seems to have helped in my setup.

I've noticed this for large queries in PREPARE statements only.

@lozbrown
Copy link
Author

lozbrown commented Dec 14, 2024

Adding proxy.http-client.request-buffer-size in the serverConfig seems to have helped in my setup.

I've noticed this for large queries in PREPARE statements only.

Thanks @prakhar10 , what value did you set it to, I'm not sure what it defaults to.

@prakhar10
Copy link
Member

Adding proxy.http-client.request-buffer-size in the serverConfig seems to have helped in my setup.

I've noticed this for large queries in PREPARE statements only.

Thanks @prakhar10 , what value did you set it to, I'm not sure what it defaults to.

I've set it to 20mb.

@lozbrown
Copy link
Author

lozbrown commented Dec 16, 2024

Unfortunately this does not seem to have resolved the issue.

I'm wondering if i need to make a similar change in trino itself but that has not changed since this was released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants