Closed msmart closed 2 years ago
Sounds like a multi-threading issue (also because you mentioned "heavy load"):
SmartFormatter
instance in each thread. You can't use Smart.Format(...)
overloadsIf this is not the case,, please provide your settings and the code snippet where you use the SmartFormatter
.
Thanks for this hint! We didnt have SmartSettings.IsThreadSafeMode = true. We'll do some local load testing with this approach and deploy to prod again after confirmation that we can reproduce the error and resolve it with this locally. I'll close this ticket for now and re-open if we are not able to fix it with this approach. Thanks again!
Smart.Format version: 3.0 Framework version: net6.0
Please provide a working source code example to reproduce the bug Non reproducible. Happens under load(?).
What is the current result? We have been using SmartFormat 2.7 for a while in production without encountering any errors (Thank you for the project!). We migrated to SmartFormat 3.0 and deployed to production a couple of days ago. All tests passed. QA was also good. However, after a couple of days we encountered formatting errors and saw a lot of error log messages (See below). The errors are non-reproducible. Our systems are under relatively high load and we suspect it might be related to this.
What is the expected result? / Please post full exception details if applicable (message, stacktrace, inner exceptions) I've pasted an excerpt from our logs below. We dont observe any other errors. Memory seems to be ok, CPU relatively high and response times elevated during the time the errors occur. The system is able to recover once load is lower. The errors disappear and everything works as expected.
Did you find a workaround? Is there a version in which it worked? yes, downgrading to SmartFormat 2.7 resolved this behavior as far as we know now.
Can you help us by writing an unit test? Not sure how to re-produce this yet.
I am aware that this is not a helpful bug report. But any pointers on how to debug/resolve this and identify the root cause would be greatly appreciated.