You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We experience a serious bug when application pool recycles for a .net6 Blazor server-side application hosted on windows Azure app service. We have a Mapster mapping between client side ViewModel and DomainModel.
Symptom: Collection items from the ViewModel are duplicated in the DomainModel
Leadup: Application is running fine, then an app pool recycle occurs (triggered by a new deployment, Azure infractructure etc.). Some customers then experience that for every save, which is where the VM->DM mapping occurs, the items in collections in the DomainModel is duplicated.
We have not been able to reproduce the bug in the test environment, only in production. It seems like it may be that only users actively working in the system when the recycle happens are affected by the bug, but we cannot say with 100% certainty.
The error never happens if we stop, then start the app.
What actually happens with the SignalR connections (circuits) when a new app pool is started while the old one is still running? How might that affect the code that is running and what should we look for in the code? We have identified one possible issue with global static non-thread-safe state where the mapping configuration is initialized, which might be an issue because a lot of connections are started in the new app pool simultaneously. Other than that we don't really know what to look for at this stage.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
https://stackoverflow.com/questions/78061302/application-pool-recycle-cause-bug-with-duplication-of-collection-items-blazor
We experience a serious bug when application pool recycles for a .net6 Blazor server-side application hosted on windows Azure app service. We have a Mapster mapping between client side ViewModel and DomainModel.
Symptom: Collection items from the ViewModel are duplicated in the DomainModel
Leadup: Application is running fine, then an app pool recycle occurs (triggered by a new deployment, Azure infractructure etc.). Some customers then experience that for every save, which is where the VM->DM mapping occurs, the items in collections in the DomainModel is duplicated.
We have not been able to reproduce the bug in the test environment, only in production. It seems like it may be that only users actively working in the system when the recycle happens are affected by the bug, but we cannot say with 100% certainty.
The error never happens if we stop, then start the app.
What actually happens with the SignalR connections (circuits) when a new app pool is started while the old one is still running? How might that affect the code that is running and what should we look for in the code? We have identified one possible issue with global static non-thread-safe state where the mapping configuration is initialized, which might be an issue because a lot of connections are started in the new app pool simultaneously. Other than that we don't really know what to look for at this stage.
Beta Was this translation helpful? Give feedback.
All reactions