HetuEngine执行长SQL错误报“Request Header Fields Too Large”错误的解决方法
现象:
在向HetuEngine提交某些长sql在提交任务时报“Request Header Fields Too Large”
java.sql.SQLException: Error executing query
at io.prestosql.jdbc.PrestoStatement.internalExecute(PrestoStatement.java:274)
at io.prestosql.jdbc.PrestoStatement.execute(PrestoStatement.java:227)
at io.prestosql.jdbc.PrestoPreparedStatement.executeQuery(PrestoPreparedStatement.java:111)
at com.huawei.presto.JDBCExample.main(JDBCExample.java:119)
Caused by: java.lang.RuntimeException: Error starting query at https://10.68.193.235:29898/v1/statement returned an invalid response: JsonResponse{statusCode=431, statusMessage=Request Header Fields Too Large, headers={connection=[close], content-length=[74], content-type=[text/html;charset=iso-8859-1]}, hasValue=false} [Error: <h1>Bad Message 431</h1><pre>reason: Request Header Fields Too Large</pre>]
at io.prestosql.jdbc.internal.client.StatementClient.requestFailedException(StatementClient.java:91)
at io.prestosql.jdbc.internal.client.StatementClientV1.<init>(StatementClientV1.java:108)
at io.prestosql.jdbc.internal.client.StatementClientFactory.newStatementClient(StatementClientFactory.java:24)
at io.prestosql.jdbc.QueryExecutor.startQuery(QueryExecutor.java:46)
at io.prestosql.jdbc.PrestoConnection.startQuery(PrestoConnection.java:700)
at io.prestosql.jdbc.PrestoStatement.internalExecute(PrestoStatement.java:239)
... 3 more
原因:
HetuEngine默认配置的消息头(http-server.max-request-header-size)最大为8KB,超出这个大小会报错
解决方法:
将http-server.max-request-header-size和http-server.max-response-header-size 大小值设置为5MB
在coordinator.config.customized.configs 和 中添加自定义参数:
http-server.max-request-header-size = 5MB
http-server.max-response-header-size = 5MB
然后重启HetuEngine服务和HetuEngine计算集群即可
- 点赞
- 收藏
- 关注作者
评论(0)