12-03-2021, 09:39 AM
Dear Alexandre,
Thank you for your response. We will try to speed up conversion to IW15 in Delphi 11. I will check also Http.sys, that I though was just in IW17, but good to know is in 15 too.
So, even we have proxy server above those IW services (we have 3 now), we will continue to use windows service, like you suggested.
About issue: So, limit of 340 active sessions, even some are dormant, is relative in time, because our server become busy at noon and evening.
As bandage, I move now, almost all access from server controller to user session (was some parameters loaded from a config file); what remains is just a write in exception log method, accessed thru critical section. I will check also other methods used, even is in user sessions, maybe is not thread safe. Also I limit the session timeout to 30 min (was 2 hours; been an application model, users want to keep it open all day) and seems to help a little bit, getting less limit, but is just a bandage, not a solution.
As detail also, maybe is relevant, I use just few forms, login recover password and main form, all detail, edit forms are in fact frames, derived from TFrame) used with TIWModalWindow.
Question: Do you recommend any stress test tool for IW?
As suggestion, maybe, you can make in Autozed examples, a model of best practice with setup of server controller. That been mentioned I will show you my setup, that maybe you can comment and tell me if is incomplete or too much.
Self.BoundIP := config read bound IP
self.Port := config read port number
self.RestartExpiredSession := True;
self.AllowMultipleSessionsPerUser := false;
TIWSecurityOptionsAccess(Self.SecurityOptions).mCheckSameIP := False;
TIWSecurityOptionsAccess(Self.SecurityOptions).mCheckSameUA := true;
TIWSecurityOptionsAccess(Self.SecurityOptions).CheckFormId := true;
SecurityOptions.ShowSecurityErrorDetails := False;
{CookieOptions }
CookieOptions.SessionCookies := false;
CookieOptions.HttpOnly := true; // we use Proxy
CookieOptions.UseCookies := True;
Self.SessionTimeout := Config get 'SessionTimeout'
Self.FilesDir := Self.ContentPath + Config get 'SharedFilesDir'
Self.InternalFilesDir := Self.ContentPath + Config get 'SharedFilesDir'
self.JavaScriptOptions.AjaxErrorMode := emNone;
self.LogCommandEnabled := true;
self.LogSessionEvents := false;///used ony in test
{exception logger}
self.ExceptionLogger.RegisterIgnoreException(EConvertError);
self.ExceptionLogger.RegisterIgnoreException(EUnknownBrowserException); {Unknown browser type}
self.ExceptionLogger.RegisterIgnoreException(EInvalidSession); {Invalid session}
self.ExceptionLogger.RegisterIgnoreException(EExpiredSession); {Expired session}
self.ExceptionLogger.RegisterIgnoreException(EIWNoSessionId); {No session ID}
self.ExceptionLogger.LogType := ltFile; // ltEventLog;
self.ExceptionLogger.FilePath := Self.ContentPath + 'Exceptions\';
self.ExceptionLogger.FileName := 'Exceptions.log';
self.ExceptionLogger.PurgeAfterDays := 1;
self.ExceptionLogger.Enabled := True;
{cache path }
CacheDir := Self.ContentPath + 'Cache\';
Like I said, I want user to use only one session, been an application mode.
Thank you again for your help and support!
Thank you for your response. We will try to speed up conversion to IW15 in Delphi 11. I will check also Http.sys, that I though was just in IW17, but good to know is in 15 too.
So, even we have proxy server above those IW services (we have 3 now), we will continue to use windows service, like you suggested.
About issue: So, limit of 340 active sessions, even some are dormant, is relative in time, because our server become busy at noon and evening.
As bandage, I move now, almost all access from server controller to user session (was some parameters loaded from a config file); what remains is just a write in exception log method, accessed thru critical section. I will check also other methods used, even is in user sessions, maybe is not thread safe. Also I limit the session timeout to 30 min (was 2 hours; been an application model, users want to keep it open all day) and seems to help a little bit, getting less limit, but is just a bandage, not a solution.
As detail also, maybe is relevant, I use just few forms, login recover password and main form, all detail, edit forms are in fact frames, derived from TFrame) used with TIWModalWindow.
Question: Do you recommend any stress test tool for IW?
As suggestion, maybe, you can make in Autozed examples, a model of best practice with setup of server controller. That been mentioned I will show you my setup, that maybe you can comment and tell me if is incomplete or too much.
Self.BoundIP := config read bound IP
self.Port := config read port number
self.RestartExpiredSession := True;
self.AllowMultipleSessionsPerUser := false;
TIWSecurityOptionsAccess(Self.SecurityOptions).mCheckSameIP := False;
TIWSecurityOptionsAccess(Self.SecurityOptions).mCheckSameUA := true;
TIWSecurityOptionsAccess(Self.SecurityOptions).CheckFormId := true;
SecurityOptions.ShowSecurityErrorDetails := False;
{CookieOptions }
CookieOptions.SessionCookies := false;
CookieOptions.HttpOnly := true; // we use Proxy
CookieOptions.UseCookies := True;
Self.SessionTimeout := Config get 'SessionTimeout'
Self.FilesDir := Self.ContentPath + Config get 'SharedFilesDir'
Self.InternalFilesDir := Self.ContentPath + Config get 'SharedFilesDir'
self.JavaScriptOptions.AjaxErrorMode := emNone;
self.LogCommandEnabled := true;
self.LogSessionEvents := false;///used ony in test
{exception logger}
self.ExceptionLogger.RegisterIgnoreException(EConvertError);
self.ExceptionLogger.RegisterIgnoreException(EUnknownBrowserException); {Unknown browser type}
self.ExceptionLogger.RegisterIgnoreException(EInvalidSession); {Invalid session}
self.ExceptionLogger.RegisterIgnoreException(EExpiredSession); {Expired session}
self.ExceptionLogger.RegisterIgnoreException(EIWNoSessionId); {No session ID}
self.ExceptionLogger.LogType := ltFile; // ltEventLog;
self.ExceptionLogger.FilePath := Self.ContentPath + 'Exceptions\';
self.ExceptionLogger.FileName := 'Exceptions.log';
self.ExceptionLogger.PurgeAfterDays := 1;
self.ExceptionLogger.Enabled := True;
{cache path }
CacheDir := Self.ContentPath + 'Cache\';
Like I said, I want user to use only one session, been an application mode.
Thank you again for your help and support!