Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HIVE_CURSOR_ERROR: Please reduce your request rate

I am running simple query against my s3 bucket with CloudTrail logs. The bucket is big and after around 1 min and 45 seconds I get error

HIVE_CURSOR_ERROR: Please reduce your request rate.

Is there a way to limit request rate against my s3 bucket within Athena?

SELECT *
FROM default.cloudtrail_logs_cloudtraillog
WHERE eventname = 'DeleteUser' AND awsregion = 'us-east-1'
like image 206
Min Avatar asked Jun 22 '26 14:06

Min


2 Answers

So I will summarize solutions suggested by AWS. None of them are great and I wonder why AWS would not throttle on their end and instead throw the error.

By default, S3 will scale automatically to support very high request rates. When your request rate is scaling, S3 automatically partitions your S3 bucket as needed to support higher request rates.However, sometimes it still errors out. So they suggest to wait (do not suggest time frame) to give S3 enough time to auto-partition your bucket based on the request rate it is receiving.

They also suggest:

1) Using S3distcp utility to combine small files into larger objects. https://docs.aws.amazon.com/emr/latest/ReleaseGuide/UsingEMR_s3distcp.html

2) Partitioning https://docs.aws.amazon.com/athena/latest/ug/partitions.html

like image 58
Min Avatar answered Jun 25 '26 07:06

Min


I got the same answer from AWS support. Since I was doing a one-off analysis, I ended up writing a script to copy a small date range worth of logs to a separate bucket and using Athena to analyze the smaller dataset.

like image 21
Alex Avatar answered Jun 25 '26 05:06

Alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!