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

[Bug] GC not running #1

Open
MeguminSama opened this issue Mar 30, 2024 · 2 comments
Open

[Bug] GC not running #1

MeguminSama opened this issue Mar 30, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MeguminSama
Copy link
Contributor

MeguminSama commented Mar 30, 2024

For some reason, GC isn't happening after each scrape, causing the RAM usage to continually grow.

I've added a temp fix in 40d9c52 to manually GC the application, but I need to properly figure out what's going on.

edit: forcing GC with the above commit didn't fix the issue.

Notes:
https://bun.sh/docs/project/benchmarking

@MeguminSama MeguminSama added bug Something isn't working help wanted Extra attention is needed labels Mar 30, 2024
@MeguminSama
Copy link
Contributor Author

Looks like this issue may be related to oven-sh/bun#5659

the result of oxc.parseSync(this.script) doesn't get GC'd, even if the value isn't used.

Possible workaround could be to run this in a worker, so that the worker gets killed after parsing.

@MeguminSama
Copy link
Contributor Author

This should be fixed, pending testing.

I've made it use child processes (workers still didn't free memory). When the child process is terminated, the memory is freed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant