여전히 원인을 확인할 수 없으면 낙오 항목을 보고한 스테이지의 작업자 로그를 확인합니다. 관련 작업자 로그를 보려면 스테이지 진행 상태의 낙오 항목 세부정보를 확인합니다.
그런 다음 작업자의 링크를 클릭합니다. 이 링크는 작업자와 낙오 항목이 감지된 시간 범위로 범위가 지정된 Cloud Logging을 엽니다. 다음과 같이 스테이지 속도를 저하시킬 수 있는 문제를 찾습니다.
DoFn 코드의 버그 또는 중단된 DoFns. 로그에서 낙오 항목이 감지된 타임스탬프 근처의 스택 트레이스를 찾습니다.
완료하는 데 오래 걸리는 외부 서비스에 대한 호출. 이 문제를 완화하려면 외부 서비스에 대한 일괄 호출을 실행하고 RPC에서 제한 시간을 설정합니다.
싱크의 할당량 한도. 파이프라인이 Google Cloud서비스로 출력되는 경우 할당량을 늘릴 수 있습니다. 자세한 내용은 할당량 작업을 참조하세요. 또한 최적화 전략에 대한 특정 서비스 문서 및 I/O 커넥터 문서를 참조하세요.
DoFns: 영구 상태에서 대규모 읽기 또는 쓰기 작업을 수행합니다.
영구 상태에서 소규모 읽기 또는 쓰기를 수행하도록 코드를 리팩터링하는 것이 좋습니다.
또한 부가 정보 패널을 사용하여 스테이지에서 가장 느린 단계를 찾을 수 있습니다. 이러한 단계 중 하나로 인해 낙오 항목이 발생할 수 있습니다. 단계 이름을 클릭하여 해당 단계의 작업자 로그를 봅니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-04-21(UTC)"],[[["\u003cp\u003eStreaming pipeline stragglers are work items that significantly delay watermark advancement and process for a notably longer duration than other items in the same stage, leading to increased job latency.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud console allows viewing of detected streaming stragglers through the stage progress view or the stage workflow view after a Dataflow job has started.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting streaming stragglers involves checking for issues with Dataflow insights, reviewing worker logs for the relevant stage, and investigating potential causes like bugs in \u003ccode\u003eDoFn\u003c/code\u003e code, slow external service calls, quota limits, or large read/write operations on persistent state.\u003c/p\u003e\n"],["\u003cp\u003eThe Side info panel in the console can help identify the slowest steps in a stage, potentially revealing the cause of a straggler, and these steps can be used to find the relevant worker logs for the issue.\u003c/p\u003e\n"],["\u003cp\u003eAfter identifying the root cause of a straggler, you should update your pipeline code to resolve the issue, and then monitor the job's performance for improvement.\u003c/p\u003e\n"]]],[],null,["# Troubleshoot stragglers in streaming jobs\n\nFor streaming pipelines, a *straggler* is defined as a work item with the\nfollowing characteristics:\n\n- It prevents the [watermark](/dataflow/docs/concepts/beam-programming-model#advanced_concepts) from advancing for a significant length of time (on the order of minutes).\n- It processes for a long time relative to other work items in the same stage.\n\nStragglers hold back the watermark and add latency to the job. If the lag is\nacceptable for your use case, then you don't need to take any action. If you\nwant to reduce a job's latency, start by addressing any stragglers.\n| **Note:** For information about troubleshooting stragglers in batch jobs, see [Troubleshoot stragglers in batch\n| jobs](/dataflow/docs/guides/troubleshoot-batch-stragglers).\n\nView streaming stragglers in the Google Cloud console\n-----------------------------------------------------\n\nAfter you start a Dataflow job, you can use the Google Cloud console\nto view any detected stragglers.\n\nYou can view streaming stragglers in the [stage progress\nview](/dataflow/docs/concepts/execution-details#stage_progress_for_streaming_jobs)\nor the [stage workflow\nview](/dataflow/docs/concepts/execution-details#stage_workflow).\n\n### View stragglers by stage progress\n\nTo view stragglers by stage progress:\n\n1. In the Google Cloud console, go to the Dataflow **Jobs**\n page.\n\n [Go to Jobs](https://console.cloud.google.com/dataflow/jobs)\n2. Click the name of the job.\n\n3. In the **Job details** page, click the **Execution details** tab.\n\n4. In the **Graph view** list, select **Stage progress**. The progress graph\n shows aggregated counts of all stragglers detected within each stage.\n\n5. To see details for a stage, hold the pointer over the bar for the stage. The\n details pane includes a link to the worker logs. Clicking this link opens\n Cloud Logging scoped to the worker and the time range when the straggler\n was detected.\n\n### View stragglers by stage workflow\n\nTo view stragglers by stage workflow:\n\n1. In the Google Cloud console, go to the Dataflow **Jobs**\n page.\n\n Go to [Jobs](https://console.cloud.google.com/dataflow/jobs)\n2. Click the name of the job.\n\n3. In the job details page, click the **Execution details** tab.\n\n4. In the **Graph view** list, select **Stage workflow**. The stage workflow\n shows the execution stages of the job, represented as a workflow graph.\n\nTroubleshoot streaming stragglers\n---------------------------------\n\nIf a straggler is detected, it means that an operation in your pipeline has\nbeen running for an unusually long time.\n\nTo troubleshoot the issue, first check whether\n[Dataflow insights](/dataflow/docs/guides/using-dataflow-insights)\npinpoints any issues.\n\nIf you still can't determine the cause, check the worker logs for the stage that\nreported the straggler. To see the relevant worker logs, view the\n[straggler details](#view_stragglers_by_stage_progress) in the stage progress.\nThen click the link for the worker. This link opens Cloud Logging, scoped to\nthe worker and the time range when the straggler was detected. Look for problems\nthat might be slowing down the stage, such as:\n\n- Bugs in `DoFn` code or [stuck `DoFns`](/dataflow/docs/guides/common-errors#processing-stuck). Look for stack traces in the logs, near the timestamp when the straggler was detected.\n- Calls to external services that take a long time to complete. To mitigate this issue, [batch calls to external services](/dataflow/docs/tutorials/ecommerce-java#micro-batch-calls) and set timeouts on RPCs.\n- Quota limits in sinks. If your pipeline outputs to a Google Cloud service, you might be able to raise the quota. For more information, see the [Cloud Quotas documentation](/docs/quotas/overview). Also, consult the documentation for the particular service for optimization strategies, as well as the documentation for the [I/O Connector](https://beam.apache.org/documentation/io/connectors/).\n- `DoFns` that perform large read or write operations on persistent state. Consider refactoring your code to perform smaller reads or writes on persistent state.\n\nYou can also use the\n[**Side info**](/dataflow/docs/concepts/execution-details#stage-info)\npanel to find the slowest steps in the stage. One of these steps might be\ncausing the straggler. Click on the step name to view the worker logs for that\nstep.\n\nAfter you determine the cause,\n[update your pipeline](/dataflow/docs/guides/updating-a-pipeline) with new\ncode and monitor the result.\n\nWhat's next\n-----------\n\n- Learn to use the [Dataflow monitoring interface](/dataflow/docs/guides/using-monitoring-intf).\n- Understand the [**Execution details**](/dataflow/docs/concepts/execution-details) tab in the monitoring interface."]]