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

There seems to be no way to disable collector recycling #72

Closed
sandersaares opened this issue Oct 4, 2022 · 5 comments
Closed

There seems to be no way to disable collector recycling #72

sandersaares opened this issue Oct 4, 2022 · 5 comments

Comments

@sandersaares
Copy link

Recycling collectors can apparently crash .NET 6.0 runtime:

I would therefore like to disable recycling. If I understand it right, the recycling is no longer necessary with .NET 6.0 anyway, right? (Based on comments in dotnet/runtime#43985)

However, it seems that there is no option for this! RecycleCollectorsEvery() does not accept a null/zero parameter. I request that this option be added and/or recycling be disabled from 6.0 onwards if it is no longer relevant.

@djluck
Copy link
Owner

djluck commented Oct 5, 2022

Interesting, thanks for the research @sandersaares. If this is the case then yeah, let's go with disabling recycling for .NET 6.0 (from memory this would leave it only enabled for .NET 5.0). I can submit an MR later this week or so.

@djluck
Copy link
Owner

djluck commented Oct 9, 2022

Hey @sandersaares, I just double checked and by default recycling isn't enabled for any runtime (although you can choose to enable it via RecycleCollectorsEvery).

@sandersaares
Copy link
Author

sandersaares commented Oct 14, 2022

It seems to default to 24 hours here for net50:

Am I misreading the code somehow? Seems to match what I observe happening.

@djluck
Copy link
Owner

djluck commented Oct 16, 2022

Apologies, I missed that (it's been a while since I've looked at this code!). I've just published v4.3.0 which targets .net60 and as a result, should see collector recycling only enabled by default for .net50.

@sandersaares
Copy link
Author

Thanks! I confirm this seems to fix it.

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