Open themattkenney opened 3 years ago
/cc @jtkech
It might be an issue in ShellDescriptorManager
. But ideally YesSql should have thrown an ArgumentException if the inputs were not valid. That would help.
Update: We were able to figure out why we got the System.NullReferenceException. The issue was in the appsetting.json file, we removed all the unused tenants from our site but missed one tenant. This caused the 500 error when a bot called the site, we removed this tenant, and now no System.NullReferenceException.
@sebastienros if we wanted to block the error from crashing the app pool where would we start?
I think you want to wait on @jtkech answer on that one 😄
@themattkenney would be awesome to have just a little more details, to be able to repro. Like what to remove if we have two running tenants to get to this issue.
I'd guess removing the tenant folder or simply the SQLite database while keeping the tenant config could potentially cause this issue? If not, then maybe the tenant that contains all the other tenants!
@themattkenney
Maybe in GetShellDescriptorAsync()
, add a try catch block around
_shellDescriptor = await _session.Query<ShellDescriptor>().FirstOrDefaultAsync();
So that it returns a null _shellDescriptor
and then fallback to a MinimumShellDescriptor
, but without failing.
Let us know if it fixes your issue
We will give this a try! Thank you
Can you share the result @themattkenney?
On one of our Tenants, that is running SQL Lite we had a System.NullReferenceException causing the whole App Pool to lockup requiring an app pool restart.
We are looking into what caused the issue however I would expect an error on one tenant to not lockup the app pool.
Issue Details from app insights:![image](https://user-images.githubusercontent.com/31166005/95535008-ee2ec700-09ac-11eb-8e38-8e35f27e82d0.png)
Call Stack: