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

How to avoid hitting PREPARE limit while using DESCRIBE OUTPUT query? #24625

Open
vspinu opened this issue Jan 3, 2025 · 0 comments
Open

How to avoid hitting PREPARE limit while using DESCRIBE OUTPUT query? #24625

vspinu opened this issue Jan 3, 2025 · 0 comments

Comments

@vspinu
Copy link

vspinu commented Jan 3, 2025

Problem Statement

For moderately complex PREPARE queries I am seeingtrino.exceptions.Http502Error: error 502: bad gateway:

This is how the query is run as part of the ibis project:

            cur.execute(f"PREPARE {name} FROM {query}")
            try:
                cur.execute(f"DESCRIBE OUTPUT {name}")
                info = cur.fetchall()
            finally:
                cur.execute(f"DEALLOCATE PREPARE {name}")

Searching for similar issues on trino and trino-client side it turns out that it's a known problem caused by the header size limit of 4KB

  • server issues (1, 2) suggests a partial solution by altering the http-server limits:
http-server.max-request-header-size=64kB
http-server.max-response-header-size=64kB

I cannot find an option to configure the header size on the client side. (In fact I don't know if this is the problem caused by the limit on the client or server side)

Question

What is the current recommended solution for this problem (ideally on the client side). Particularly, is there a way to execute DESCRIBE OUTPUT immediately without going through the PREPARE step?

Thanks!

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

1 participant