AWSGlueJob并行运行出现“速率超过限制”ThrottlingException状态码:400错误。
创始人
2024-09-25 15:31:14
0

这个错误通常是由于作业并行设置不正确或作业资源不足引起的。为解决此错误,请尝试以下解决步骤:

  1. 调整AWS Glue作业的并行度限制,以减小并行度并减轻对资源的需求。

  2. 增加作业的资源,比如增加作业的计算资源或调整分配给作业的机器学习资源的容量。

  3. 确保作业的代码正确、无误,没有重复的任务或不必要的任务,这些任务会增加CPU的使用率,造成ThrottlingException。

示例代码:

  1. 调整作业并行度——

import boto3

glue = boto3.client("glue")

job_name = "my-glue-job"

Get the current JobRun configuration

response = glue.get_job_run(JobName=job_name, RunId='my-run-id')

Check if the error message is due to throttling

if "Rate exceeded" in response["JobRun"]["ErrorMessage"]:

Reduce the parallelism by setting a lower Maximum Capacity

Value must be between 2 and 100

response = glue.update_job(JobName=job_name, MaxCapacity=50)

Re-run the job

response = glue.start_job_run(JobName=job_name)

  1. 增加作业资源——

import boto3

glue = boto3.client('glue')

job_name = "my-glue-job"

Increase workers count

response = glue.update_job(JobName=job_name, NumberOfWorkers=5)

Increase worker type

response = glue.update_job(JobName=job_name, WorkerType='G.2X')

Increase memory allocation

response = glue.update_job(JobName=job_name, MaxCapacity=2)

Re-run the job

response = glue.start_job_run(JobName=job_name)

  1. 检查代码——

import boto3

glue = boto3.client('glue')

job_name = "my

相关内容

热门资讯

前端-session、jwt 目录:   (1)session (2&#x...
linux入门---制作进度条 了解缓冲区 我们首先来看看下面的操作: 我们首先创建了一个文件并在这个文件里面添加了...
关于测试,我发现了哪些新大陆 关于测试 平常也只是听说过一些关于测试的术语,但并没有使用过测试工具。偶然看到编程老师...
前缀和与对数器与二分法 1. 前缀和 假设有一个数组,我们想大量频繁的去访问L到R这个区间的和,...
nodejs:本地安装nvm实... 一、背景-使用不同版本node的原因 vue3+ts、nuxt3版本,node...
JAVA集合知识整理 Java集合知识整理 HashMap相关 HashMap的底层数据结构:jdk1.8之...
无刷直流电机介绍及单片机控制实... 无刷直流电机介绍及单片机控制实例前言基本概念优势与劣势使用寿命基本结构使用单片机控制实例电子调速器&...
fwdiary(2) dp2 1.传纸条  AcWing 275. 传纸条 - AcWing 走两条路,走一条最大的...
常用的DOS命令 常用的DOS命令 DOS(Disk Operating System,磁...
<C++> 类和对象(下) 1.const成员函数将const修饰的“成员函数”称之为const成员函数,cons...