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

Exception on GetAllFromDatabaseForResource() #51

Open
ondrejdobecka opened this issue May 21, 2018 · 1 comment
Open

Exception on GetAllFromDatabaseForResource() #51

ondrejdobecka opened this issue May 21, 2018 · 1 comment

Comments

@ondrejdobecka
Copy link

Sometimes, when I start asp core 2.1 app, it throws an exception in method GetAllFromDatabaseForResource() in SqlStringLocalizerFactory class.

A second operation started on this context before a previous operation completed. Any instance members are not guaranteed to be thread safe.

Do you have an idea where is problem?
Thank you ;)

@nehio
Copy link
Contributor

nehio commented Jul 25, 2018

Hi, somewhere in your app there must be an await missing, and since the LocalisationContext is Singleton someone isnt waiting it's turn.

Have you tried registering as Transient ? This won't solve the problem per se, but it will limit the chance of it happenning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants