Hi everyone! I am using Flink 1.16 that deployed b...
# troubleshooting
t
Hi everyone! I am using Flink 1.16 that deployed by Flink-Operator inside Kubernetes cluster. All flink clusters using the Minio storage solution for storing savepoint, checkpoint. When flink cluster goes to the production env, we face with the issue
Copy code
2023-12-07 10:13:42,529 INFO  org.apache.hadoop.fs.s3a.WriteOperationHelper                [] - initiate MultiPartUpload on l2m-flink-55461-f1ecdf831e40-ac1e3eb8668f/checkpoints/0000000058a07ff20000000000000000/chk-195/_metadata: Retried 14: org.apache.hadoop.fs.s3a.AWSServiceThrottledException: initiate MultiPartUpload on l2m-flink-55461-f1ecdf831e40-ac1e3eb8668f/checkpoints/0000000058a07ff20000000000000000/chk-195/_metadata: com.amazonaws.services.s3.model.AmazonS3Exception: Resource requested is unreadable, please reduce your request rate (Service: Amazon S3; Status Code: 503; Error Code: SlowDown; Request ID: 179E85123A2AEDE9; S3 Extended Request ID: 1448ed5d-4190-4059-be26-2ca9c6520ace; Proxy: null), S3 Extended Request ID: 1448ed5d-4190-4059-be26-2ca9c6520ace:SlowDown: Resource requested is unreadable, please reduce your request rate (Service: Amazon S3; Status Code: 503; Error Code: SlowDown; Request ID: 179E85123A2AEDE9; S3 Extended Request ID: 1448ed5d-4190-4059-be26-2ca9c6520ace; Proxy: null)
That error make the Flink stuck in creating checkpoint state and restart. Do we have some configuration to decrease that error or I need to do it from the Minio? Thanks for your time reading my question!
p
Based on this document, it seems retrying will fix this issue. S3 will automatically scale up. Could you share the complete stack trace to check if this is just a warning or a failure?
t
Copy code
2023-12-07 10:13:42,529 INFO  org.apache.hadoop.fs.s3a.WriteOperationHelper                [] - initiate MultiPartUpload on l2m-flink-55461-f1ecdf831e40-ac1e3eb8668f/checkpoints/0000000058a07ff20000000000000000/chk-195/_metadata: Retried 14: org.apache.hadoop.fs.s3a.AWSServiceThrottledException: initiate MultiPartUpload on l2m-flink-55461-f1ecdf831e40-ac1e3eb8668f/checkpoints/0000000058a07ff20000000000000000/chk-195/_metadata: com.amazonaws.services.s3.model.AmazonS3Exception: Resource requested is unreadable, please reduce your request rate (Service: Amazon S3; Status Code: 503; Error Code: SlowDown; Request ID: 179E85123A2AEDE9; S3 Extended Request ID: 1448ed5d-4190-4059-be26-2ca9c6520ace; Proxy: null), S3 Extended Request ID: 1448ed5d-4190-4059-be26-2ca9c6520ace:SlowDown: Resource requested is unreadable, please reduce your request rate (Service: Amazon S3; Status Code: 503; Error Code: SlowDown; Request ID: 179E85123A2AEDE9; S3 Extended Request ID: 1448ed5d-4190-4059-be26-2ca9c6520ace; Proxy: null)
Here is the whole log content It's just a INFO log
m
You shouldn’t use the Hadoop implementation for checkpointing
Like is documented; use the Presto implementation
t
Thanks for your comment! But, I don't know that error come from the Hadoop library or it's come from the Minio Storage solution
Maybe we could do something from the Minio side
m
org.apache.hadoop.fs.s3a
is from the Hadoop multipart writer that the Flink Hadoop S3 implementation uses
The Presto S3 implementation is the recommended file system for checkpointing to S3.
t
Do we have any configuration to increase the limit from
apache.hadoop.fs.s3a.WriteOperationHelper
?
m
If it’s something that Hadoop exposes as a config option, then yes. Else, no. But again; you’re trying the wrong approach
t
I am trying to find another solution because Flink cluster is already run in Production Env. Changing from hadoop to presto approach may cause some issues
m
Well you’re dealing with production issues now too 🙈
t
😄 Do you think it's will break the checkpoint when we upgrading from hadoop to presto plugin?
m
No S3 implementations don’t leak into checkpoints
t
Copy code
flinkConfiguration:
    execution.checkpointing.interval: 60s
    execution.checkpointing.unaligned: "true"
    high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
    high-availability.storageDir: s3://flink/ha
    kubernetes.jobmanager.node-selector: flink:"true"
    kubernetes.jobmanager.tolerations: key:flink,operator:Equal,value:"true",effect:NoSchedule
    kubernetes.taskmanager.node-selector: flink:"true"
    kubernetes.taskmanager.tolerations: key:flink,operator:Equal,value:"true",effect:NoSchedule
    metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
    metrics.reporter.prom.port: "9999"
    metrics.reporters: prom
    s3.access-key: CbiEqBrWlLZtGiP4
    s3.endpoint: http://minio:9000
    s3.path.style.access: "true"
    s3.secret-key: 
    state.backend: filesystem
    state.checkpoints.dir: s3://flink/checkpoints
    state.savepoints.dir: s3://flink/savepoints
    taskmanager.memory.jvm-metaspace.size: 128mb
    taskmanager.memory.managed.size: 16mb
    taskmanager.memory.segment-size: 1mb
    taskmanager.numberOfTaskSlots: "1"
Here is my config
I think I will change the config into this
Copy code
flinkConfiguration:
    execution.checkpointing.interval: 60s
    execution.checkpointing.unaligned: "true"
    s3.entropy.key: _entropy_
    s3.entropy.length: "4"
    state.savepoints.dir: s3p://flink/savepoints
    state.checkpoints.dir: s3p://flink/_entropy_/checkpoints
    high-availability.storageDir: s3p://flink/ha
    high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
    kubernetes.jobmanager.node-selector: flink:"true"
    kubernetes.jobmanager.tolerations: key:flink,operator:Equal,value:"true",effect:NoSchedule
    kubernetes.taskmanager.node-selector: flink:"true"
    kubernetes.taskmanager.tolerations: key:flink,operator:Equal,value:"true",effect:NoSchedule
    metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
    metrics.reporter.prom.port: "9999"
    metrics.reporters: prom
    s3.access-key: CbiEqBrWlLZtGiP4
    s3.endpoint: http://minio:9000
    s3.path.style.access: "true"
    s3.secret-key: 
    state.backend: filesystem
    taskmanager.memory.jvm-metaspace.size: 128mb
    taskmanager.memory.managed.size: 16mb
    taskmanager.memory.segment-size: 1mb
    taskmanager.numberOfTaskSlots: "1"
r
Hi, were you able to replace
_entropy_
string with a random one in S3?