temporalio / temporalio/sdk-php

[Bug] Memory leak workflow worker

Open
#635 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
PHP
Stars
421
Forks
64
Avg merge
1d 1h
Merged PRs (30d)
11

Description

What are you really trying to do?

Reload workflow with ui

Describe the bug

if you re-run the workflow via the UI too many times, the workflow worker starts leaking memory. You can end up with a zombie process with this success.
I managed to create a memory leak of a whole 1gb and this is not a redistribution.

video proff: https://youtu.be/LVZEeMcE7rE

Minimal Reproduction

large number of workflow re-strat

Environment/Versions
  • Temporal Version: 1.24.2
  • SDK version: v2.14.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by repeatedly re-running a workflow through the UI with Temporal 1.24.2 and SDK v2.14.1, as described in the report and video. Monitor the workflow worker for increasing memory use and a zombie process; the work is done when repeated restarts no longer produce the leak.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.