Memory Leak Suspected in Effect-TS with runFork and Effect.runtime() Usage

Hello!,

Our company uses the Effect-TS library as the backbone for our internal backend framework.

In our application, we use Merged Layers, and for some handlers (domain event, integration events, service bus) we use runFork with Effect.runtime(). During execution, we've observed a significant increase in memory usage, which leads us to suspect a memory leak.

We're suspecting the Scheduler.ts in combination with the multiple run forks. The memory stacks seem to be in the recursive call on starveInternal and starve function.

Do we have any known issues with the runFork and Effect.runtime() combination? can you provide some guidance on the best practices for using runFork with Effect.runtime()?

We're willing to sponsor the bug fix if needed =).

Here's an example of our usage pattern:
Screenshot_2024-07-24_at_12.10.09.png
Was this page helpful?