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

Dianoga causes thread pool threads to wait #133

Open
manutdkid77 opened this issue Feb 20, 2024 · 0 comments
Open

Dianoga causes thread pool threads to wait #133

manutdkid77 opened this issue Feb 20, 2024 · 0 comments

Comments

@manutdkid77
Copy link

Version of Dianoga

6.1.0

Environment description

Sitecore XM 10.2.1 (rev. 009392 PRE)

What configs you have enabled

Default

Reproducible steps (1... 2... 3...) that cause the issue

We noticed that the CPU would hit 100% sometimes and cause app pool restarts. So we collected a dump of the w3wp process when this scenario occurred and analysed it in Visual Studio 2022.

This analysis showed us a warning:

Analysis summary
1 thread pool threads are waiting on a synchronous call to 'System.Threading.WaitHandle.WaitOne(int, bool)' from method
'Dianoga.Optimizers.CommandLineToolOptimizer.ExecuteProcess(string).
Potential fix
Do not synchronously wait on Monitors, Events, Tasks, or any other objects that may block your thread. See if you can update the method to be asynchronous by, for example, using asynchronous file or database access. Frameworks such as ASP.NET MVC now support asynchronous controllers for operations that may take a long time.

sc_dianoga_cpudump

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

1 participant