You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting "Request Header Fields Too Large" when query exceeds 11000 characters.
driver: presto-jdbc-338-e.3.jar - io.prestosql.jdbc.PrestoDriver
Caused by: java.lang.RuntimeException:
returned an invalid response: JsonResponse{statusCode=400, statusMessage=Bad Request, headers=
{connection=[close], content-length=[198], content-type=[text/html], date=[Mon, 01 Feb 2021 20:15:52 GMT], server=[awselb/2.0]}
, hasValue=false} [Error:
<title>400 Request Header Or Cookie Too Large</title>
Similar exception reported here: prestodb/presto#13097
We tried recommended solution by adding 'http-server.max-request-header-size=5MB' in config.properties with no effect.
The text was updated successfully, but these errors were encountered:
mirafranc
added a commit
to mirafranc/jaydebeapi
that referenced
this issue
Feb 5, 2021
After deeper investigation of DBeaver (works without issue), Spark and JayDeBeApi there are two ways how to execute SQL statement by JDBC:
As prepared statement (used by Spark and JayDeBeApi ):
statement = connection.prepareStatement(sql)
statement.executeQuery()
As statement (used by DBeaver):
connection.createStatement()
statement.executeQuery(sql)
switching to create statement works correctly for Presto (Trino).
tested locally using DBs based on drivers:
presto-jdbc-338.jar
ojdbc6-11.2.0.4.jar
ojdbc7-12.1.0.2.jar
ojdbc14-8.1.7.1.jar
ojdbc14-10.2.0.5.jar
pijdbcdriver-2019.0.0.jar
ngdbc-2.4.59.jar
sqljdbc4-2.0.jar
terajdbc.16.20.00.12.jar
Issue is caused by wrong driver implementation of prepareStatement in Presto (Trino), anyway DBeaver query approach would be alternative way.
Getting "Request Header Fields Too Large" when query exceeds 11000 characters.
driver: presto-jdbc-338-e.3.jar - io.prestosql.jdbc.PrestoDriver
Caused by: java.lang.RuntimeException:
<title>400 Request Header Or Cookie Too Large</title>returned an invalid response: JsonResponse{statusCode=400, statusMessage=Bad Request, headers=
{connection=[close], content-length=[198], content-type=[text/html], date=[Mon, 01 Feb 2021 20:15:52 GMT], server=[awselb/2.0]}
, hasValue=false} [Error:
Similar exception reported here: prestodb/presto#13097
We tried recommended solution by adding 'http-server.max-request-header-size=5MB' in config.properties with no effect.
The text was updated successfully, but these errors were encountered: