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

require cache update, concurrent problem #188

Open
honibis opened this issue Dec 6, 2023 · 2 comments
Open

require cache update, concurrent problem #188

honibis opened this issue Dec 6, 2023 · 2 comments

Comments

@honibis
Copy link

honibis commented Dec 6, 2023

File watcher causes unexpected terminations for my case, not suitable for production, instead cleaning the require cache seems like a solid option. But when using with concurrent processes, only the process i clean require cache is updated. Is there a way to run a script on all processes that will clean require cache.

@JeremyTCD
Copy link
Member

There is no way to to clear the require caches.

File watcher causes unexpected terminations for my case

Do you have logs for this?

@MariusGertdenken
Copy link

MariusGertdenken commented May 3, 2024

If anyone else comes across the problem, reflections can be used to find out the node js processes:

var httpNodeJsServices = (ReadOnlyCollection<HttpNodeJSService>)_nodeJsService.GetType()
                    .GetField("_httpNodeJSServices", BindingFlags.Instance | BindingFlags.NonPublic)
                    .GetValue(_nodeJsService);
foreach (var httpNodeJsService in httpNodeJsServices)
{
    await httpNodeJsService.MoveToNewProcessAsync();
}

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

3 participants