Closed cameronmr closed 4 years ago
@cameronmr There's nothing about Lamar in your stacktrace there. Lamar isn't building your controllers. I'd say to check your IoC setup and how you're applying a ControllerActivator.
No recent activity, and I don't think this is Lamar related.
I have the same issue. The stack trace is:
at System.Collections.Generic.List`1.Add(T item)
at Lamar.IoC.Scope.TryAddDisposable(Object object)
at (Closure`3 , Scope )
at Lamar.IoC.Scope.GetInstance[T]()
My thoughts is that Lamar creates a new instace of an object during "GetInstance" call and add it to "Disposables" List. And this operation isn't thread-safe.
Got actual details finally. This should be easy.
I am in the process of porting our Structuremap applications across to Lamar and having issues related to ControllerActivation in our WebAPI 2 applications. We are using the follow Service Activator that is registered during startup:
I am relying on the Auto Resolution of Concrete types to find the Controller types at runtime.
This pattern seems to work fine but then starts failing after a short period of time with the following stack trace:
This usually occurs within 15mins or less of very limited traffic and will never recover
Questions:
Cheers Cameron