-
Notifications
You must be signed in to change notification settings - Fork 3
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
IdleShutdownTask Feedback (OSOE-625) #57
Comments
Thank you for these tips, JT! I think this might actually be a memory leak we're seeing. |
Noted your comments and I soon will be addressing this aswell. |
Yes this is what we discussed on Skipe, but I don't see how releasing shells could be a source of leaks (knowing that the GC doesn't behave the same in dev/debug mode), unless if something else was wrong, for example releasing all shells by caling |
@jtkech Hi JT! Good to have you here aswell :) I added the |
Addressed in #50. |
Because I had a chat with @Psichorex about the
IdleShutdownTask
I took a look at the codeHosting-Tenants/Lombiq.Hosting.Tenants.IdleTenantManagement/Services/IdleShutdownTask.cs
Lines 58 to 59 in 9dd7732
When we release a tenant on inactivity we don't want to signal it to other instances in a distributed env (e.g. if
OC.Tenants.Distributed
andOC.RedisCache
are enabled), this because we have released the tenant on inactivity, not because it has changed. To do so you need to set to false theeventSource
parameter.Hosting-Tenants/Lombiq.Hosting.Tenants.IdleTenantManagement/Services/IdleShutdownTask.cs
Lines 61 to 68 in 9dd7732
No need to call
SaveSettingsAsync()
as it is done byUpdateShellSettingsAsync()
, then as I understood we could have just callReloadShellContextAsync()
, but normally I think we don't need this (see below).Hosting-Tenants/Lombiq.Hosting.Tenants.IdleTenantManagement/Services/IdleShutdownTask.cs
Lines 35 to 54 in 9dd7732
ReleaseShellContextAsync()
just releases the shell and remove the context and settings from the related shell host dictionaries, this without any database accesses, so normally it should not fail.So normally all the above code could be replaced by only one line.
Jira issue
The text was updated successfully, but these errors were encountered: