Dears,
We tried to load test K2 blackpearl server (start a process instance only!) with ONLY load of “constant count user” = 2] but unfortunately it fails with the following exception
at System.String.wstrcpy(Char* dmem, Char* smem, Int32 charCount)
at System.String.CtorCharPtrStartLength(Char* ptr, Int32 startIndex, Int32 length)
at SourceCode.Workflow.Runtime.ArchiveX.GetString()
at SourceCode.Workflow.Client.User.Load(ArchiveX ar)
at SourceCode.Workflow.Client.Connection.Open(ConnectionSetup Setup)
at WFWrapper.Manager.WFManager.InternetConnect() in E:ProjectsCSPDWFWrapperWFWrapperWFWrapperManagerWFManager.cs:line 156
--- End of inner exception stack trace ---
at WFWrapper.Manager.WFManager.InternetConnect() in E:ProjectsCSPDWFWrapperWFWrapperWFWrapperManagerWFManager.cs:line 164
at WFWrapper.Manager.WFManager.Connect() in E:ProjectsCSPDWFWrapperWFWrapperWFWrapperManagerWFManager.cs:line 127
at WFWrapper.Manager.WFManager.Start(WFInformation oInfo) in E:ProjectsCSPDWFWrapperWFWrapperWFWrapperManagerWFManager.cs:line 392
--- End of inner exception stack trace ---
at WFWrapper.Manager.WFManager.Start(WFInformation oInfo) in E:ProjectsCSPDWFWrapperWFWrapperWFWrapperManagerWFManager.cs:line 405
at CSPD.Workflow.Testing.WFManagerTestHelper.StartTest(String processName, String folio, WFFields fields) in E:ProjectsCSPDWFWrapperWFWrapperCSPD.Workflow.TestingCommonWFManagerTestHelper.cs:line 267
at CSPD.Workflow.Testing.InternetRenewPassport.StartInternetAdmissionPassportNoArchiveNotPaidTest() in E:ProjectsCSPDWFWrapperWFWrapperCSPD.Workflow.TestingIteration1InternetPassportsInternetRenewPassport.cs:line 759
Kindly note that the same load test is working properly incase t“constant count user” = 1].
However;
We tried to simulate this test using multithreading, as below code.
Console.WriteLine("......................Thread 1................");
Thread thrd = new Thread(new ParameterizedThreadStart(Starting));
Console.WriteLine(thrd.Name + ":" +thrd.ManagedThreadId);
thrd.Start(1);
Console.WriteLine("......................Thread 2................");
Thread thrd2 = new Thread(new ParameterizedThreadStart(Starting));
Console.WriteLine(thrd2.Name + ":" +thrd2.ManagedThreadId);
thrd2.Start(2);
thrd2.Suspend();
Console.WriteLine("......................Thread 3................");
Thread thrd3 = new Thread(new ParameterizedThreadStart(Starting));
thrd3.Start(3);
thrd3.Suspend();
System.Threading.Thread.Sleep(1000); //when removing this sleep we face the same problem, otherwise working properly
thrd2.Resume();
System.Threading.Thread.Sleep(1000); // when removing this sleep we face the same problem, otherwise working properly
thrd3.Resume();
Please check the following errors we faced when removing 1 second sleep…
1. First exception on connection ...
at SourceCode.Workflow.Runtime.ArchiveX.GetString()
at SourceCode.Workflow.Client.User.Load(ArchiveX ar)
at SourceCode.Workflow.Client.Connection.Open(ConnectionSetup Setup)
at WFWrapper.Manager.WFManager.InternetConnect() in E:ProjectsCSPDWFWrapperWFWrapperWFWrapperManagerWFManager.cs:line 156
2. Second exception on connection using threading and third exception the same...
at SourceCode.Workflow.Client.InternalConnection.AuthenticateWindows()
at SourceCode.Workflow.Client.InternalConnection.Authenticate()
at SourceCode.Workflow.Client.Connection.Open(ConnectionSetup Setup)
at WFWrapper.Manager.WFManager.InternetConnect() in E:ProjectsCSPDWFWrapperWFWrapperWFWrapperManagerWFManager.cs:line 156
Kindly note when trying to execute one thread! Or multiple threads with one second delay (sleep) everything is working properly.