Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak while running in Docker with xvfb #7

Open
romanzipp opened this issue Nov 3, 2023 · 2 comments
Open

Memory leak while running in Docker with xvfb #7

romanzipp opened this issue Nov 3, 2023 · 2 comments

Comments

@romanzipp
Copy link

I'm running PixiJS node in a Docker container, based on the example Dockerfile via xvfb.

My app provides a HTTP endpoint which simply generates an image. After every request I'm unloading all assets from the Asset & Cache manager.

Might not be the prettiest way but it works.

Assets.unload(
    Array.from(
        Assets.cache._cacheMap.keys(),
    ),
);

I also tried calling the destroy() method on all generated display objects.

The pixi app instance also gets re-used and won't be destroyed between requests.

When running the app locally on macOS the memory usage stays constant - no matter how many requests I throw at it. Running it in the Docker container results in the memory footprint growing constantly with every request. Looking at the process monitor indicates that this is an issue with node - not xvfb.

This issue is also not caused due to dev/prod builds, both ways lead to a memory leak.

I'll try sharing a sample app - but until then I'll try my best here if anyone has advice on this.

@iqbaljunaid
Copy link

@iqbaljunaid
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants