sdk-php: [Bug] Memory leak: Got the response to undefined request 9009 - autoclosed

Describe the bug

"worker_exec: SoftJobError:\n\tsync_worker_exec_payload: LogicException: Got the response to undefined request 9002 in /src/vendor/temporal/sdk/src/Internal/Transport/Client.php:57\nStack trace:\n#0 /src/vendor/temporal/sdk/src/WorkerFactory.php(389): Temporal\Internal\Transport\Client->dispatch(Object(Temporal\Worker\Transport\Command\SuccessResponse))\n#1

Looks like there is still a memory leak.

Minimal Reproduction

Hard to find potencial issue, because it was discovered on production for couple days without redeployment. I am using almost all options available from SDK starting from SubWorkflows across to Search attributes.

My configuration

.rr.yaml

temporal:
    address: ${TEMPORAL_CLI_ADDRESS}
    namespace: ${TEMPORAL_NAMESPACE}
    cache_size: 100
    activities:
        allocate_timeout: 3600s
        num_workers: 9
        supervisor:
            max_worker_memory: 164

It’s scaled horizontally 10 times by default.

I don’t know how I can help you to find issue.

Environment/Versions

  • OS and processor: Linux
  • Temporal Version: 1.18.1
  • SDK - 2.3.2
  • AWS

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 46 (21 by maintainers)

Most upvoted comments

Hello! Could you try to use PHP SDK 2.6.0 (dev) with RoadRunner 2023.3.0-beta?

We have tested it on a lot of parallel workflows and signals with the cache_size option set to 1. PHP SDK 2.6.0 with RoadRunner 2023.3.0-beta shows a perfect result. No any “Got the response to undefined request” errors!

More details about PHP SDK 2.6.0 (dev) are there: https://discord.com/channels/538114875570913290/824234752692977664/1142176919786360894 https://temporalio.slack.com/archives/C01LK9FAMM0/p1692386951356089

To install SDK 2.6.0 dev and RoadRunner 2023.3.0-beta:

composer require temporal/sdk ~2.6.0@dev -W
vendor/bin/rr get --stability=beta

To be finally fixed in 2.7 realase.

Sorry, but I am not able to test it now. I will try to do this with other project.