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

[BUG] Response payload size exceeded maximum allowed payload size with connector athena-udfs #1884

Open
cvargas-xbrein opened this issue Apr 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cvargas-xbrein
Copy link

cvargas-xbrein commented Apr 1, 2024

In my case i faced with a limit in the responce of LAMBDA UDF , in sql code that invoke the udf , the udf is a java version for a create a spatial buffer in mt and return a poligon in text , the problem start when invoke over 10000 rows in a table on athena , because for less works fine! 😵‍💫

This udf work really well month ago , but suddenly it started to stop working, investigating, I tried to delete it and deploy it again but the error continues.

By other hand i check responce for validate string lenght is less than 6 mb , and its be ok in all cases for get the buffer in on row.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://catalog.us-east-1.prod.workshops.aws/workshops/9981f1a1-abdc-49b5-8387-cb01d238bb78/en-US/50-udf

Expected behavior
This is the actual sql for invoke the udf lambda


USING EXTERNAL FUNCTION xbuffer(col_1 VARCHAR, col_2 DOUBLE) RETURNS VARCHAR LAMBDA 'udf'
SELECT 0 as geo_id,
	vb.id,
	vb.block_id,
	xbuffer(vb.centroid_wkt, 5000.0) AS buffer_mts   -- if change the parameter work fine too
FROM prod_countries.country_cl_view_blocks vb 
-- OFFSET 40000 
limit 12000; --for less work perfectly but over 10k go to hell

ERROR:

GENERIC_USER_ERROR: Encountered an exception[Function.ResponseSizeTooLarge] from your LambdaFunction[udf] executed in context[calling UDF method xbuffer] with message[Response payload size exceeded maximum allowed payload size (6291556 bytes).]
This query ran against the "prod_countries" database, unless qualified by the query. Please post the error message on our [forum ](https://forums.aws.amazon.com/forum.jspa?forumID=242&start=0) or contact [customer support ](https://us-east-1.console.aws.amazon.com/support/home?#/case/create?issueType=technical&serviceCode=amazon-athena&categoryCode=query-related-issue) with Query Id: 763150fe-8903-44a8-b8bb-6884d876d64a

In lambda log i found this errors, but no showing a especific line of the error :

START RequestId: 2059762c-47cb-4a84-a30b-fb893236c50c Version: $LATEST
[ERROR] [1711989279225] LAMBDA_RUNTIME Failed to post handler success response. Http response code: 413.
Failed to post invocation response. Response code: '413'.: lambdainternal.runtimeapi.LambdaRuntimeClientException
lambdainternal.runtimeapi.LambdaRuntimeClientException: Failed to post invocation response. Response code: '413'.

Exception in thread "main" java.lang.Error: lambdainternal.runtimeapi.LambdaRuntimeClientException: http://127.0.0.1:9001/2018-06-01/runtime/invocation/2059762c-47cb-4a84-a30b-fb893236c50c/error Response code: '403'.
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:209)
at lambdainternal.AWSLambda.main(AWSLambda.java:196)
Caused by: lambdainternal.runtimeapi.LambdaRuntimeClientException: http://127.0.0.1:9001/2018-06-01/runtime/invocation/2059762c-47cb-4a84-a30b-fb893236c50c/error Response code: '403'.
at lambdainternal.runtimeapi.LambdaRuntimeClient.assertResponseCode(LambdaRuntimeClient.java:82)
at lambdainternal.runtimeapi.LambdaRuntimeClient.postInvocationError(LambdaRuntimeClient.java:62)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:288)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:207)
... 1 more
RequestId: 2059762c-47cb-4a84-a30b-fb893236c50c Error: Runtime exited with error: exit status 1
Runtime.ExitError
END RequestId: 2059762c-47cb-4a84-a30b-fb893236c50c

This may be related to : #764

@cvargas-xbrein cvargas-xbrein added the bug Something isn't working label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant