title,body,link,tags,view_count,is_answered,score,answer_count
Stress testing Web API,"<p>I was hoping to get some direction or advice with regards to some trouble I'm having with trying to do some stress testing against a Web API for a client. It is a RESTful WEB API that I'm testing against. I've been creating a list of Tasks that run asynchronously that all call the WEB API but they take a very long time to execute and some just time out. I don't believe that it's throttling the service because I can still call the service in Fiddler on the same machine the test code is running on and it successfully calls the service while the asynchronous tasks are failing so it seems to be an issue with my testing code. Each task creates its own HttpClient and HttpRequestMessage.</p>

<p>Any advice would be appreciated.</p>
",https://stackoverflow.com/questions/60093771/stress-testing-web-api,"['c#', 'asp.net-web-api']",202,False,0,0
Stress Testing an AWS Web Application,"<p>My company needs to do some stress testing and simulates hundreds of connections at the same time on our web application.</p>
<p>Our back-end is in Java, and hosted on AWS BeanStalk service.
I wanted to know if we can simulates connection on our own, or does AWS have a special tools to simulate connection ?</p>
<p>I saw Stress Testing vs Load Testing too, I can't tell the difference yet between those.
If someone have an answer, feel free to help me as I'm quite struggling here...</p>
<p>Thank you !</p>
",https://stackoverflow.com/questions/64173030/stress-testing-an-aws-web-application,"['javascript', 'amazon-web-services', 'web', 'backend', 'stress-testing']",2225,True,1,1
Stress testing jenkins master using jmeter,"<p>I am trying to stress test my jenkins infrastructure using jmeter. I have created a Jmeter TestPlan which uses HTTPRequest component of jmeter to trigger the jenkins builds using jenkins rest api. The idea is to trigger a large number of builds and monitor the System health. when I run the jmeter test plan for single thread it works fine, but when I run it with multiple threads each HTTPrequest to trigger the jenkins build should be run for each thread... but it runs only once i.e. each build is triggered only once on jenkins (no matter what is the thread count). In Jmeter test results, it shows that the HTTPRequest is successful for all the threads.. but on Jenkins the build seems to be triggered only for 1 thread group.</p>
",https://stackoverflow.com/questions/61659225/stress-testing-jenkins-master-using-jmeter,"['jenkins', 'jmeter']",427,True,0,1
JMeter stress testing the TPS can&#39;t be improved,"<p>I am using JMeter to do stress testing to my project.</p>

<p>I set the Constant Throughout Timer as 20/s, and last for 100s. But the actual is: the TPS most get 7/s, and never get 20/s. I don't know why is this.  </p>

<p>I want to ask 2 questions:
1、As my understanding,  the JMeter can simulate the stress so it can get TPS at 20/s, is there any config wrong of my JMeter?
2、If for other case, the Jmeter can simulate the stress only depend on the server, is it mean there is problem with my server lead to the TPS can't be improved? </p>
",https://stackoverflow.com/questions/59933991/jmeter-stress-testing-the-tps-cant-be-improved,"['java', 'testing', 'jmeter', 'stress-testing', 'jmeter-5.0']",916,True,0,1
.NET Core 2.1 API Kestrel problems when stress testing,"<p>I have an API developed in .NET Core 2.1 and while doing stress testing, it reports a Kestrel web server error and I don't know what it is.</p>

<p>The error message is: <em>Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate.</em></p>

<p>I leave the call stack I see in the Application Insights log.</p>

<blockquote>
  <p>Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException:
     at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody+d__4.MoveNext (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.IO.Pipelines.PipeCompletion.ThrowLatchedException (System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
     at System.IO.Pipelines.Pipe.GetReadResult (System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
     at System.IO.Pipelines.Pipe.GetReadAsyncResult (System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
     at System.IO.Pipelines.Pipe+DefaultPipeReader.GetResult (System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
     at System.Runtime.CompilerServices.ValueTaskAwaiter<code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody+&lt;ReadAsync&gt;d__21.MoveNext (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.ValueTaskAwaiter</code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream+d__22.MoveNext (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter<code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream+&lt;ReadAsync&gt;d__35.MoveNext (Microsoft.AspNetCore.WebUtilities, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter</code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.WebUtilities.StreamHelperExtensions+d__3.MoveNext (Microsoft.AspNetCore.WebUtilities, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter+d__17.MoveNext (Microsoft.AspNetCore.Mvc.Formatters.Json, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter<code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder+&lt;BindModelAsync&gt;d__7.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder+&lt;BindModelAsync&gt;d__11.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter</code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider+&lt;>c__DisplayClass0_0+&lt;g__Bind|0>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__13.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__23.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__18.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__16.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Builder.RouterMiddleware+d__4.MoveNext (Microsoft.AspNetCore.Routing, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+d__6.MoveNext (Microsoft.AspNetCore.Authentication, Version=2.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+d__7.MoveNext (Microsoft.AspNetCore.StaticFiles, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at quodem_qcore_gamification.api.Startup+&lt;>c+&lt;b__5_0>d.MoveNext (quodem-qcore-gamification.api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware+d__8.MoveNext (Microsoft.AspNetCore.Cors, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+d__13.MoveNext (Microsoft.AspNetCore.Server.IISIntegration, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+d__188`1.MoveNext (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)</p>
</blockquote>
",https://stackoverflow.com/questions/62191747/net-core-2-1-api-kestrel-problems-when-stress-testing,"['c#', 'asp.net-core', '.net-core', 'kestrel-http-server']",640,True,0,1
How to do load / stress testing for asp.net application locally?,"<p>I would like to do testing for my application locally.</p>

<p>I have a 8 GB RAM pc and would like to know how many users can use my application concurrently without any problems.</p>

<p>How to do stress/load testing?</p>
",https://stackoverflow.com/questions/61651126/how-to-do-load-stress-testing-for-asp-net-application-locally,['asp.net'],305,True,0,1
Stress testing URI using xargs + curls bash script failing with status empty,"<p>I'm trying to do user acceptance testing on an application which becomes unresponsive on a particular URL parameter included in the GET request.</p>
<p><strong>Steps</strong></p>
<ol>
<li><p>I have <code>curl</code> and run the GET req (crafted) copied curl syntax for Unix and copied to ubuntu server along with some changes.</p>
<pre><code>'https://abc.ai/getMultiDashboard/demouser' -H 'Cookie: _ga=GA1.2.561275388.1601468723; _hjid=ecd3d778-b7f5-4f7f-b3ef-6f9f12b13d66; 54651cc_an=4; _gid=GA1.2.1366208807.1601560229; _hjTLDTest=1; 54651cc_data=JTdCJTIyaWQlMjIlM0Ellc3NUb2tlbiUyMiUzQSUyMjA2MTk3NjM3NTgwOGE2N2RmZjlhMmJlOWJmODE5NDQzJTIyJTdE; 54651cc_loggedin=1; 54651cc_sound=true; 54651cc_read=true; 54651cc_popup=true; 54651cc_disablelastseen=false; 54651cc_usertype=loginuser; _hjIncludedInPageviewSample=1; _hjAbsoluteSessionInProgress=0; abc=s%3A8ZGd7Mol31n_Y8OCLq39dHoo3_mIlRhZ.pFQWz5gG9McKsQLzOikcTBmmb2Wcrxo%2B9u9iPpqoyxw; pageUrl=/#/dashboard/18; _gat_gtag_UA_97985973_5=1' 
&quot;https://abc.ai/getTagTrends/E1_CPU_PERCENTAGE/2020-9-12%2013:4:0/202**'23548'**0-09-15|%2013:04:00&quot;
&quot;https://abc.ai/getTagTrends/E1_CPU_PERCENTAGE/2020-9-12%2013:4:0/202**'`23548`'**0-09-15|%2013:04:00&quot;
</code></pre>
</li>
<li><p>The <code>**</code> asterisks are not part of the actual values; I use them to demarcate my <code>injected</code> value</p>
</li>
<li><p>Using a small bash script I have generated 1000s of (unique) payload combinations for Curl.</p>
<pre class=""lang-sh prettyprint-override""><code>#/bin/bash   
for ((i=0; i&lt;1000; ++i)); do
        echo &quot;
'https://abc.ai/getMultiDashboard/demouser' -H 'Cookie: _ga=GA1.2.561275388.1601468723; _hjid=ecd3d778-b7f5-4f7
f-b3ef-6f9f12b13d66; 54651cc_an=4; _gid=GA1.2.1366208807.1601560229; _hjTLDTest=1; 54651cc_data=JTdCJTIyaWQlMjIlM0ElMjJkZW1vdXNlciU yMiUyQyUyMm4lMjIlM0ElMjJkZW1vdXNlciUyMiUyQyUyMmZyaWVuZHMlMjIlM0ElMjIlMjIlMkMlMjJhdXRoJTIyJTNBJTIyZWQ0YjVhNDFkMzJlY2U4MzQ3Mzk0ZjlkZT    U5YThjMWQlMjIlMkMlMjJyZWZlcmVyJTIyJTNBJTIyaXJpZGl1bS1wcmVwcm9kLmVtcGlyaWMuYWklMjIlMkMlMjJhY2Nlc3NUb2tlbiUyMiUzQSUyMjA2MTk3NjM3NTgwO
GE2N2RmZjlhMmJlOWJmODE5NDQzJTIyJTdE; 54651cc_loggedin=1; 54651cc_sound=true; 54651cc_read=true; 54651cc_popup=true; 54651cc_disable
lastseen=false; 54651cc_usertype=loginuser; _hjIncludedInPageviewSample=1; _hjAbsoluteSessionInProgress=0; abc=s%3A8ZGd7Mol31n_
Y8OCLq39dHoo3_mIlRhZ.pFQWz5gG9McKsQLzOikcTBmmb2Wcrxo%2B9u9iPpqoyxw; pageUrl=/#/dashboard/18; _gat_gtag_UA_97985973_5=1' \&quot;https://abc.ai/getTagTrends/E1_CPU_PERCENTAGE/2020-9-12%2013:4:0/202'$((1 + RANDOM % 10000000))'0-09-15|%2013:04:00\&quot;&quot; 
&gt; URL.txt   
done
</code></pre>
</li>
<li><p>Final command for testing (one-liner) fails as
<code>cat URL.txt | xargs -I{}  -- curl -O {}</code></p>
</li>
</ol>
<p>Output:</p>
<pre><code>     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
</code></pre>
<p><strong>Expected output</strong>
when I run the curl manually copying the contents from URL file I get</p>
<pre><code>[{&quot;dashboard_id&quot;: 18, &quot;user_id&quot;: &quot;demouser&quot;, &quot;dashboard_name&quot;: &quot;My_dashboard_1&quot;, &quot;description&quot;: &quot;Test description One&quot;, &quot;creation_date&quot;: &quot;2020-09-21 10:13:00&quot;, &quot;dashboard_config&quot;: null, &quot;id&quot;: 5}]


&lt;html&gt;
&lt;head&gt;&lt;title&gt;504 Gateway Time-out&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
&lt;center&gt;&lt;h1&gt;504 Gateway Time-out&lt;/h1&gt;&lt;/center&gt;
&lt;hr&gt;&lt;center&gt;nginx/1.18.0&lt;/center&gt;
</code></pre>
<p>In order to troubleshoot, i used <code>set -x</code> on shell cmd-line I can't see why or how the request is crafted and handled by the curl processes. The curl output shows output (above) which has all 0 values in all fields, this tell me its just a bad malformed request, which isn't the actual case since i manually tested running the URL payload given in URL.txt multiple times it works.</p>
<pre><code>EMPTY LINE
CODE
NEW-LINE

CODE
NEWLINE

...
</code></pre>
<p>I want to generate as many parallel requests as possible, without waiting for the first one to finish.</p>
<p><strong>Debug</strong></p>
<p>running it with <code>-v</code> using one-liner (showing only importants lines)</p>
<pre><code>&gt; GET /getMultiDashboard/demouser -H Cookie: _ga=GA1.2.561275388.1601468723; _hjid=ecd3d778-b7f5-4f7f-b3ef-6f9f12b13d66; 54651cc_an=4; _hjTLDTest=1; 54651cc_data=JTdCJTIyaWQlMjIlM0ElMgwOGE2N2RmZjlhMmJlOWJmODE5NDQzJTIyJTdE; 54651cc_loggedin=1; 54651cc_sound=true; 54651cc_read=true; 54651cc_popup=true; 54651cc_disablelastseen=false; 54651cc_usertype=loginuser; _gid=GA1.2.1722546791.1601890062; _hjIncludedInPageviewSample=1; _hjAbsoluteSessionInProgress=0; abc=s%3AKsRWcfNnOkbDHh1e65C3NwiDSZMx4LYg.zxLIymu488Ii5Z2%2Brz0qiwS17BzK2P7A0OoTSCHlMQM; pageUrl=/ HTTP/1.1
&gt; Host: abc.ai
&gt; User-Agent: curl/7.58.0
&gt; Accept: */*
&gt;
{ [5 bytes data]
&lt; HTTP/1.1 400 BAD_REQUEST
&lt; Content-Length: 0
&lt; Connection: Close
</code></pre>
<p>When I run it with <code>curl</code> alone not using <code>xargs</code> I get the correct output no <code>400</code> bad request</p>
<pre><code>&gt; Cookie: _ga=GA1.2.561275388.1601468723; _hjid=ecd3d778-b7f5-4f7f-b3ef-6f9f12b13d66; 54651cc_an=4; _hjTLDTest=1; 54651cc_data=JTdCJTIyaWQlMjIlM0ElMjJkZW1vdXNlciUyMiUyQyUyMm4lMjIlM0ElMjJkZW1vdXNJlOWJmODE5NDQzJTIyJTdE; 54651cc_loggedin=1; 54651cc_sound=true; 54651cc_read=true; 54651cc_popup=true; 54651cc_disablelastseen=false; 54651cc_usertype=loginuser; _gid=GA1.2.1722546791.1601890062; _hjIncludedInPageviewSample=1; _hjAbsoluteSessionInProgress=0; abc=s%3AKsRWcfNnOkbDHh1e65C3NwiDSZMx4LYg.zxLIymu488Ii5Z2%2Brz0qiwS17BzK2P7A0OoTSCHlMQM; pageUrl=/#/dashboard; _gat_gtag_UA_97985973_5=1
&gt;
&lt; HTTP/1.1 200 OK
&lt; Content-Type: text/html; charset=utf-8
&lt; Date: Mon, 05 Oct 2020 09:48:51 GMT
&lt; ETag: W/&quot;3b4-gP1vMAXMzUZy+pt7cwyOmQslPT8&quot;
&lt; Server: nginx/1.18.0
&lt; Strict-Transport-Security: max-age=15552000; includeSubDomains
&lt; Vary: Accept-Encoding
&lt; X-Content-Type-Options: nosniff
&lt; X-DNS-Prefetch-Control: off
&lt; X-Download-Options: noopen
&lt; X-Frame-Options: SAMEORIGIN
&lt; X-XSS-Protection: 1; mode=block
&lt; Content-Length: 948
&lt; Connection: keep-alive
&lt;
* Connection #0 to host abc.ai left intact
[{&quot;dashboard_id&quot;: 18, &quot;user_id&quot;: &quot;demouser&quot;, &quot;dashboard_name&quot;: &quot;My_dashboard_1&quot;, &quot;description&quot;: &quot;Test description One&quot;, &quot;creation_date&quot;: &quot;2020-09-21 10:13:00&quot;,  &quot;2020-08-12 09:08:00&quot;, &quot;dashboard_config&quot;: {}, &quot;sort_id&quot;: 4, &quot;id&quot;: 2}, {&quot;dashboard_id&quot;: 5}]* Found bundle for host abc.ai: 0x55836cf75a50 [can pipeline]
* Re-using existing connection! (#0) with host abc.ai
* Connected to abc.ai (52.86.136.249) port 443 (#0)
&gt; GET /getTagTr/E1_CP/2020-9-12%2013:4:0/202'6368'0-09-15|%2013:04:00 HTTP/1.1
&gt; Host: abc.ai
&gt; User-Agent: curl/7.58.0
&gt; Accept: */*
&gt; Cookie: _ga=GA1.2.561275388.1601468723; _hjid=ecd3d778-b7f5-4f7f-b3ef-6f9f12b13d66; 54651cc_an=4; _hjTLDTest=1; 54651cc_data=JTdCJTIyaWQlMjIlM0ElMjJkZW1vdXNlciUyMiUyQyUyMmjM3NTgwOGE2N2RmZjlhMmJlOWJmODE5NDQzJTIyJTdE; 54651cc_loggedin=1; 54651cc_sound=true; 54651cc_read=true; 54651cc_popup=true; 54651cc_disablelastseen=false; 54651cc_usertype=loginuser; _gid=GA1.2.1722546791.1601890062; _hjIncludedInPageviewSample=1; _hjAbsoluteSessionInProgress=0; abc=s%3AKsRWcfNnOkbDHh1e65C3NwiDSZMx4LYg.zxLIymu488Ii5Z2%2Brz0qiwS17BzK2P7A0OoTSCHlMQM; pageUrl=/#/dashboard; _gat_gtag_UA_97985973_5=1
</code></pre>
",https://stackoverflow.com/questions/64195729/stress-testing-uri-using-xargs-curls-bash-script-failing-with-status-empty,"['bash', 'curl', 'sed', 'sh', 'xargs']",1210,True,0,1
stress testing concurrency: how to slow down thread execution oin my application?,"<p>I have hit situations where certain race conditions only occur when I run my application in the valgrind emulator. But if I run my executable as a normal program these issues did not occur.</p>

<p>My theory is that the emulator slows down execution so much that threads have larger common time frames in which they execute and can operate on shared data structures thereby increasing the chance of hitting race conditions on these shared resources.</p>

<p>I would like to have a more fine grained control on e.g. a virtual clock frequency by means of a specialized emulator.</p>

<p>Does somebody know about an existing tool to do this job. I have tried to search for this online. There should be some academic paper dealing with this. But so far I haven't found it yet.</p>
",https://stackoverflow.com/questions/60634106/stress-testing-concurrency-how-to-slow-down-thread-execution-oin-my-application,"['debugging', 'concurrency', 'emulation']",24,False,0,0
overflow encountered in long scalers while stress testing for maximum pair-wise product,"<p>I'm trying stress testing over the maximum pair-wise product algorithm, where the constraints are <code>2 &lt;= n &lt;= 2.10^5; 0 &lt;= a1,...,an &lt;= 2.10^5</code> where <code>n</code> is the length of the array and <code>a1,a2,...,an</code> is the element of list. When I'm running the code which is shown below, it's giving me an error saying <code>overflow encountered in long scalers</code>. This can be avoided in <code>c</code> using <code>long long</code> but how to avoid in <code>python</code>. please help.</p>

<p>MY CODE</p>

<pre><code># python3
import numpy as np

def max_pairwise_product(numbers):

    n = len(numbers)
    max_product = 0
    for first in range(n):
        for second in range(first + 1, n):
            max_product = max(max_product, (numbers[first] * numbers[second]))

    return max_product

def fast_max_pairwise_product(numbers):

    max_num = max(numbers)  
    numbers.remove(max_num)
    sec_max_num = max(numbers)
    max_product = max_num * sec_max_num

    return max_product

while(True):
    n = np.random.randint(0,1000) + 2
    print(n)
    vector = list(np.random.randint(0,1000000, n))
    print(vector)
    res1 = max_pairwise_product(vector)
    res2 = fast_max_pairwise_product(vector)
    if(res1 != res2):
        print('Wrong Answer', res1, ' ' , res2)
        break
    else:
        print()

</code></pre>

<p>ERROR</p>

<pre><code>C:/Users/INTEL/Desktop/Algorithm Specialization/Algorithm toolbox/Week 1/week1_programming_challenges/2_maximum_pairwise_product/stress_test.py:11: RuntimeWarning: overflow encountered in long_scalars
  max_product = max(max_product, (numbers[first] * numbers[second]))
C:/Users/INTEL/Desktop/Algorithm Specialization/Algorithm toolbox/Week 1/week1_programming_challenges/2_maximum_pairwise_product/stress_test.py:23: RuntimeWarning: overflow encountered in long_scalars
  max_product = max_num * sec_max_num
</code></pre>
",https://stackoverflow.com/questions/59767248/overflow-encountered-in-long-scalers-while-stress-testing-for-maximum-pair-wise,"['python', 'algorithm', 'stress-testing']",93,True,0,1
"C++ code passes all test cases and stress testing, but fails online test","<p>I'm a C++ noob, so forgive me if this is a really dumb question. This is a question that I had to code for:</p>
<p><strong>Problem Description:</strong></p>
<p><strong>Task.</strong> Given 𝑛 points on a plane, find the smallest distance between a pair of two (different) points.</p>
<p><strong>Input Format.</strong> The first line contains the number 𝑛 of points. Each of the following 𝑛 lines defines a point (𝑥𝑖, 𝑦𝑖).</p>
<p><strong>Constraints.</strong> 2 ≤ 𝑛 ≤ 10^5; −10^9 ≤ 𝑥𝑖, 𝑦𝑖 ≤ 10^9 are integers.</p>
<p><strong>Output Format.</strong> Output the minimum distance. The absolute value of the difference between the answer
of your program and the optimal value should be at most 10^−3</p>
<p>Input:</p>
<p>2</p>
<p>0 0</p>
<p>3 4</p>
<p>Output:</p>
<p>5.0</p>
<p>(This is a problem from the UC San Diego University DSA course on Coursera).</p>
<p>Stress testing works, and it shows no error, but the Coursera checker throws this output: &quot; Unknown Signal 11&quot;. Now the guidelines say &quot;Unknown signal 6 (or 7, or 8, or 11, or some other). This happens when your program crashes. It can be because of a division by zero, accessing memory outside of the array bounds, using
uninitialized variables, overly deep recursion that triggers a stack overflow, sorting with a contradictory
comparator, removing elements from an empty data structure, trying to allocate too much memory,
and many other reasons.&quot;</p>
<p>Needless to say, that didn't narrow too much down for me. Could someone please tell me where my code fails? Trying to debug is driving me crazy, especially since I have no idea where it is failing. (And the block of if statements is there only because I thought that was where it was causing problems, but apparently not&gt;)</p>
<pre><code>#include &lt;algorithm&gt;
#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;iomanip&gt;
#include &lt;vector&gt;
#include &lt;string&gt;
#include &lt;cmath&gt;
#include&lt;cstdlib&gt;

using std::vector;
using std::string;
using std::pair;
using std::min;
using namespace std;

struct Point {

  long long x;
  long long y;
};

bool comparex(Point a, Point b) {

  if (a.x &lt;= b.x) return true;
  else return false;
}

bool comparey(Point a, Point b) {

  if (a.y &lt;= b.y) return true;
  else return false;
}

double dist(Point a, Point b) {

  double res = 0;
  res = sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));

  return res;
}


double merge(vector&lt;Point&gt; p, int l, int mid, int r, double d) {
  //cout &lt;&lt; &quot;Here1&quot; &lt;&lt; endl;

  vector&lt;Point&gt; strip;
  //cout &lt;&lt; &quot;here2&quot; &lt;&lt; endl;
  int i = 1;

  while (((double)p[mid].x - p[mid - i].x) &lt;= d &amp;&amp; (mid - i) &gt;= l) {

    strip.push_back(p[mid - i]);

    i++;
  }
  //cout &lt;&lt; &quot;here3&quot; &lt;&lt; endl;

  i = 1;

  while (((double)p[mid + i].x - p[mid].x) &lt;= d &amp;&amp; (mid + i) &lt;= r) {
    //cout &lt;&lt; &quot;i &quot; &lt;&lt; i &lt;&lt; endl;
    strip.push_back(p[mid + i]);

    i++;
  }
  //cout &lt;&lt; &quot;here4&quot; &lt;&lt; endl;
  strip.push_back(p[mid]);
  //cout &lt;&lt; &quot;here5&quot; &lt;&lt; endl;


  sort(strip.begin(), strip.end(), comparey);

  /*for (int j = 0; j &lt; strip.size(); j++) {

    cout &lt;&lt; strip[j].x &lt;&lt; &quot; &quot; &lt;&lt; strip[j].y &lt;&lt; endl;
  }*/

  double minimum = d;

  for (size_t j = 0; j &lt; strip.size(); j++) {

    if (j + 1 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 1]));}
    if (j + 2 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 2]));}
    if (j + 3 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 3]));}
    if (j + 4 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 4]));}
    if (j + 5 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 5]));}
    if (j + 6 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 6]));}
    if (j + 7 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 7]));}

  }


  return minimum;


}

double minimal_distance(vector&lt;Point&gt; p, int l, int r) {
  //write your code here
  if (l + 1 == r) {
    return dist(p[l], p[r]);
  }

  else if (l + 2 == r) {
    return std::min({dist(p[l], p[l + 1]), dist(p[l], p[l + 2]), dist(p[l + 1], p[l + 2])});
  }


  else {

    sort(p.begin(), p.end(), comparex);

    int mid = (l + r) / 2;

    //cout &lt;&lt; &quot; l &quot; &lt;&lt; l &lt;&lt; &quot; r &quot; &lt;&lt; r &lt;&lt; &quot; mid &quot; &lt;&lt; mid &lt;&lt; endl;

    double d = std::min(minimal_distance(p, l, mid), minimal_distance(p, mid + 1, r));

    //cout &lt;&lt; &quot;left &quot; &lt;&lt; minimal_distance(p, l, mid) &lt;&lt; &quot; right&quot; &lt;&lt; minimal_distance(p, mid + 1, r) &lt;&lt; endl;

    double d1 = merge(p, l , mid, r, d);


    return std::min(d, d1);



  }
}

double naive(vector&lt;Point&gt; p, int l, int r) {


  double minimum = dist(p[l], p[r]);
  for (size_t i = l; i &lt;= r; i++) {

    for (size_t j = i + 1; j &lt;= r; j++) {


      minimum = std::min(minimum, dist(p[i], p[j]));
    }
  }
  return minimum;
}

int main() {

  size_t n;
  std::cin &gt;&gt; n;
  vector&lt;Point&gt; p(n);

  for (size_t i = 0; i &lt; n; i++) {
    std::cin &gt;&gt; p[i].x &gt;&gt; p[i].y;
  }
  std::cout &lt;&lt; std::fixed;
  std::cout &lt;&lt; std::setprecision(9) &lt;&lt; minimal_distance(p, 0, n - 1) &lt;&lt; &quot;\n&quot;;
}

</code></pre>
",https://stackoverflow.com/questions/62910556/c-code-passes-all-test-cases-and-stress-testing-but-fails-online-test,"['c++', 'arrays', 'algorithm', 'compiler-errors']",136,False,0,0
why my program takes 100% of my RAM on stress testing (72 GB),"<p>I have a solution based on .net core 2.0 and it reaches 100% RAM (72 GB) in an hour on stress testing.
I need to know if there is a any work around to force garbage collector without changing the code?
Any environment level changes/third party tools. </p>

<h2>Environment:</h2>

<p>OS: Windows server 2012
RAM: 72 GB</p>
",https://stackoverflow.com/questions/60989660/why-my-program-takes-100-of-my-ram-on-stress-testing-72-gb,"['windows', 'asp.net-core', 'ram', 'stress']",38,False,0,0
How to perform stress testing/performance testing of UWP app that calls api,"<p>I am looking for a way to do some performance testing of a UWP app that calls api's and uses radis cache.
The application will continuously perform action for 100 hours or more and i need to make sure the server response time is consistent and does not deteriorate the application's action response after running for so many hours at a stretch. By the way, there is no scenario of having multiple users here. I am still on the learning curve and any help would be greatly appreciated.  </p>
",https://stackoverflow.com/questions/60729280/how-to-perform-stress-testing-performance-testing-of-uwp-app-that-calls-api,"['uwp', 'performance-testing', 'stress-testing', 'web-api-testing', 'redis-cache']",494,True,0,2
Getting Internal Server Error while performing Stress testing(Load testing) in Apache J-meter,"<p>So we have three development servers(A,B,C).In ""A"" and ""B"" servers we have installed  Tibco Statistica of same version and with same configurations also we have installed Apache J-Meter in C Server .We have constructed a Model in the Statistica which takes input values from excel sheet and gives output. We want to perform Stress testing on these two servers (A,B) using Apache J-meter in ""C"" server, to find out how many requests the model(in Servers A and B) can take in a given time interval.
The server A is working good and we are not getting any errors in the given time interval but we are getting many failures in the Server B(More than 80%)
The Error in the Server B is ""Internal Server Error"" 20% of the requests are getting the response while the rest of the 80% is getting failed
For E.g:- If i pass 60 requests under 20 sec time interval 
1)For Server A all the 60 requests are getting response
2)For Server B only 18-20 requests are getting response and the rest are failing with ""Internal Server Error""
After reading from some blogs about the error i have found that the communication interruption(between the servers) is the main cause of this issue,But in our case there is no interruption and the process monitor was able to capture the events during the time of testing</p>

<p>can anyone please help me out.? </p>
",https://stackoverflow.com/questions/62259912/getting-internal-server-error-while-performing-stress-testingload-testing-in-a,"['jmeter', 'tibco', 'stress-testing', 'statistica']",448,True,1,1
Unexpected Output of linear search,"<p>Please find my code below for linear search. Binary search function is giving the correct output. But after doing the stress testing I am not getting the correct output of linear search.
When implementing the same code for linear search with the same input(test case) as produced by stress testing the code gives correct output.</p>

<pre><code>int linear_search(const vector&lt;int&gt; &amp;a, int x) 
{
  for (int i = 0; i &lt; a.size(); ++i) 
  {
    if (a[i] == x)
    {
      return i;
    }
  }
  return -1;
}
</code></pre>

<p>main function</p>

<pre><code>int main() {
   while(true)
   {
     int n=5;
   vector&lt;int&gt; a(n);
   for (size_t i = 0; i &lt; n; i++) {
     int b = rand() % 5 + 1;
     a.push_back(b);
   }
   for (size_t i = 0; i &lt; n; i++) {
     std::cout&lt;&lt;a[i]&lt;&lt;"" "";
   }
   std::cout&lt;&lt;""\n"";
   int x = rand() % 10 + 1;
   std::cout&lt;&lt;x&lt;&lt;""\n"";
   int l = linear_search(a,x);
   int b = binary_search(a,x);
   if(l != b)
   {

     std::cout&lt;&lt;l&lt;&lt;""\n"";
     std::cout&lt;&lt;b&lt;&lt;""\n"";
     break;
   }
   else
   {
     std::cout&lt;&lt;""Ok\n"";
   }
   }
}
</code></pre>

<p>After running the above code, I am getting wrong(unexpected) output when the random input(produced by stress testing) is : </p>

<p><strong>0 0 0 0 0</strong></p>

<p><strong>4</strong></p>

<p>The output of linear search is 5 instead of -1. I am unable to find the error.</p>
",https://stackoverflow.com/questions/61348068/unexpected-output-of-linear-search,"['c++', 'linear-search']",48,True,3,1
Stress Testing an AWS Web Application,"<p>My company needs to do some stress testing and simulates hundreds of connections at the same time on our web application.</p>
<p>Our back-end is in Java, and hosted on AWS BeanStalk service.
I wanted to know if we can simulates connection on our own, or does AWS have a special tools to simulate connection ?</p>
<p>I saw Stress Testing vs Load Testing too, I can't tell the difference yet between those.
If someone have an answer, feel free to help me as I'm quite struggling here...</p>
<p>Thank you !</p>
",https://stackoverflow.com/questions/64173030/stress-testing-an-aws-web-application,"['javascript', 'amazon-web-services', 'web', 'backend', 'stress-testing']",2225,True,1,1
How to make JMETER make 166 requests in 1 second?,"<p>I need to make stress testing for some service and I need to make 10 000 requests.
How to make correctly 166 requests in 1 second ?<br />
Have I made correct settings below ? (picture below)
<a href=""https://i.stack.imgur.com/mLuv0.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/mLuv0.png"" alt=""enter image description here"" /></a></p>
",https://stackoverflow.com/questions/64009402/how-to-make-jmeter-make-166-requests-in-1-second,"['java', 'testing', 'jmeter', 'stress-testing']",289,True,0,2
How to login to Azure Active Directory single sign-on (SSO) integration with Google Cloud (G Suite) Connector using JMeter,"<p>I want to login to my application using <strong>JMeter</strong> to perform Stress Testing.</p>
<p>But in my application, we have authentication of <strong>Azure Active Directory single sign-on (SSO)</strong> along with Google.</p>
<p>Can anyone help me, <strong>How to do login to the application using JMeter</strong></p>
",https://stackoverflow.com/questions/62760814/how-to-login-to-azure-active-directory-single-sign-on-sso-integration-with-goo,"['jmeter', 'azure-active-directory', 'google-signin', 'stress-testing']",78,False,1,0
why my program takes 100% of my RAM on stress testing (72 GB),"<p>I have a solution based on .net core 2.0 and it reaches 100% RAM (72 GB) in an hour on stress testing.
I need to know if there is a any work around to force garbage collector without changing the code?
Any environment level changes/third party tools. </p>

<h2>Environment:</h2>

<p>OS: Windows server 2012
RAM: 72 GB</p>
",https://stackoverflow.com/questions/60989660/why-my-program-takes-100-of-my-ram-on-stress-testing-72-gb,"['windows', 'asp.net-core', 'ram', 'stress']",38,False,0,0
overflow encountered in long scalers while stress testing for maximum pair-wise product,"<p>I'm trying stress testing over the maximum pair-wise product algorithm, where the constraints are <code>2 &lt;= n &lt;= 2.10^5; 0 &lt;= a1,...,an &lt;= 2.10^5</code> where <code>n</code> is the length of the array and <code>a1,a2,...,an</code> is the element of list. When I'm running the code which is shown below, it's giving me an error saying <code>overflow encountered in long scalers</code>. This can be avoided in <code>c</code> using <code>long long</code> but how to avoid in <code>python</code>. please help.</p>

<p>MY CODE</p>

<pre><code># python3
import numpy as np

def max_pairwise_product(numbers):

    n = len(numbers)
    max_product = 0
    for first in range(n):
        for second in range(first + 1, n):
            max_product = max(max_product, (numbers[first] * numbers[second]))

    return max_product

def fast_max_pairwise_product(numbers):

    max_num = max(numbers)  
    numbers.remove(max_num)
    sec_max_num = max(numbers)
    max_product = max_num * sec_max_num

    return max_product

while(True):
    n = np.random.randint(0,1000) + 2
    print(n)
    vector = list(np.random.randint(0,1000000, n))
    print(vector)
    res1 = max_pairwise_product(vector)
    res2 = fast_max_pairwise_product(vector)
    if(res1 != res2):
        print('Wrong Answer', res1, ' ' , res2)
        break
    else:
        print()

</code></pre>

<p>ERROR</p>

<pre><code>C:/Users/INTEL/Desktop/Algorithm Specialization/Algorithm toolbox/Week 1/week1_programming_challenges/2_maximum_pairwise_product/stress_test.py:11: RuntimeWarning: overflow encountered in long_scalars
  max_product = max(max_product, (numbers[first] * numbers[second]))
C:/Users/INTEL/Desktop/Algorithm Specialization/Algorithm toolbox/Week 1/week1_programming_challenges/2_maximum_pairwise_product/stress_test.py:23: RuntimeWarning: overflow encountered in long_scalars
  max_product = max_num * sec_max_num
</code></pre>
",https://stackoverflow.com/questions/59767248/overflow-encountered-in-long-scalers-while-stress-testing-for-maximum-pair-wise,"['python', 'algorithm', 'stress-testing']",93,True,0,1
Why my application does not consume CPU and RAM?,"<p>I have a solution in asp.net-core 3.1. When I run stress testing, it consumes no more than 20-30% cpu.
I have tried increasing worker processes but still it gives a constant throughput and does not consume resources.
Any suggestion on what I am doing wrong here? </p>

<h2>System Specs:</h2>

<p>OS: Windows server 2012
CPU: 16 cores
RAM: 64 GB</p>
",https://stackoverflow.com/questions/60992228/why-my-application-does-not-consume-cpu-and-ram,"['windows', 'asp.net-core', 'cpu-usage', 'stress-testing', 'throughput']",252,True,0,1
Do Tensorflow Serving run inference with cache?,"<p>When I serve my TF model with tensorflow serveing, <strong>on version 2.1.0</strong>, through docker, I perform a stress testing with Jmeter. There is a problem. <strong>TPS will hit 4400 by testing with single data, while it only reach 1700 with multiple data in a txt file.</strong> The model is BiLSTM which I've trained without any cache setting. The experiments all perform in local server rather than through network.</p>
<h3>Metrics:</h3>
In single data task, I set running HTTP request with identical data without interval by 30 request threads for 10 minutes.
<ul>
<li>TPS: 4491</li>
<li>CPU occupied: 2100%</li>
<li>99% Latancy Line(ms): 17</li>
<li>error rate: 0</li>
</ul>
In multiple data task, I set running HTTP request with reading a txt file, a dataset with 9740000 different examples, by 30 request threads.
<ul>
<li>TPS: 1711</li>
<li>CPU occupied: 2300%</li>
<li>99% Latancy Line(ms): 42</li>
<li>error rate: 0</li>
</ul>
<h3>Hardware：</h3>
<ul>
<li>CPU cores:12</li>
<li>processor: 24</li>
<li>Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz</li>
</ul>
<p>Is there a cache in Tensorflow Serving?</p>
<p>Why is TPS with single data testing larger thrice than with various data testing in stress testing task?</p>
",https://stackoverflow.com/questions/63786651/do-tensorflow-serving-run-inference-with-cache,"['docker', 'jmeter', 'tensorflow-serving', 'stress-testing']",457,False,1,1
Measure load or performance testing of GUI web applications,"<p>We are using JMeter to perform load testing of apis. If want to perform load or stress testing on web application which has JavaScript rendering, would JMeter with Selenium only option or any other options can be utilized like Selenium functional tests integrate with any performance tool. </p>

<p>Please suggest. </p>

<p>Have gone through/referred to this questions:
<a href=""https://stackoverflow.com/questions/21780391/how-to-approach-end-client-performance-testing-on-single-page-web-applicatio"">How to approach &quot;end-client&quot; performance testing on single-page (web) applications?</a></p>
",https://stackoverflow.com/questions/59898695/measure-load-or-performance-testing-of-gui-web-applications,"['jmeter', 'performance-testing']",1361,True,1,2
How can i do Stress/Performance Testing in jmeter?,"<p>I Want to go for stress testing to start with the anticipated number of users (or just from 1 virtual user) and gradually increase the load such as for 10 threads, 20 threads, …. 100 threads until response time starts exceeding the acceptable value or errors start occurring.But For all this test run should i increases the Ramp-up Period(Seconds) or it will remain the same for all test?
Picture is given below:</p>

<p><a href=""https://i.stack.imgur.com/8yenK.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/8yenK.png"" alt=""enter image description here""></a></p>
",https://stackoverflow.com/questions/61849909/how-can-i-do-stress-performance-testing-in-jmeter,"['testing', 'jmeter', 'performance-testing', 'stress-testing']",262,False,0,2
cx_Oracle.DatabaseError: ORA-12592: TNS:bad packet,"<p>I am writing a Flask API, and am seeing a lot of failures when load testing.</p>
<p>Looking at the uwsgi logs, I am seeing something which looks a little nasty, which is:</p>
<p>cx_Oracle.DatabaseError: ORA-12592: TNS:bad packet</p>
<p>The oracle connection is working, as I am not seeing a complete failure, but this does seem to be what is terminating the http rest call prematurely in most cases.</p>
<p>What is causing this?  I am using RHEL, with cx_Oracle 7.23, connecting to 12C database.  I am using the Oracle thin client.</p>
<pre><code>Exception on /api/read/maa [GET]
Traceback (most recent call last):
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/flask/app.py&quot;, line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/flask/app.py&quot;, line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/flask/app.py&quot;, line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/flask/_compat.py&quot;, line 39, in reraise
    raise value
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/flask/app.py&quot;, line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/flask/app.py&quot;, line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/connexion/decorators/decorator.py&quot;, line 48, in wrapper
    response = function(request)
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/connexion/decorators/uri_parsing.py&quot;, line 144, in wrapper
    response = function(request)
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/connexion/decorators/validation.py&quot;, line 384, in wrapper
    return function(request)
  File &quot;/ariel/anaconda3/lib/python3.7/site-packages/connexion/decorators/parameter.py&quot;, line 121, in wrapper
    return function(**kwargs)
  File &quot;./registrations.py&quot;, line 58, in read_maa_non_passive
    for row in cursor_ariel.fetchall():
cx_Oracle.DatabaseError: ORA-12592: TNS:bad packet
Getting data and status code
</code></pre>
<p>----UPDATE---------</p>
<p>All my problems went away when I stopped connection pooling in cx_Oracle.  I originally had a single connection to oracle shared across the Flask application.  This have me failures in stress testing.  So I tried to be clever and use SessionPooling and acquire connections and release them at each service call.  Finally I went back to &quot;bad practice&quot; and create a completely new connection to Oracle for every single function call (api endpoint), and I now get 100% success rate across stress testing in Locust, even for the larger response calls which are 30mb json payloads.</p>
",https://stackoverflow.com/questions/64377736/cx-oracle-databaseerror-ora-12592-tnsbad-packet,"['python', 'oracle', 'rhel', 'cx-oracle']",1378,True,0,2
Akka Grpc client many connections UNAVAILABLE: io exception,"<p>I am using akka grpc ( v 10.2.0 ),</p>
<p>I am creating 100 clients in parallel ( stress testing the grpc server ).
From time to time, on client side I see errors like:</p>
<pre><code>o.grpc.netty.shaded.io.netty.channel.unix.Errors$NativeIoException: writevAddresses(..) failed: Broken pipe
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
    at io.grpc.Status.asRuntimeException(Status.java:533)
    at akka.grpc.internal.AkkaNettyGrpcClientGraphStage$$anon$1.onCallClosed(AkkaNettyGrpcClientGraphStage.scala:165)
    at akka.grpc.internal.AkkaNettyGrpcClientGraphStage$$anon$1.$anonfun$callback$1(AkkaNettyGrpcClientGraphStage.scala:71)
    at akka.grpc.internal.AkkaNettyGrpcClientGraphStage$$anon$1.$anonfun$callback$1$adapted(AkkaNettyGrpcClientGraphStage.scala:67)
    at akka.stream.impl.fusing.GraphInterpreter.runAsyncInput(GraphInterpreter.scala:466)
    at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:498)
    at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:600)
    at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:769)
    at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:784)
    at akka.actor.Actor.aroundReceive(Actor.scala:537)
    at akka.actor.Actor.aroundReceive$(Actor.scala:535)
    at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:691)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:577)
    at akka.actor.ActorCell.invoke(ActorCell.scala:547)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
    at akka.dispatch.Mailbox.run(Mailbox.scala:231)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: io.grpc.netty.shaded.io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: Connection reset by peer
</code></pre>
<p>but on server all is fine, no errors.
Sometimes this client ( which generated 100 connections in parallel ) is just hanging.
Stream hangs no errors.</p>
<p>If I will restart client, all will start working fine, so server is ok.
Not sure where to look for an issue ?</p>
",https://stackoverflow.com/questions/64026121/akka-grpc-client-many-connections-unavailable-io-exception,"['akka', 'akka-grpc']",2065,False,1,0
Application is not serving the request when connection pool reaches to maximum number of connections,"<p>I seen a strange issue while doing stress testing. Following is my spring configuration.</p>
<pre><code>spring:   
  datasource:
    communicationtimeout: 60000
    jpa:
      hibernate:
        ddl-auto: none
    hikari:
      connection-timeout: 30000
      idle-timeout: 600000
      max-lifetime: 1800000
      maximum-pool-size: 25
      minimum-idle: 3
  jpa:
    hibernate:
      naming:
        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
    database-platform:  org.hibernate.dialect.MySQL5InnoDBDialect
</code></pre>
<p>When the number of db connections reach to 25 (maximum-pool-size: 25), I observed that the request going to this VM are not serving and went to infinite loop. I do not see any error in the logs. I would like to know how to find the root cause or what is causing this issue?</p>
<p><strong>NOTE</strong>
After we stopped the stress test too, this VM is not serving the new requests.</p>
<p>Spring boot version: 2.0.3.RELEASE</p>
<p>Thanks,
Hari</p>
",https://stackoverflow.com/questions/64227481/application-is-not-serving-the-request-when-connection-pool-reaches-to-maximum-n,"['spring-boot', 'jpa', 'hikaricp']",141,False,0,0
What can cause an unexpected takeover of execution by the System process pid 4 on Windows?,"<p>We are working on stress testing of an application and noticed a curious case where Windows kernel takes over execution of the stress test. The application under the stress test picks up system-wide IO events, mostly CRUD of files, using minifilter driver, similar to this <a href=""https://github.com/Microsoft/Windows-driver-samples/blob/master/filesys/miniFilter/passThrough/README.md"" rel=""nofollow noreferrer"">passthough driver</a>.</p>
<p>During the stress test using <a href=""https://github.com/Microsoft/diskspd"" rel=""nofollow noreferrer"">spddisk</a> on one particular VM (Windows Server 2019 1809 17763.864 with no external AV or other security software installed), we noticed that <code>System</code> process with reserved pid <code>4</code> is &quot;taking over&quot; the stress payload execution. The same seems to be happening with a simple batch script as well (create, read, delete a file in a loop). I have never seen anything like this on any other systems and we cannot reproduce this behaviour anywhere else but on that single VM.</p>
<p>The &quot;taking over&quot; occurs after a few seconds into executing of the stress test and manifests itself in the following way:</p>
<ul>
<li>Process id is changed to System reserved pid 4</li>
<li>Thread id is changed to another <code>tid</code></li>
<li>User SID is changed from <code>S-1-5-21-2874696658-2485333267-3621126573-500</code> to <code>S-1-5-18 </code></li>
<li>User is changed from <code>win-saacuiping\administrator</code> to <code>NT AUTHORITY\SYSTEM</code></li>
</ul>
<p>We have captured this in <a href=""https://learn.microsoft.com/en-us/sysinternals/downloads/procmon"" rel=""nofollow noreferrer"">procmon</a></p>
<p><a href=""https://i.stack.imgur.com/9muVl.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/9muVl.png"" alt=""procmon dump"" /></a></p>
<p>This feels like some sort of sandboxing, but I've never actually seen this before. The simplified command used for stress testing is this</p>
<pre><code>diskspd.exe -c100b -b1K -t2 -d60 -w50 -W0 -Sh f1.tmp
</code></pre>
<p><strong>Can anyone please explain, why execution is suddenly passed from one process to Windows kernel System 4?</strong></p>
",https://stackoverflow.com/questions/62873455/what-can-cause-an-unexpected-takeover-of-execution-by-the-system-process-pid-4-o,"['windows', 'kernel', 'sandbox', 'stress-testing', 'procmon']",83,False,0,0
How to prevent MongoDB nodeJS driver to crash my entire app/process in case of failure?,"<p>I'm currently stress-testing a nodeJS API which is integrating a MongoDB connection.</p>
<p>It works fine when not too many concurrent connections are being handled (1 per second, and every connection closed after transaction), but when the number of concurrent connections is growing significantly, the connection is crashing and so is my process and then I've got to restart manually the server.</p>
<pre class=""lang-js prettyprint-override""><code>Error: Module did not self-register: '/Users/david/myproject/node_modules/fs-ext/build/Release/fs-ext.node'.
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1142:18)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Module.require (node:internal/modules/cjs/loader:972:19)
    at require (node:internal/modules/cjs/helpers:88:18)
    at Object.&lt;anonymous&gt; (/Users/david/myproject/node_modules/fs-ext/fs-ext.js:22:15)
    at Module._compile (node:internal/modules/cjs/loader:1083:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
</code></pre>
<p>Is there any way to prevent the server to crash and to handle this exception rather than having to restart it every time it fails like that?</p>
<p>Here's my code:</p>
<pre class=""lang-js prettyprint-override""><code>Promise.resolve(MongoClient.connect(`${url}`, {
            useNewUrlParser: true,
            useUnifiedTopology: true,
            numberOfRetries: 3
        }))
            .then((db) =&gt;  {
               // interact with the database
            })
</code></pre>
<p>MongoDB is dockerized, and I'm using <code>NodeJS v15.0.1</code>,
The driver is <code>&quot;mongodb&quot;: &quot;3.6.3&quot;</code></p>
",https://stackoverflow.com/questions/64798511/how-to-prevent-mongodb-nodejs-driver-to-crash-my-entire-app-process-in-case-of-f,"['node.js', 'mongodb', 'exception', 'database-connection']",81,False,1,0
Can&#39;t seem to set the tasks for Locust with Clarifai API,"<p>aI am trying to use Locust to do stress testing for a model I made with Clarifai's API. I seem to have most of the stuff working but I can't seem to get the syntax of task assignment to work properly. The UI is working, the locust swarm works, I can get the stats in a csv but it isn't executing the task defined here which is the prediction being made to a custom model.</p>
<p>This is my function that is making the actual call.</p>
<pre><code>import gevent
from gevent import monkey
monkey.patch_all()

from clarifai.rest import ClarifaiApp, Workflow
import random
from locust import task, TaskSet, between, User

import app_settings. #contains some hardcoded values as a script. 
from locust_utils import ClarifaiLocust, locust_call
      

class ApiUser(ClarifaiLocust):
    min_wait = 1000
    max_wait = 3000
    wait_time = between(2,5)

    def on_start(self):
        # self.small_model = self.client.get_app('model-specialization-demo-pt2').workflows.get('locust-vehicle-det')
        self.small_model = self.client.get_app('app_id').workflows.get('locust-vehicle-det')

    @task
    def predict_small_model(self):
        locust_call(
            self.small_model.predict_by_url,
            'predict to Public Vehicle Detector',
            url=random.choice(app_settings.small_app_urls)

        )
</code></pre>
<p>The functions being referred as ClarifaiLocust and locust_call are below</p>
<pre><code>def locust_call(func, name, *args, **kwargs):
  start_time = time.time()
  try:
    func(*args, **kwargs)  # Don't really care about results for stress test
  except ApiError as e:
    total_time = int((time.time() - start_time) * 1000)
    events.request_failure.fire(
        request_type='Client', name=name, response_time=total_time, exception=e)
  else:
    total_time = int((time.time() - start_time) * 1000)
    events.request_success.fire(
        request_type='Client', name=name, response_time=total_time, response_length=0)


class ClarifaiLocust(HttpUser):
  test_app = None
  search_app = None
  wait_time = between(2,5)

  def __init__(self, *args, **kwargs):
    # Locust.__init__(self, *args, **kwargs)
    User.__init__(self, *args, **kwargs)
    #super(ClarifaiLocust, self).__init__(*args, **kwargs)
    self.client = ClarifaiUser(self.host)
</code></pre>
<p>but I keep getting this error.</p>
<pre><code>raise Exception(&quot;No tasks defined. use the @task decorator or set the tasks property of the User&quot;)
Exception: No tasks defined. use the @task decorator or set the tasks property of the User
</code></pre>
<p>What am I doing wrong here?</p>
",https://stackoverflow.com/questions/64382704/cant-seem-to-set-the-tasks-for-locust-with-clarifai-api,"['python', 'stress-testing', 'locust']",591,True,1,1
JMeter stress testing the TPS can&#39;t be improved,"<p>I am using JMeter to do stress testing to my project.</p>

<p>I set the Constant Throughout Timer as 20/s, and last for 100s. But the actual is: the TPS most get 7/s, and never get 20/s. I don't know why is this.  </p>

<p>I want to ask 2 questions:
1、As my understanding,  the JMeter can simulate the stress so it can get TPS at 20/s, is there any config wrong of my JMeter?
2、If for other case, the Jmeter can simulate the stress only depend on the server, is it mean there is problem with my server lead to the TPS can't be improved? </p>
",https://stackoverflow.com/questions/59933991/jmeter-stress-testing-the-tps-cant-be-improved,"['java', 'testing', 'jmeter', 'stress-testing', 'jmeter-5.0']",916,True,0,1
Is there a problem with passing variable to command-prompt from powershell?,"<p>I have a script for stress testing networks in batch, and it has been working fine for me and doing exactly what I wanted it to do. I recently tried to remake it in powershell, and overall it was the same, except for one detail. Whenever I tried to start new command prompts with <code>start cmd.exe -argumentlist {/k ping $p /l $Bytes /t} -windowstyle Minimized</code>, it starts cmd, but it gets lost at the <code>$p</code> saying <code>Ping request could not find host $p. Please check the name and try again.</code> instead of actually passing the variable. I have been stumped for a while and couldn't find what was causing this issue since when I passed other variables to set the title of the prompts, it worked fine. The variable <code>$p</code> isn't getting undefined either, so I don't know what is causing this. </p>

<p>Here are my scripts</p>

<p>Batch file:</p>

<pre class=""lang-bat prettyprint-override""><code>@echo off
title MainPingCenter
(call )
choice /c DC /m ""Would you like to ping the default gateway or a custom IP/Web Address?""
IF %ERRORLEVEL% EQU 1 ((for /f ""tokens=2,3 delims={,}"" %%a in ('""WMIC NICConfig where IPEnabled=""True"" get DefaultIPGateway /value | find ""I"" ""') do (echo Default IP Gateway : %%~a &amp; set i=%%~a))
    goto add)
set /p i=""Type in the IP address or website address you want to ping: ""

:add
set /p loopcount=""How many cmds do you want to ping with? ""
set /p Bytes=""How many bytes of data do you want to ping with? ""
set /a loopcount=loopcount+1

:loop
set /a loopcount=loopcount-1
if %loopcount% LEQ 0 (goto exitloop)
start /min cmd.exe /k ping %i% /l %Bytes% /t
goto loop

:exitloop
echo Success
echo Commands are running in background
pause

:back
choice /c CP /m ""Would you like to create more ping cmds or proceed? ""
IF %ERRORLEVEL% EQU 1 goto add
IF %ERRORLEVEL% EQU 2 goto choose

:choose
(call )
choice /c YNTC /m ""Would you like to close all cmd processes? (Yes, No, Timer, Cancel)""
IF %ERRORLEVEL% EQU 1 goto yes
IF %ERRORLEVEL% EQU 2 goto no
IF %ERRORLEVEL% EQU 3 goto timer
IF %ERRORLEVEL% EQU 4 goto back

:yes
echo Closing all instances of cmd excluding this...
taskkill /im cmd.exe /t /f /fi ""windowtitle ne MainPingCenter""
echo Taskkill complete. Press any key to continue...
pause &gt;nul
title Command Prompt
goto :eof

:no
echo Ok, press any key to end this file...
pause &gt;nul
title Command Prompt
goto :eof

:timer
set /p timer=""Set amount of seconds until processes are closed: ""
choice /c YN /m ""Would you ike it to close automatically when the time is finished? ""
IF %ERRORLEVEL% EQU 1 (timeout /t %timer% /nobreak &amp; goto yes)
timeout /t %timer% /nobreak
echo Time is up. Press any key to terminate all command prompts
pause &gt;nul
goto yes
</code></pre>

<p>Powershell</p>

<pre class=""lang-ps1 prettyprint-override""><code>$host.ui.RawUI.WindowTitle = ""Main Ping Center""
while (!($p)) {
    $choice = read-host ""Do you want to ping the default gateway, localhost, or a custom address? `n[D,L,C]""
    switch ($choice) {
        ""D"" {$p = WMIC NICConfig where IPEnabled=""True"" get DefaultIPGateway /value |findstr ""{""; $p = $p.trimstart('DefaultIPGateway={""'); $p = $p.trimend('""}'); break}
        ""L"" {$p = ""localhost""; break}
        ""C"" {$p = read-host ""What address do you want to ping?""; break}
    }
    if (!($p)){echo ""Invalid input""}
}
$p
while (!($lc -is [int])){
    $lc = read-host ""How many cmds do you want to ping with? ""
    $ErrorActionPreference = 'SilentlyContinue'
    [int]$lc = $lc
    if (!($lc -is [int])){echo ""Invalid input""}
}
while (!($bytes -is [int])){
    $Bytes = read-host ""How many bytes of data do you want to ping with? ""
    $ErrorActionPreference = 'SilentlyContinue'
    [int]$bytes = $bytes
    if (!($bytes -is [int])){echo ""Invalid input""}
}
$ErrorActionPreference = 'continue'
$nametitle = (Get-Random)*([math]::pi)*(Get-Random)
$p
do {
    start cmd.exe -argumentlist {/k title $nametitle `&amp; ping $p /l $Bytes /t} -windowstyle Minimized
    # Variable ""$nametitle"" gets passed normally but even if I remove the title and ""&amp;"", $p never gets passed
    $lc--
} until ( $lc -eq 0 )
write ""Success`nCommands are running in background""
pause
while (!($C2)) {
    $choice2 = read-host ""Would you like to close all cmd processes? (Yes/Y, No/N, Timer/T)""
    switch ($choice2) {
        ""Yes"" {$C2 = ""Yes""}
        ""Y"" {$C2 = ""Yes""}
        ""No"" {$C2 = ""No""}
        ""N"" {$C2 = ""No""}
        ""Timer"" {$C2 = ""Time""}
        ""T"" {$C2 = ""Time""}
    }
    if (!($C2)){echo Invalid input}
}
switch ($C2) {
    ""Yes"" {echo ""Closing all instances of cmd excluding this...""
        taskkill /im cmd.exe /t /f /fi ""windowtitle eq $nametitle""
        echo ""Taskkill complete. Press any key to continue...""
        pause | out-null
        exit}
    ""No"" {cd ""$home\desktop"" 
        echo $nametitle &gt; PingName.txt
        echo ""Ok, sending name of ping cmds to text file...""
        echo ""Press any key to exit this file...""
        pause | Out-Null
        exit}
    ""Time"" {$timer = read-host ""Set amount of seconds until processes are closed""
        timeout /t $timer /nobreak
        echo ""Closing all instances of cmd excluding this...""
        taskkill /im cmd.exe /t /f /fi ""windowtitle eq $nametitle""
        echo ""Taskkill complete. Press any key to continue...""
        pause | out-null
        exit}
}
</code></pre>
",https://stackoverflow.com/questions/61843530/is-there-a-problem-with-passing-variable-to-command-prompt-from-powershell,"['powershell', 'batch-file', 'cmd', 'ping']",209,False,2,0
Stress testing Web API,"<p>I was hoping to get some direction or advice with regards to some trouble I'm having with trying to do some stress testing against a Web API for a client. It is a RESTful WEB API that I'm testing against. I've been creating a list of Tasks that run asynchronously that all call the WEB API but they take a very long time to execute and some just time out. I don't believe that it's throttling the service because I can still call the service in Fiddler on the same machine the test code is running on and it successfully calls the service while the asynchronous tasks are failing so it seems to be an issue with my testing code. Each task creates its own HttpClient and HttpRequestMessage.</p>

<p>Any advice would be appreciated.</p>
",https://stackoverflow.com/questions/60093771/stress-testing-web-api,"['c#', 'asp.net-web-api']",202,False,0,0
BotFramework loadtesting with BotServiceStressToolkit and MockChannel. Problem to obtain data from MockChannel,"<p>Maybe I will find anyone, who faced the problem of stress testing for Bot Framework.
I have got acquainted with the chaing MockChannel and BotServiceStressToolkit:
<a href=""https://github.com/microsoft/BotFramework-BlogSamples/tree/master/blog-samples/CSharp/MockChannel"" rel=""nofollow noreferrer"">https://github.com/microsoft/BotFramework-BlogSamples/tree/master/blog-samples/CSharp/MockChannel</a>
<a href=""https://github.com/damadei/BotServiceStressToolkit"" rel=""nofollow noreferrer"">https://github.com/damadei/BotServiceStressToolkit</a></p>
<p>initial data:
Bot deployed on azure. MockChannel deployed also in azure (in kubernetes cluster). Try to test from local computer.</p>
<p>I have created MockChannel, published it to azure (to kubernetes) and set up a connection for deployed bot. After configuring Jmeter and new test plan, there is no problem to send messages to bot, and bot also responses to MockChannel. The problem is - I can't connect to my MockChannel for obtain responses from callback server.</p>
<p>And I don't know why it happens. Mb I need to run load tests also in kube. If any have a success history of this combination?</p>
",https://stackoverflow.com/questions/65448622/botframework-loadtesting-with-botservicestresstoolkit-and-mockchannel-problem-t,"['c#', 'azure', 'botframework']",84,False,1,0
Concurrent WriteConflict with MongoDB and NodeJs,"<p>I'm creating an application that serves transportation order, while I'm stress testing the application by injecting about 100 orders simultaneously, the mongodb hits WriteConflict due to the numeric sequence id (<strong>nid</strong> it is required) that I created using the hook. I have tried to add <code>?retryWrites=true&amp;w=majority</code> into the connection URI and set those in the transaction level, but none of those work. May I know any parts that I'm missing and should give a try (Knowing that is critical section, and using lock/queue should fix, but want to know any other way)? Thank you very much.</p>

<p>The schema for sequence and order (will keep _id that default created, and mongoose did the thing so haven't mention in the schema)</p>

<pre><code>const SequenceSchema = new Schema&lt;ISequenceDoc&gt;(
  {
    collectionName: {
      type: String,
      trim: true,
      required: true
    },
    nid: {
      type: Number,
      required: true
    }
  },
  {
    collection: 'sequences',
    timestamps: true
  }
);

const OrderSchema = new Schema&lt;IOrderDoc&gt;(
  {
    name: {
      type: String,
      trim: true,
      required: true
    },
    nid: {
      type: Number
    }
  },
  {
    collection: 'orders',
    timestamps: true
  }
);
</code></pre>

<p>Pre saving hook to assign an numeric id index of hex id to the schema</p>

<pre><code>OrderSchema.pre('save', async function(next) {
    if (this.isNew) {
      const data = await this.db.model&lt;ISequenceDoc&gt;('Sequence').findOneAndUpdate(
        {
          collectionName: this.collection.collectionName
        },
        {
          $inc: { nid: 1 }
        },
        {
          upsert: true,
          new: true,
          session: this.$session()
        }
      );
      this.set('nid', data.nid);
    }
    next();
});
</code></pre>

<p>The code that create the order model and save</p>

<pre><code>async createOrder(orderInfo) =&gt; {
const session = await this.connection.startSession();
session.startTransaction({
  readConcern: {
    level: 'majority'
  },
  writeConcern: {
    w: 'majority',
    j: true
  }
});
......
await order.save({session});
await session.commitTransaction();
return order;
}
</code></pre>
",https://stackoverflow.com/questions/62144207/concurrent-writeconflict-with-mongodb-and-nodejs,"['node.js', 'mongodb', 'mongoose']",971,True,1,1
Multi user e2e testing with puppeteer,"<p>I am looking for a product that would allow me simulate/test multiple (more than two) users, each logged in to their account, use a web application.</p>
<p>Having multiple users in the test is not to simulate high load as is the case of stress testing; nor it is to make for shorter test time with parallel testing. The reason is to test if the application behaves correctly when users interact with each other.</p>
<p>So basically each user will have their own session cookie sent with ajax or ordinary GET and POST requests they send.</p>
<p>The users each could live in a separate window or be in an iframe on a single page.</p>
<p>Reading through these issues I could not say for sure if this is possible in the latest version of puppeteer or not. Can this be achieved?</p>
<p>Issues:</p>
<ul>
<li><a href=""https://github.com/pyppeteer/pyppeteer/issues/5"" rel=""nofollow noreferrer"">https://github.com/pyppeteer/pyppeteer/issues/5</a></li>
<li><a href=""https://github.com/puppeteer/puppeteer/issues/4413"" rel=""nofollow noreferrer"">https://github.com/puppeteer/puppeteer/issues/4413</a></li>
</ul>
",https://stackoverflow.com/questions/63013903/multi-user-e2e-testing-with-puppeteer,"['automated-tests', 'puppeteer', 'e2e-testing', 'functional-testing']",727,False,2,1
AWS EC2: Internal server error when huge number of api calls at the same time from jmeter,"<p>We have made the backend of a mobile AP in laravel and mysql. The application is hosted on AWS Ec2 and using RDS mysql database.</p>
<p>We are stress testing the app using jmeter. When we send upto 1000 API requests from jmeter, it seems to work fine. However, when we send more than 1000 (roughly) requests in parallel, The jmeter starts getting internal server error (500) as a response for many requests. the internal 500 error percentage increases as we increase the number of APIs</p>
<p>Normally, we would expect that if we increase the APIs, they should be queued and the response should slow if the server is out of resources. We also monitored the resources on the server and they never reached even 50% of the available resources</p>
<p>Is there any timeout setting or any other possible setting that I could tweak so that the we dont get the internal server error before reaching 80% of the resource usage</p>
<p>Regards
Syed</p>
",https://stackoverflow.com/questions/63347279/aws-ec2-internal-server-error-when-huge-number-of-api-calls-at-the-same-time-fr,"['php', 'mysql', 'amazon-ec2', 'jmeter', 'amazon-rds']",1195,True,1,1
Creating a bash script that logs the output of &#39;watch lsusb&#39; into an empty file,"<p>I have an embedded Linux system (running Ubuntu 10) on a microprocessor that has an onboard USB hub (specifically a BeagleBone Black).</p>
<p>I made a simple bash script that's supposed to run a command, <code>watch lsusb</code>; and as that runs, my program needs to dump the output my command generates into a text or JSON file (ideally on a USB stick, called <code>usb0</code> for the sake of the example).</p>
<p>So far, this is what I have:</p>
<pre><code>#!/bin/bash
#DATE=$(date +'%F %H:%M:%S')
DIR=/home/ubuntu/lsusb_logs
CMD='watch lsusb'
$CMD &gt; $DIR
</code></pre>
<p>This runs until I stop it, which is fine. But when I go to look at my now created <code>lsusb_logs</code> file, all the data appears to be either encoded or needs to be formatted because its not at all like the original format a single <code>lsusb</code> or even <code>watch lsusb</code> outputs.</p>
<p>The purpose of this script is to gather historical data of the peripherals on the USB hub state over a 24 hour period in an environment chamber (climate stress testing).</p>
<p>Any advice or insight is helpful, thanks.</p>
",https://stackoverflow.com/questions/64071250/creating-a-bash-script-that-logs-the-output-of-watch-lsusb-into-an-empty-file,"['linux', 'bash', 'shell', 'watch', 'lsusb']",768,True,0,2
Java.Lang.IllegalArgumentException: invalid Bitmap format Intermittently on startup,"<p>I am doing stress testing on a variety of android devices, using Firebase Testlab, and am getting an unusual exception occurring (on some cloud test devices) that results in a black screen when loading textures on startup. We have the main activity onCreate() generating MainPage, which then runs Init() which loads textures. It also dumps textures onPause and reloads onResume via calling Init() again. Here is the error:</p>

<pre><code>Java.Lang.IllegalArgumentException: invalid Bitmap format
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at offset 12
at Java.Interop.JniEnvironment.StaticMethods.CallStaticVoidMethod(Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) at offset 110
at Java.Interop.JniPeerMembers.JniStaticMethods.InvokeVoidMethod(System.String encodedMember, Java.Interop.JniArgumentValue* parameters) at offset 24
at Android.Opengl.GLUtils.TexImage2D(System.Int32 target, System.Int32 level, Android.Graphics.Bitmap bitmap, System.Int32 border) at offset 112
at DoodleSmash.Droid.MainActivity.LoadTexture(System.String name) at offset 65
at DoodleSmash.MainPage.Init() at offset 689
</code></pre>

<p>It seems to think the bitmap is in the wrong format, but I have never seen this issue with other devices, I have run emulators and several physical devices locally. Here is the load texture code:</p>

<pre><code>public int LoadTexture(string name)
        {
            var assembly = IntrospectionExtensions.GetTypeInfo(typeof(MainActivity)).Assembly;
            System.IO.Stream stream = assembly.GetManifestResourceStream(""DoodleSmash.Droid."" + name);

            Android.Graphics.Bitmap bm = Android.Graphics.BitmapFactory.DecodeStream(stream);

            int tex;
            GL.GenTextures(1, out tex);
            GL.BindTexture(TextureTarget.Texture2D, tex);

            GLUtils.TexImage2D((int)TextureTarget.Texture2D, 0, bm, 0);

            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Repeat);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Repeat);

            return tex;
        }
</code></pre>

<p>TexImage2D is the function that appears to be failing, I really don't know why. Any ideas? It is intermittent and occurs on startup, inconsistently. The images are all PNGs. Maybe I need to clear all texture memory first in the onCreate function? Any help would be greatly appreciated.</p>
",https://stackoverflow.com/questions/60021242/java-lang-illegalargumentexception-invalid-bitmap-format-intermittently-on-star,"['c#', 'android', 'xamarin', 'opengl', 'opentk']",389,True,1,1
Firebase cloud transactions not always finishing,"<p>I am attempting to update the average rating of a <code>restaurant</code> document in my Firestore database with a transaction when a new <code>review</code> is posted in the sub-collection <code>reviews</code>. The following code works for when reviews come in slowly but if I run some stress testing by inserting 10 reviews within a few seconds it will no longer update the average rating properly (i.e. it may only count the first 5 reviews and not update based on the rest). My understanding of transactions was that it will re-run automatically when the data has changed beneath its feet to ensure it is properly updating the values.</p>
<p>Here is the cloud function used.</p>
<pre><code>exports.reviewCreated = functions.firestore.document('/restaurants/{restaurantid}/reviews/{reviewid}').onCreate((snapshot, context) =&gt; {

    const rest_id = context.params.restaurantid;
    const rest_ref = admin.firestore().collection('restaurants').doc(rest_id)
    const rest_rating = snapshot.data().rest_rating;

    console.log('The new rest rating is: ' + rest_rating);
    try {
        admin.firestore().runTransaction((t) =&gt; {
            return t.get(rest_ref).then((rest_doc) =&gt; {
                const new_total_reviews = rest_doc.data().totalReviews + 1;
                const current_avg_rating = rest_doc.data().averageRating

                const new_avg_rating = current_avg_rating + ((rest_rating - current_avg_rating)/new_total_reviews);
                t.update(rest_ref, {totalReviews: new_total_reviews,
                                averageRating: new_avg_rating});
            });
        })

    } catch (e) {
        console.log('[Review Created] Transaction Failed', e);
        return null;
    }
});
</code></pre>
<p>To test this. I have a button on a debug screen of my app to insert a fake review, the code is as follows</p>
<pre><code>&lt;Button title = 'Add Review! (Test)' 
    onPress = {() =&gt; 
    {
        console.log(this.state.uid);
        var new_uuid = uuid.v4();

        firestore()
        .collection('restaurants')
        .doc(this.state.restid)
        .collection('reviews')
        .doc(new_uuid)
        .set({
            rest_rating: Math.floor(Math.random() * 5) + 1,
            review_name: 'test'
        });
    }}
/&gt;
</code></pre>
<p>I am fairly new to TS and am trying my best to learn the ropes so any readings/videos to watch would also be helpful! :)</p>
",https://stackoverflow.com/questions/63197863/firebase-cloud-transactions-not-always-finishing,"['typescript', 'firebase', 'google-cloud-firestore', 'transactions', 'google-cloud-functions']",154,True,0,1
Spring boot : Thread pool for serving requests on Management port,"<p>We are using a spring boot actuator for exposing liveness and readiness endpoints when running in the Kubernetes cluster.  By default, the spring-boot actuator exposes the endpoint on the default standard HTTP server port where the request is served by Tomcat/Jetty server acceptor and worker thread pools. We recently ran into an issue during our stress testing where all threads in the worker pool were busy and new requests were getting queued.  This caused the pod to crash in the Kubernetes cluster as the liveness probes started failing.</p>
<p>I am considering exposing the actuator on the management port. I wanted to check on the following</p>
<p>a) Are the requests on the management port served a  separate worker thread pool   (from that of the standard server port )?</p>
<p>b) If the answer to a) is no,  is there a way I can configure spring boot to use a separate thread pool for management port  (we are using tomcat/jetty and reactive netty servers across our different micro services)</p>
",https://stackoverflow.com/questions/64069593/spring-boot-thread-pool-for-serving-requests-on-management-port,"['spring-boot', 'spring-boot-actuator']",1533,True,3,1
How both the function act different from each other not in the matter of time complexity,"<p>For the below question where does the both function differ. I have tried stress testing both the function returns the same result. I am trying to submit the <strong>product</strong> function in the competitive programming site it return wrong answer for some test cases, while all the test cases passes for the <strong>max_dot_product</strong> function.</p>
<p><strong>Task</strong>. Given two sequences 𝑎1, 𝑎2, . . . , 𝑎𝑛 (𝑎𝑖
is the profit per click of the 𝑖-th ad) and 𝑏1, 𝑏2, . . . , 𝑏𝑛 (𝑏𝑖
is
the average number of clicks per day of the 𝑖-th slot), we need to partition them into 𝑛 pairs (𝑎𝑖
, 𝑏𝑗 )
such that the sum of their products is maximized.</p>
<p><strong>Input Format</strong>. The first line contains an integer 𝑛, the second one contains a sequence of integers
𝑎1, 𝑎2, . . . , 𝑎𝑛, the third one contains a sequence of integers 𝑏1, 𝑏2, . . . , 𝑏𝑛.</p>
<p><strong>Constraints</strong>. 1 ≤ 𝑛 ≤ 103
; −105 ≤ 𝑎𝑖
, 𝑏𝑖 ≤ 105
for all 1 ≤ 𝑖 ≤ 𝑛.</p>
<p><strong>Output Format.</strong> Output the maximum value of ∑︀𝑛
𝑖=1
𝑎𝑖𝑐𝑖
, where 𝑐1, 𝑐2, . . . , 𝑐𝑛 is a permutation of
𝑏1, 𝑏2, . . . , 𝑏𝑛.</p>
<pre><code>int comp(long long a,long long b)
{
return a&gt;b;
}

 long long max_dot_product(vector&lt;int&gt; a, vector&lt;int&gt; b) {

      std::sort(a.begin(), a.end());
        std::sort(b.begin(), b.end());
    
        vector&lt;long long&gt; c;
        c.reserve(a.size());
    
        std::transform(a.begin(), a.end(), b.begin(), std::back_inserter(c),
                       std::multiplies&lt;long long&gt;());
    
        long long product = std::accumulate(c.begin(), c.end(), 0ll);
    
        return product;
    }
      long long product(vector&lt;int&gt; a, vector&lt;int&gt; b) {
      long long product=0;
      sort(a.begin(),a.end(),comp);
      sort(b.begin(),b.end(),comp);
      for (int i = 0; i &lt; a.size(); i++) {
        product+=a[i]*b[i];
      }
      return product;
    }
</code></pre>
",https://stackoverflow.com/questions/65283897/how-both-the-function-act-different-from-each-other-not-in-the-matter-of-time-co,['c++'],58,True,0,1
Geth service gets killed on multiple concurrent requests of web3.personal.importRawKey function,"<p>I have an ethereum-POA node setup on a VM having below mentioned configurations. Using NodeJS Web3 client, I am trying to create new wallets using the web3.personal.importRawKey function.</p>
<p>VM Configurations Azure VM - Standard D2s v3 (2 vcpus, 8 GiB memory)</p>
<p>As part of our Stress testing, I tried concurrently creating the wallet for 5-10 users, it worked. But when I try to create 15-20 wallets concurrently then the geth process gets killed abruptly and the node stops. On a 1 CPU, 4 GB memory VM, I was able to create at max 4 concurrent wallets. While on 2 vcpus, 8 GiB memory CM, I could process max 10-12 concurrent users.</p>
<p>My concern is the number of concurrent users wallet creation compared to the RAM seems very low and I can't understand why geth processes get killed.One thing I observed was the CPU percentage goes to 200% and then kills the geth node pr</p>
<p>How would I be able to handle at least 1000 concurrent requests to the above-mentioned function to create Blockchain wallets?</p>
<p>Any help will be appreciated.</p>
<p>Thanks in advance!</p>
",https://stackoverflow.com/questions/64263641/geth-service-gets-killed-on-multiple-concurrent-requests-of-web3-personal-import,"['concurrency', 'ethereum', 'rpc', 'wallet', 'geth']",455,False,3,0
Fast method to read and check 11 million Urls from a text file,"<p>We're stress testing one of our environments by trying to see how efficient one of our DNS randomizers work by brute forcing a DNS check from a text file, don't ask, it's one of our engineers' brilliant plan.</p>

<p>The idea has sprung up a bit of a coding challenge in the team and we could not come up with a fast, efficient line of code to get through 11 million records in due time.</p>

<p>Basically, we have a text file containing 11 million derivatives of our randomizer output. We want to read each URL, check if the host can be found and continue if not.</p>

<p>Our initial attempt was to do this in C#, using multi-threading to try and run x-amount of concurrent requests at a time. Based on our calculation, such an approach would take as 3 months to work through the entire file.</p>

<p>We looked at python and calculations points to 6 weeks to work through the same amount of records.</p>

<p>This does not sound correct.</p>

<p>Does any one have an idea of how we can work through all of these records in matter of hours not weeks? Would appreciate any feedback.</p>
",https://stackoverflow.com/questions/60251557/fast-method-to-read-and-check-11-million-urls-from-a-text-file,"['multithreading', 'performance']",75,False,0,0
Stress Test Planning - JMeter,"<p>I am new to Stress Testing and would like to ensure that I am approaching it in a right way.</p>
<p>Out team's objective is to determine whether our application's current back-end infrastructure (AWS API Gateway, AWS Lambda, and AWS MySQL RDS) can support 100,000 daily users. The way I am thinking about this questions is as following:</p>
<p><strong>Input:</strong></p>
<ul>
<li>100K users/day</li>
<li>16 active hours / day - since we have global user base</li>
<li>User spends on average 30 min with the app</li>
</ul>
<p><strong>Planning:</strong></p>
<ol>
<li>Most likely users will not be uniformly distributed over 16 hours, therefore let's use 3 times average which is (100K users / 16 hours) * 3 = <strong>18,750</strong> users / hour</li>
<li>Although, we are expecting users to spend 30min on our app, let's assume that only 10min of that time will end up in the peak zone. Therefore we need to simulate <strong>3,125</strong> concurrent users (18,750users/hour * 10min / 60min)</li>
</ol>
<p><strong>Questions:</strong></p>
<ol>
<li>Is the above logic sound?</li>
<li>What would be the right way to simulate such load in JMeter?</li>
<li>Should we look into number of threads (if yes how many)?</li>
<li>Should we look into the throughput (if yes what value should we be looking for)?</li>
<li>Else?</li>
</ol>
<p>Any advise will be highly appreciated.</p>
<p>Thank you,
gen</p>
",https://stackoverflow.com/questions/64811409/stress-test-planning-jmeter,['jmeter'],289,True,0,2
How to &quot;restart&quot; Cloud MongoDB Atlas Database,"<p>Today I was stress testing multiprocessing in Python against our cloud MongoDB (Atlas).</p>
<p>It's currently running at 100%, and I'd like to do something like a &quot;restart&quot;.
I have found a &quot;Shutdown&quot; command, but I can't find a command to start it up after it has shutdown, so I'm afraid to run just the &quot;Shutdown&quot;.</p>
<p>I have tried killing processes one at a time in the lower right section of the screen below, but after refreshing the page, the same processes numbers are there, and I think there are more on the bottom of the list.  I think they are all backed up.</p>
<p>Doing an insert of a large document does not return to the Python program in 5 minutes.  I need to get that working again (should update in 10-15 seconds as it has in the past).</p>
<p>I am able to open a command window and connect to that server.  Just unclear what commands to run.</p>
<p><a href=""https://i.stack.imgur.com/J1Yfp.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/J1Yfp.jpg"" alt=""enter image description here"" /></a></p>
<p>Here is an example of how I tried to kill some of the processes:</p>
<p><a href=""https://i.stack.imgur.com/bE0Rw.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/bE0Rw.jpg"" alt=""enter image description here"" /></a></p>
<p>Also note that the &quot;Performance Adviser&quot; page is not recommending any new indexes.</p>
<p>Update 1:</p>
<p>Alternatively, can I kill all running, hung, or locked processes?
I was reading about killop here:(<a href=""https://docs.mongodb.com/manual/tutorial/terminate-running-operations/"" rel=""nofollow noreferrer"">https://docs.mongodb.com/manual/tutorial/terminate-running-operations/</a>), but found it confusing with the versions, and the fact that I'm using Atlas.</p>
",https://stackoverflow.com/questions/64454008/how-to-restart-cloud-mongodb-atlas-database,"['mongodb', 'mongodb-atlas']",4789,True,2,1
How do I read the raw bytes stored on an NTFS SD card in Java?,"<p>I'm stress testing an SD card by filling it up with junk data, then continuously re-writing a portion of it to hopefully observe NAND cell degradation. I'm using Java to both read and write .txt files to the NTFS formatted SD card (32 files of 1Gb each), then comparing the data to see if there's any blatant data discrepancies. </p>

<p>However, I would like to go deeper and actually read the bits on the SD card in case the files ever become corrupted enough to render them unreadable (so like a data recovery program). The answers I've found so far either didn't use a <a href=""https://stackoverflow.com/questions/2598418/how-to-read-raw-bytes-from-an-sd-card"">file system</a>, or assumed that the file, and thus file path, had been <a href=""https://stackoverflow.com/questions/17431506/how-to-recover-deleted-files-using-java"">deleted</a>.</p>

<p>It seems that Java doesn't have the API to read low level data without that file path, but in my case that path is never deleted. It's just that the data it points to may have corrupted enough that Java can no longer compare it as a .txt.</p>

<p>Is it possible to read that data? or is using a Native Language the only solution? </p>

<hr>

<p><em>Specifications:</em> I am using Windows. SD cards are formatted NTFS w/16Kb Unit Allocation Size. I'm filling the text files with 16kb MappedByteBuffers repeated until the full Gigabyte file is written (32x times). There are 0 Bytes of usable space remaining on the SD card.</p>

<p>Thanks to everybody in advance :)</p>
",https://stackoverflow.com/questions/62313033/how-do-i-read-the-raw-bytes-stored-on-an-ntfs-sd-card-in-java,"['java', 'filesystems', 'sd-card', 'ntfs', 'data-recovery']",103,False,2,0
Code works well on my computer but I am getting unknown signal 11 problem while submitting it to coursera,"<p><strong>Task.</strong> Given a set of 𝑛 segments {[𝑎0, 𝑏0], [𝑎1, 𝑏1], . . . , [𝑎𝑛−1, 𝑏𝑛−1]} with integer coordinates on a line, find the minimum number 𝑚 of points such that each segment contains at least one point. That is, find a set of integers 𝑋 of the minimum size such that for any segment [𝑎𝑖, 𝑏𝑖] there is a point 𝑥 ∈ 𝑋 such that 𝑎𝑖 ≤ 𝑥 ≤ 𝑏𝑖.</p>
<p><strong>Input Format.</strong> The first line of the input contains the number 𝑛 of segments. Each of the following 𝑛 lines contains two integers 𝑎𝑖 and 𝑏𝑖 (separated by a space) defining the coordinates of endpoints of the 𝑖-th segment.</p>
<p><strong>Constraints.</strong> 1 ≤ 𝑛 ≤ 100; 0 ≤ 𝑎𝑖 ≤ 𝑏𝑖 ≤ 109 for all 0 ≤ 𝑖 &lt; 𝑛.</p>
<p><strong>Output Format.</strong> Output the minimum number 𝑚 of points on the first line and the integer coordinates
of 𝑚 points (separated by spaces) on the second line. You can output the points in any order. If there
are many such sets of points, you can output any set. (It is not difficult to see that there always exist
a set of points of the minimum size such that all the coordinates of the points are integers.)</p>
<p>I have implemented a solution for this problem and tried stress testing on it. It works really well.
But while submitting it to coursera, i am getting <strong>&quot;unknown signal 11&quot;</strong>
Can anyone help me to tackle this ?</p>
<pre><code>#include &lt;algorithm&gt;
#include &lt;iostream&gt;
#include &lt;climits&gt;
#include &lt;vector&gt;

using std::vector;

struct Segment 
{
  int start, end;
};
bool compareByStart(const Segment &amp;a, const Segment &amp;b)
{
    return a.start &lt; b.start;
}
vector&lt;int&gt; optimal_points(vector&lt;Segment&gt; &amp;segments) 
{
  vector&lt;int&gt; points;
  sort(segments.begin(), segments.end(), compareByStart);
  for (long i = 0; i &lt; segments.size(); ++i) 
  {
    int temp=i;
    int min=segments[i].end;
    while(segments[i].start&lt;=segments[temp].end &amp;&amp; i&lt;segments.size())
    {
        if(segments[i].end&lt;min)
        {
            min=segments[i].end;
        }
        i++;
    }
    points.push_back(min);
    i=temp;
    while(segments[i+1].start&lt;=min)
    {
        i++;
    }
  }
  return points;
}

int main() {
  int n;
  std::cin &gt;&gt; n;
  vector&lt;Segment&gt; segments(n);
  for (size_t i = 0; i &lt; segments.size(); ++i) {
    std::cin &gt;&gt; segments[i].start &gt;&gt; segments[i].end;
  }
  vector&lt;int&gt; points = optimal_points(segments);
  std::cout &lt;&lt; points.size() &lt;&lt; &quot;\n&quot;;
  for (size_t i = 0; i &lt; points.size(); ++i) {
    std::cout &lt;&lt; points[i] &lt;&lt; &quot; &quot;;
  }
}
</code></pre>
",https://stackoverflow.com/questions/62797178/code-works-well-on-my-computer-but-i-am-getting-unknown-signal-11-problem-while,"['c++', 'algorithm', 'coursera-api']",104,True,0,1
&quot;RT throttling activated&quot; + kernel panic when flooding UDP packets,"<p>I have an Android application that uses UDP broadcast (multicast actually) to communicate messages between devices. In my stress testing I have a setup where I have multiple devices sending to each other and receiving responses from each other, all over UDP. At most each device is sending a datagram packet every ~5ms. Since I have 5 devices sending this means a device could be receiving packets up to every ~1ms.</p>

<p>The problem is this causes my devices to reboot, usually within about 10 seconds of starting the tests. Typically 1-3 of the 5 devices under test will reboot.</p>

<pre><code>[  131.986546] sched: RT throttling activated for rt_rq ffffffc0ac098e50 (cpu 1)
[  131.986546] potential CPU hogs:
[  131.986546]  msm_thermal:fre (307)
[  132.000113] ------------[ cut here ]------------
[  132.004692] kernel BUG at XXX/kernel/kernel/sched/rt.c:866!
[  132.013583] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[  132.019101] Modules linked in: XXX core_ctl(PO) qdrbg_module(O) qcrypto_module(O)
[  132.026953] CPU: 1 PID: 307 Comm: msm_thermal:fre Tainted: P        W  O 3.10.84-g2e3fe32-00061-gf40a46d #6
</code></pre>

<p>Looking at rt.c in the kernel source for one device, it crashes on BUG() below:</p>

<pre><code>#ifdef CONFIG_PANIC_ON_RT_THROTTLING
    /*
     * Use pr_err() in the BUG() case since printk_sched() will
     * not get flushed and deadlock is not a concern.
     */
    pr_err(""%s"", buf);
    BUG();
#else
    printk_deferred(""%s"", buf);
#endif
</code></pre>

<p>We do have <code>CONFIG_PANIC_ON_RT_THROTTLING</code> enabled in our kernel. I tried simply disabling that (FWIW Google's kernel configs for its devices have this disabled) and the system still crashes, but at some other point... with absolutely nothing in the kernel log it just cuts off abruptly. </p>

<p>Amazingly this happens across different versions of Android from 5.1 to 8.1, obviously with different Linux kernel versions. All devices are running Qualcomm CPUs (the addition of <code>CONFIG_PANIC_ON_RT_THROTTLING</code> was added by Qualcomm).</p>

<p>Just analyzing this with some common sense, UDP packet delivery must be handled by some RT scheduler... and the fact that the system is needing to throttle this implies that I'm loading the CPU beyond it's capacity... which is hard to believe is possible on a modern CPU by sending UDP packets (and of course, why that'd panic the kernel).</p>
",https://stackoverflow.com/questions/59904709/rt-throttling-activated-kernel-panic-when-flooding-udp-packets,"['android', 'linux', 'networking', 'udp', 'broadcast']",2036,False,3,0
Getting Internal Server Error while performing Stress testing(Load testing) in Apache J-meter,"<p>So we have three development servers(A,B,C).In ""A"" and ""B"" servers we have installed  Tibco Statistica of same version and with same configurations also we have installed Apache J-Meter in C Server .We have constructed a Model in the Statistica which takes input values from excel sheet and gives output. We want to perform Stress testing on these two servers (A,B) using Apache J-meter in ""C"" server, to find out how many requests the model(in Servers A and B) can take in a given time interval.
The server A is working good and we are not getting any errors in the given time interval but we are getting many failures in the Server B(More than 80%)
The Error in the Server B is ""Internal Server Error"" 20% of the requests are getting the response while the rest of the 80% is getting failed
For E.g:- If i pass 60 requests under 20 sec time interval 
1)For Server A all the 60 requests are getting response
2)For Server B only 18-20 requests are getting response and the rest are failing with ""Internal Server Error""
After reading from some blogs about the error i have found that the communication interruption(between the servers) is the main cause of this issue,But in our case there is no interruption and the process monitor was able to capture the events during the time of testing</p>

<p>can anyone please help me out.? </p>
",https://stackoverflow.com/questions/62259912/getting-internal-server-error-while-performing-stress-testingload-testing-in-a,"['jmeter', 'tibco', 'stress-testing', 'statistica']",448,True,1,1
"C++ code passes all test cases and stress testing, but fails online test","<p>I'm a C++ noob, so forgive me if this is a really dumb question. This is a question that I had to code for:</p>
<p><strong>Problem Description:</strong></p>
<p><strong>Task.</strong> Given 𝑛 points on a plane, find the smallest distance between a pair of two (different) points.</p>
<p><strong>Input Format.</strong> The first line contains the number 𝑛 of points. Each of the following 𝑛 lines defines a point (𝑥𝑖, 𝑦𝑖).</p>
<p><strong>Constraints.</strong> 2 ≤ 𝑛 ≤ 10^5; −10^9 ≤ 𝑥𝑖, 𝑦𝑖 ≤ 10^9 are integers.</p>
<p><strong>Output Format.</strong> Output the minimum distance. The absolute value of the difference between the answer
of your program and the optimal value should be at most 10^−3</p>
<p>Input:</p>
<p>2</p>
<p>0 0</p>
<p>3 4</p>
<p>Output:</p>
<p>5.0</p>
<p>(This is a problem from the UC San Diego University DSA course on Coursera).</p>
<p>Stress testing works, and it shows no error, but the Coursera checker throws this output: &quot; Unknown Signal 11&quot;. Now the guidelines say &quot;Unknown signal 6 (or 7, or 8, or 11, or some other). This happens when your program crashes. It can be because of a division by zero, accessing memory outside of the array bounds, using
uninitialized variables, overly deep recursion that triggers a stack overflow, sorting with a contradictory
comparator, removing elements from an empty data structure, trying to allocate too much memory,
and many other reasons.&quot;</p>
<p>Needless to say, that didn't narrow too much down for me. Could someone please tell me where my code fails? Trying to debug is driving me crazy, especially since I have no idea where it is failing. (And the block of if statements is there only because I thought that was where it was causing problems, but apparently not&gt;)</p>
<pre><code>#include &lt;algorithm&gt;
#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;iomanip&gt;
#include &lt;vector&gt;
#include &lt;string&gt;
#include &lt;cmath&gt;
#include&lt;cstdlib&gt;

using std::vector;
using std::string;
using std::pair;
using std::min;
using namespace std;

struct Point {

  long long x;
  long long y;
};

bool comparex(Point a, Point b) {

  if (a.x &lt;= b.x) return true;
  else return false;
}

bool comparey(Point a, Point b) {

  if (a.y &lt;= b.y) return true;
  else return false;
}

double dist(Point a, Point b) {

  double res = 0;
  res = sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));

  return res;
}


double merge(vector&lt;Point&gt; p, int l, int mid, int r, double d) {
  //cout &lt;&lt; &quot;Here1&quot; &lt;&lt; endl;

  vector&lt;Point&gt; strip;
  //cout &lt;&lt; &quot;here2&quot; &lt;&lt; endl;
  int i = 1;

  while (((double)p[mid].x - p[mid - i].x) &lt;= d &amp;&amp; (mid - i) &gt;= l) {

    strip.push_back(p[mid - i]);

    i++;
  }
  //cout &lt;&lt; &quot;here3&quot; &lt;&lt; endl;

  i = 1;

  while (((double)p[mid + i].x - p[mid].x) &lt;= d &amp;&amp; (mid + i) &lt;= r) {
    //cout &lt;&lt; &quot;i &quot; &lt;&lt; i &lt;&lt; endl;
    strip.push_back(p[mid + i]);

    i++;
  }
  //cout &lt;&lt; &quot;here4&quot; &lt;&lt; endl;
  strip.push_back(p[mid]);
  //cout &lt;&lt; &quot;here5&quot; &lt;&lt; endl;


  sort(strip.begin(), strip.end(), comparey);

  /*for (int j = 0; j &lt; strip.size(); j++) {

    cout &lt;&lt; strip[j].x &lt;&lt; &quot; &quot; &lt;&lt; strip[j].y &lt;&lt; endl;
  }*/

  double minimum = d;

  for (size_t j = 0; j &lt; strip.size(); j++) {

    if (j + 1 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 1]));}
    if (j + 2 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 2]));}
    if (j + 3 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 3]));}
    if (j + 4 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 4]));}
    if (j + 5 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 5]));}
    if (j + 6 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 6]));}
    if (j + 7 &lt; strip.size()) {minimum = std::min(minimum, dist(strip[j], strip[j + 7]));}

  }


  return minimum;


}

double minimal_distance(vector&lt;Point&gt; p, int l, int r) {
  //write your code here
  if (l + 1 == r) {
    return dist(p[l], p[r]);
  }

  else if (l + 2 == r) {
    return std::min({dist(p[l], p[l + 1]), dist(p[l], p[l + 2]), dist(p[l + 1], p[l + 2])});
  }


  else {

    sort(p.begin(), p.end(), comparex);

    int mid = (l + r) / 2;

    //cout &lt;&lt; &quot; l &quot; &lt;&lt; l &lt;&lt; &quot; r &quot; &lt;&lt; r &lt;&lt; &quot; mid &quot; &lt;&lt; mid &lt;&lt; endl;

    double d = std::min(minimal_distance(p, l, mid), minimal_distance(p, mid + 1, r));

    //cout &lt;&lt; &quot;left &quot; &lt;&lt; minimal_distance(p, l, mid) &lt;&lt; &quot; right&quot; &lt;&lt; minimal_distance(p, mid + 1, r) &lt;&lt; endl;

    double d1 = merge(p, l , mid, r, d);


    return std::min(d, d1);



  }
}

double naive(vector&lt;Point&gt; p, int l, int r) {


  double minimum = dist(p[l], p[r]);
  for (size_t i = l; i &lt;= r; i++) {

    for (size_t j = i + 1; j &lt;= r; j++) {


      minimum = std::min(minimum, dist(p[i], p[j]));
    }
  }
  return minimum;
}

int main() {

  size_t n;
  std::cin &gt;&gt; n;
  vector&lt;Point&gt; p(n);

  for (size_t i = 0; i &lt; n; i++) {
    std::cin &gt;&gt; p[i].x &gt;&gt; p[i].y;
  }
  std::cout &lt;&lt; std::fixed;
  std::cout &lt;&lt; std::setprecision(9) &lt;&lt; minimal_distance(p, 0, n - 1) &lt;&lt; &quot;\n&quot;;
}

</code></pre>
",https://stackoverflow.com/questions/62910556/c-code-passes-all-test-cases-and-stress-testing-but-fails-online-test,"['c++', 'arrays', 'algorithm', 'compiler-errors']",136,False,0,0
Generate two random numbers so that one is always greater than the other,"<p>I am doing the stress testing for the following problem of my function <code>myFunc()</code>.</p>

<p>There is a stone bridge connecting two cities. The first stone starting from one city is having 1 inscribed on it, and the last stone is on another city side. Each subsequent stone has two consecutive numbers on it except the last stone which may have one or two numbers inscribed on it depending on the value of N.
Stones may be aligned as 1, (2, 3), (4, 5), (6, 7)... N.</p>

<p>You are given a number N representing the last number on the last stone; and a number X. The task is to find the minimum number of jumps you need from either the first city side or the second city side to reach the stone that has X inscribed on it.
Note: Jumping on the first stone will be counted as 0 jumps.</p>

<p>Example:
Input:
2
10 3
5 1</p>

<p>Output:
1
0</p>

<p>Explanation:
Testcase 1: Stone alignment for N = 10 is as follows:
1, (2, 3), (4, 5), (6, 7), (8, 9), 10
To jump on X = 3, you only need one jump (since first stone jump will not be counted) from First city side, and 4 jumps from the second side. So the minimum of 1 and 4 is 1.</p>

<p>Testcase 2: Stone alignment for N = 5 is as follows:
1, (2, 3), (4, 5)
To jump on X = 1, you only need zero jumps (since first stone jump will not be counted) from First city side, and 2 jumps from the second city side. So the minimum of 0 and 2 is 0.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;algorithm&gt;
#include &lt;ctime&gt;
using namespace std;

int myFunc(int n, int p) {
    return p / 2;
}

int findJumps(int n, int p){
    return min(X /2, (N / 2) - (X / 2));
}
int main() {
    int n, x;
    srand(time(0));
    while(true) {

        n = rand() % 40 + 1; // I want n to be always greater than x
        x = rand() % 40 + 1;
        if(myFunc(n, x) != findJumps(n, x)) {
            cout &lt;&lt; n &lt;&lt; "" "" &lt;&lt; x;
            break;
        }

        else cout &lt;&lt; n &lt;&lt; "" "" &lt;&lt; x;
        cout &lt;&lt; endl;
    }
    return 0;
}
</code></pre>

<h2>What I want my code is to generate N always greater than X in the infinite loop scope. How can I enforce this condition?</h2>
",https://stackoverflow.com/questions/60745087/generate-two-random-numbers-so-that-one-is-always-greater-than-the-other,"['c++', 'algorithm', 'random']",775,True,2,2
How to wait for Concurrent ML threads to finish before exiting program?,"<p>I am attempting to implement a basic 'stress testing' program in MLton and its Concurrent ML implementation, specifically the Monte Carlo Pi test described <a href=""https://github.com/kevin-chalmers/cpa-lang-shootout"" rel=""nofollow noreferrer"">here</a>.  While I think I have most of what I need figured out, I have a problem in that my program <em>always</em> terminates before the CML threads have finished their work.  I know that they are doing something, since I sometimes see them print text to the console that I have directed should be printed, but there seems to be a race condition between them getting started and running, and the program as a whole exiting.</p>

<p>The code where I start CML is:</p>

<pre><code>local
    val iterations : int = 10
    val num_threads : int = 1
    val still_going : bool ref = ref true
in
   val _ = (RunCML.doit ((experiment iterations num_threads still_going), NONE);
            (* while !still_going do (); (* Spin-wait for the CML stuff to finish.  This doesn't work... *) *)
            print ""All done!\n"")
end
</code></pre>

<p>the contents of the <code>experiment</code> function are:</p>

<pre><code>fun experiment (iterations : int) (num_threads : int) (still_going : bool ref) () : unit = let
    val iters_per_thread : int = iterations div num_threads
    val return_ivars = Vector.tabulate (num_threads, (fn _ =&gt; SyncVar.iVar()))
    val _ = Vector.map (fn return_ivar =&gt; CML.spawn (montecarlopi iters_per_thread return_ivar)) return_ivars
    val return_val = Vector.foldl (fn (elem, acc) =&gt; acc + (SyncVar.iGet elem)) 0.0 return_ivars
in
    (TextIO.print (""Result is: "" ^ (Real.toString return_val) ^ ""\n"");
            still_going := false)
end
</code></pre>

<p>and finally, the <code>montecarlopi</code> function is:</p>

<pre><code>fun montecarlopi (iterations : int) (return_ivar : real SyncVar.ivar) () = let
    val _ = MLton.Random.srand (valOf (MLton.Random.useed ()))
    fun helper accumulator 0 = accumulator
      | helper accumulator iteration = let
          val x : real = wordToBoundedReal (MLton.Random.rand ())
          val y : real = wordToBoundedReal (MLton.Random.rand ())
          val in_target = (x * x) + (y * y)
          val next_iter = iteration - 1
          val _ = TextIO.print (""next_iter is: "" ^ (Int.toString next_iter) ^ "", in_target is: "" ^ (Real.toString in_target)  ^ "",x is: "" ^ (Real.toString x) ^ "",y is: "" ^ (Real.toString y) ^ ""\n"")
      in
          if in_target &lt; 1.0 then
              helper (accumulator + 1) next_iter
          else
              helper accumulator next_iter
      end
in
    SyncVar.iPut (return_ivar, (4.0 * ((real (helper 0 iterations)) / (real iterations))))
end
</code></pre>

<p>(The full (small) program and accompanying .mlb file can be viewed <a href=""https://github.com/jcoo092/CML_benchmarks/tree/5b775e83d87b3a7db1f7272f95adca6cfd6b9b0c/MLton"" rel=""nofollow noreferrer"">here</a>).  I'm reasonably sure that the bits inside the <code>RunCML.doit</code> function call do what they're supposed to, which leads me to think that the issue is <em>probably</em> to do with the outermost part of the program.</p>

<p>As you can see, I tried to spin wait, using a ref cell on a boolean to determine when to stop, but that doesn't seem to work.  Nor does trying to spin wait using <code>RunCML.isRunning</code> - although both of those sound like terrible ideas to begin with, really, anyway.  Of course, I can't use something like a CML channel or syncvar, since those need to be inside the <code>RunCML.doit</code> segment to be used.  Changing the number of threads doesn't make any difference to this problem.  Nor was I able to find any other functions that would make the main part go into a non-blocking wait.</p>

<p>How do I get the outer part of my program to wait until the bulk of it, inside the <code>RunCML.doit</code> function call, completes?  Or, am I doing something wrong inside that part, which is causing the problem?</p>
",https://stackoverflow.com/questions/60690985/how-to-wait-for-concurrent-ml-threads-to-finish-before-exiting-program,"['sml', 'mlton']",90,True,1,1
Redis lua script doesn&#39;t respect automicity in some case,"<p>I'm trying to have a implement a simple producer-consumer using Java and Redis.
The flow is this: the producer pushes items into Redis. The consumer reads the items from Redis. In order to make the consumer more efficient - it will not read every item alone, but instead will read batch of items. For that, I'm using this flow:</p>
<ul>
<li>Producer push the item to a pending set in Redis.</li>
<li>When the set count exceeds a given threshold, the items are packed into a batch (using JSON) and being saved into a &quot;ready hashmap&quot;.</li>
<li>The consumer reads the ready hashmap and evaluate its content.</li>
<li>The consumer removes the items it consumed from the hashmap.</li>
</ul>
<p>As these operations might cause race conditions, I looked into transactional operations. I understood that the best way to achieve it is with Lua, as redis-lua scripting is atomic.</p>
<p>The script I wrote is this:</p>
<pre><code>local toJsonList = function(items)
    local jsonList = '[' .. table.concat(items, ', ') .. ']'
    return cjson.encode(jsonList)
end

-- Get the batch size (the threshold)
local batchSize = tonumber(ARGV[1])

-- Add the new item
redis.call('SADD', KEYS[1], ARGV[2])

-- Get the number of pending items in Redis
local currentPendingQueueItems = redis.call('SCARD', KEYS[1])

-- Should we move the items from the pending queue to the ready queue?
if currentPendingQueueItems &lt; batchSize then
    return 1
end

-- Fetch the items stored in the pending queue
local pendingItems = redis.call('SMEMBERS', KEYS[1])

-- Store the items in the ready queue hash map
redis.call('HSET', KEYS[3], cjson.encode(KEYS[4]), toJsonList(pendingItems))

-- Remove the pending queue
redis.call('DEL', KEYS[1])
return 1
</code></pre>
<p>The execution is like so:</p>
<pre><code>$ redis-cli --eval addAndSync.lua &quot;pending-queue-key&quot; &quot;ready-queue-key&quot; &quot;unique-key-for-batch&quot; , $THRESHOLD &quot;item to add&quot;
</code></pre>
<p>I started by testing it out individually, and it indeed works fine. The ready queue is synced correctly. I even wrote this script:</p>
<pre><code>#!/bin/bash

END=$1
for i in $(seq 1 $END);
  do redis-cli --eval syncReadyQueue.lua &quot;pending&quot; &quot;ready&quot; &quot;ready${i}&quot; , &quot;3&quot; &quot;${i}&quot; &amp;
done
</code></pre>
<p>Which I ran with <code>END=100</code> to test some insertions at once.</p>
<p>My issue is, after integrating it with Java, I started to stress test it. When stress testing and few threads fired at the same time to handle the produced content - each of then ran <code>addAndSync.lua</code>. I inspected the ready queue after insertion of even only 30 records and noticed that there are duplicates in the ready queue.
That's unexpected to me, as Redis guaranteed that Lua scripts will block any other client call.
My expected behaviour is that every Lua call will block the access to Redis until it will commit its results, and thus the ready queue will have unique items.</p>
<p>I'd love to get any help in understanding what am I missing.
Thanks!!</p>
",https://stackoverflow.com/questions/64704411/redis-lua-script-doesnt-respect-automicity-in-some-case,"['java', 'redis', 'lua', 'race-condition']",240,False,1,0
How to apply load test to Azure Event Hubs triggered consumer function with JMeter to find out consumer&#39;s processing speed to egress speed ratio?,"<p>I have an Event Hubs application that I haven't published Azure yet, so it is running in my local with Azure emulator. </p>

<p>My consumer is an Azure Event Hubs triggered function and running in my local. So there are no multiple function instances; only one function instance backed by a single <code>EventProcessorHost</code> instance running in my local and there are <code>2 partitions in the Event Hub</code>.</p>

<p>The consumer does not do any map/filter operation, but only saves the incoming message to an Azure Blob storage.</p>

<p>I want to do load testing/stress testing with probably JMeter to find out and compare the consumer's processing time with egress(flow of data to consumer from Event Hubs broker). In this way I hope to be able to see whether my consumer is late or not, so the criteria of <code>consumer's processing speed/egress speed</code> is the reason of the load test. </p>

<p>I haven't done load testing with JMeter or any other tool before, but I have learned that you can use it to test things from simple APIs to JMS message brokers. API or web page load testing makes sense and looks straightforward, but I'm struggling to fully grasp how to test pub/sub programs. There are some tutorials like <a href=""https://www.blazemeter.com/blog/apache-kafka-how-to-load-test-with-jmeter"" rel=""nofollow noreferrer"">Apache Kafka - How to Load Test with JMeter</a> I have read, but for .NET side and Event Hub there are no descriptive tutorials that make sense.</p>

<p>Here are my questions:</p>

<ol>
<li>Is it right to run the load test in my local with the consumer function which is running in the Azure emulator and saving to Azure cloud blob storage or should I publish this function to the cloud and run the test in the cloud? Does it affects the results?</li>
<li>I couldn't find any JMeter tutorials specific to Event Hubs, so how can I do it with JMeter? Should I have to write any wrapper program?</li>
<li>Besides JMeter, if it's not suitable for this task, how can I do load testing with any other way?</li>
</ol>
",https://stackoverflow.com/questions/61527934/how-to-apply-load-test-to-azure-event-hubs-triggered-consumer-function-with-jmet,"['azure', 'apache-kafka', 'jmeter', 'load-testing', 'azure-eventhub']",486,False,1,0
Program crashes after having received too many send() messages in a short period of time,"<p>My goal is to write a client-server architecture using TCP sockets in C. I've successfully managed to establish a connection between client and server and send and receive messages in both ways. After receiving a message, the message is being processed by other threads. (It will get enqueued in a queue and another thread works on the queue).</p>

<p>I'm now stress-testing my implementation, by <code>send()</code>ing a lot of messages from the client to the server. </p>

<p>So, what it essentially does is:</p>

<p>My client goes in a for loop and sends X messages using <code>send()</code> to the server. After exiting the for loop, the connection to the server is <code>close()</code>d. This happens all immediately with no delay in between. </p>

<p>The server program works this way: it has a thread where it receives messages and processes the messages by enqueuing them into a queue. After enqueuing it will keep waiting for new messages to arrive. What happens though: The server program will just quit, without any error message, besides that the <code>recv()</code> failed (i.e. returning a -1). </p>

<p>I've noticed the following: the server receives maybe 4000 of 5000 messages before the client calls <code>close()</code>. If I wait in the client until the server has received all messages before the client calling <code>close()</code>, the server does not crash and just continues working. If I don't wait before calling <code>close()</code> the server just stops running. No error message and not even the main function of the server will finish (the main function is actually blocked by a <code>sem_wait()</code>, until some thread <code>sem_post()</code>s the semaphore).</p>

<p>So, what am I doing wrong? How can I make the server to be more robust, even if a client for example crashes during its execution? I don't want the server to be dependent on the client.</p>

<p>Or did I maybe overload the server with sending too many messages with no delay in-between and my scenario is unrealistic? </p>

<p>Here are some parts of my code which are crucial for the send/recv mechanism:</p>

<p>The server:</p>

<pre class=""lang-c prettyprint-override""><code>read_bytes = recv(i, buffer, sizeof(buffer), 0);

// &lt;= 0 bytes read iff client disconnected or error
if (read_bytes &lt;= 0) {
    if(read_bytes == -1) {
        printf(""error: recv() failed on port %s\n"", port);
    } else {
        if(DEBUG_NETWORKING) printf(""server:%s: socket %d disconnected\n"", port, i);
    }

    // Disconnect and remove from master set
    close(i);
    FD_CLR(i, &amp;master_set);
}

// Client wants to tell us something!
else {

    // Test if forcefully connected
    test = (int) buffer[0];

    if(test != 4) { // If it's NOT the EOT character (dec val =4), thus a ""real message""
        if(DEBUG_NETWORKING) printf(""server:%s: received from socket %d (%i bytes) : %s\n"", port, i, read_bytes, buffer);
        // Now call the data handler function that was provided with the function call of connections_handler()
        handler(buffer, read_bytes, i, port);
    }

    // This happens if the client forcefullys quits the process
    // without sending a disconnect signal (it actually sends an EOT character)
    // Catch here this bug.
    else {
        if(DEBUG_NETWORKING) printf(""server:%s: socket %d will disconnect forcefully\n"", port, i);
    }
}
</code></pre>

<p>The client</p>

<pre class=""lang-c prettyprint-override""><code>int rand_item_id;
int rand_amount;
int action;
char msg[256] = """";
int i=0;

while(1) {
    i++;
    if(i==5000) break;
    if (atoi(argv[2]) != 0) {
        usleep(atoi(argv[2]));
    }

    rand_item_id = rand() % atoi(argv[3]);

    // either buy or get, 50/50% chance
    action = rand() % 2;
    if(action == 0) {
        // BUY
        rand_amount = rand() % 20;
        sprintf(msg, ""BUY item_%i %i\n"", i, rand_amount);
    } else {
        // GET
        sprintf(msg, ""GET item_%i\n"", i);
    }
    printf(""%s\n"", msg);

    send(sock, msg, strlen(msg), 0);
}

//sleep(10);
close(sock);
</code></pre>
",https://stackoverflow.com/questions/62022032/program-crashes-after-having-received-too-many-send-messages-in-a-short-period,"['c', 'sockets', 'tcp']",239,True,0,1
ssl error on asio server on https connect,"<p>I took the SimpleWebServer from Eidheim on gitlab (<a href=""https://gitlab.com/eidheim/Simple-Web-Server"" rel=""nofollow noreferrer"">https://gitlab.com/eidheim/Simple-Web-Server</a>) and I wanted to make that https server to also process http and special plain socket queries. They all work, but when stress testing it, https has quite some errors, that I didn't see before my changes. Btw: It is always the same query and as a single query, it works fine. EDIT: The server uses a selfsigned certificate.</p>
<p>With about 3 https queries per second (which is not much) I occasionally get the following errors:</p>
<ul>
<li>sslv3 alert certificate unknown</li>
<li>crash in: SSL_accept (openssl/ssl.h) -&gt; libssl-1_1.dll -&gt; libcrypto-1_1.dll</li>
<li>C:\curl\src\curl.exe -k <a href=""https://192.168.0.228:3012/status"" rel=""nofollow noreferrer"">https://192.168.0.228:3012/status</a>
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 192.168.0.228:3012</li>
</ul>
<p>I am testing with curl in a batch loop with -k for insecure connection:</p>
<pre><code>:START
C:\curl\src\curl.exe -k https://192.168.0.228:3012/status
ping 127.0.0.1 -n 2 &gt; nul
goto START
</code></pre>
<p>I changed the handshake and accept of the server. I read exactly one byte of the stream:
-&gt; determine if it is a signal byte from a socket query
-&gt; else, if the firstbyte is not equal to 0x16 (TLS handshake starts with 0x16, without it it is just an http query)
-&gt; else it is supposed to be an https query</p>
<p>Only for https I read the rest of the handshake data and continue with async_handshake.
Originally async_handshake read the handshake data on its own instead of me providing the sslbuffer to it and I fear that that causes the instability.</p>
<p>EDIT: To see the ssl handshake, that troubles me, skip to //-----------------------MY THIRD CHANGE</p>
<pre><code>auto connection = create_connection(*io_service, context);

acceptor-&gt;async_accept(connection-&gt;socket-&gt;lowest_layer(), [this, connection](const error_code &amp;ec) {
auto lock = connection-&gt;handler_runner-&gt;continue_lock();
if(!lock)
    return;

if(ec != error::operation_aborted)
    this-&gt;accept();

auto session = std::make_shared&lt;Session&gt;(config.max_request_streambuf_size, connection);

if(!ec) {
    asio::ip::tcp::no_delay option(true);
    error_code ec;
    session-&gt;connection-&gt;socket-&gt;lowest_layer().set_option(option, ec);
//-----------------------MY FIRST CHANGE - read first byte
    //read some bytes, needed before the handshake
    const unsigned int bytesToRead = 1;
    int size_of_the_data = 100;
    std::vector&lt;unsigned char&gt; _raw_buffer(size_of_the_data);
    asio::mutable_buffers_1 sslBuffer(asio::buffer(_raw_buffer, size_of_the_data));

    asio::async_read(session-&gt;connection-&gt;socket-&gt;next_layer(), boost::asio::buffer(sslBuffer, bytesToRead), asio::transfer_exactly(bytesToRead), [this, sslBuffer, bytesToRead, session](const error_code&amp; ecRead, std::size_t /*bytes_transferred*/){

    //Get the read data from the buffer in a readable form
    unsigned char * firstByte = asio::buffer_cast&lt;unsigned char*&gt;(sslBuffer);

//-----------------------MY SECOND CHANGE - use first byte to determine if https, http or socket
    if (SocketQuery::CheckForSocketQuery(firstByte[0])) {
        session-&gt;connection-&gt;cancel_timeout();
        auto lock = session-&gt;connection-&gt;handler_runner-&gt;continue_lock();
        if (!lock)
        return;
        session-&gt;isHttps = false;
        this-&gt;read_socket(session, firstByte[0]);
    }
    else if (!SocketQuery::is_client_TLS_handshake(firstByte))
    {
        session-&gt;connection-&gt;cancel_timeout();
        auto lock = session-&gt;connection-&gt;handler_runner-&gt;continue_lock();
        if (!lock)
        return;
        session-&gt;isHttps = false;
        this-&gt;read_http(session, firstByte[0]);
    }
//-----------------------MY THIRD CHANGE - read the handshake manually and pass it to async_handshake
    else
    {
        try
        {
            //read handshake, 4000 Bytes should be way more than any handshake needs (which is something between 200 and 400 bytes usually)
            session-&gt;connection-&gt;socket-&gt;next_layer().async_read_some(boost::asio::buffer(sslBuffer + bytesToRead, 4000), [this, sslBuffer, bytesToRead, session](const error_code&amp; ecReadHandshake, std::size_t bytesOfHandshake) {
                try
                {
                    bytesOfHandshake += bytesToRead;
                    session-&gt;connection-&gt;set_timeout(config.timeout_request);

                    //Use overload of async_handshake with buffer as second parameter
                    //Note that the async callback lambda is expected to take the buffer and buffer size as you see below
                    session-&gt;connection-&gt;socket-&gt;async_handshake(asio::ssl::stream_base::server, asio::buffer(sslBuffer, bytesOfHandshake), [this, sslBuffer, session](const error_code&amp; ecHttps, std::size_t bufferSize) {
                        try
                        {
                            session-&gt;connection-&gt;cancel_timeout();
                            auto lock = session-&gt;connection-&gt;handler_runner-&gt;continue_lock();
                            if (!lock)
                                return;

                            if (!ecHttps)
                            {
                                this-&gt;read(session);
                            }
                            else if (this-&gt;on_error)
                            {
                                this-&gt;on_error(session-&gt;request, ecHttps);
                                wxLogMessage(&quot;server error: &quot; + wxString(ecHttps.message()));
                            }
                            else
                            {
                                wxLogMessage(&quot;server handshake error: &quot; + wxString(ecHttps.message()));
                            }
                        }
                        catch (const std::exception&amp; e)
                        {
                            wxLogMessage(&quot;cought server handshake o3 error: &quot; + wxString(e.what()));
                        }
                    });
                }
                catch (const std::exception&amp; e)
                {
                    wxLogMessage(&quot;cought server handshake o2 error: &quot; + wxString(e.what()));
                }
            });
        }
        catch (const std::exception&amp; e)
        {
            wxLogMessage(&quot;cought server handshake o1 error: &quot; + wxString(e.what()));
        }
    }
    });
}
else if(this-&gt;on_error)
    this-&gt;on_error(session-&gt;request, ec);
      
});
</code></pre>
<p>I tried to stop the server crashing uncontrolled with the try/catches for https, but the crash happens deeper into the ssl accept and I am unable to stop my server crashing so far.
I read before, that it is possible, that a async_read tries to read from the socket, before all the actual data is on it. Maybe I am wrong to think it would be safe to try and read 4000 Bytes from the socket for the handshake. Any idea how to improve that?</p>
<p>EDIT: I just found out: A handshake data set can be greater than 4000 Bytes, if the certificate is rather long. So another question is: How is the handshake data devided from the https header data? Is there also a double newline?</p>
",https://stackoverflow.com/questions/64028830/ssl-error-on-asio-server-on-https-connect,"['c++', 'server', 'openssl', 'boost-asio', 'handshake']",264,False,1,1
Insert 1 million rows in postgresql (nodejs),"<p>I'm creating an app in react-native with a nodejs backend. The app is almost done, and I'm now stress testing the backend.</p>
<p>In my postgresql database, I have a table called notifications to store all the notifications a user receives.</p>
<p>In my app, a user can follow pages. When a page posts a new message, I want to send a notification to all users following that page. Every user should receive an individual notification.</p>
<p>Let's say a page is followed by 1 million users, and the page posts a new message: this means 1 million notifications (eg. 1 million rows) should be inserted into the database.</p>
<p>My solution (for now) is by chunking up the array of user ID's (of the users following the page) into chunks of 1000 user ID's each, and doing an insert query using every chunk.</p>
<pre><code>const db = require('./db');
const format = require('pg-format');

const userIds = [1,2, 3, 4, 5, ..., 1000000];

// split up the user ID's array into chunks of 1000 user ID's each
const chunks = chunkArray(userIds, 1000); // chunkArray is a function that splits up an array 
into multiple arrays with x items, in this case x = 1000;

// loop over each chunk
chunks.forEach(chunk =&gt; {
  const array = [];

  // create an array containing 1000 objects, each containing a user ID, notification type and
  // page ID (for inserting into the database)
  chunk.forEach(userId =&gt; {
    array.push({ userId, type: 'post', pageId: _PAGE_ID_ });
  });

  // create and run the query
  const query = format(&quot;INSERT INTO notifications (userId, type, pageId) VALUES %L&quot;, array);
  const result = await db.query(query);
});
</code></pre>
<p>I'm using node-postgres for the database connection, and I'm creating a connection pool. I fetch one client from the pool, so only 1 connection is used for all the queries in the forEach-loop.</p>
<p><strong>This all works, but inserting 1 million rows takes a few minutes. I'm not sure this is the right way to do this.</strong></p>
<hr />
<p>Another solution I came up with is using &quot;general notifications&quot;. When a page updates a post, I only insert 1 notification into the notifications table, and when I query for all notifications for a specific user, I check which pages the user is following, and fetch all the general notifications of that page with the query. Would this be a better solution? I would leave me with A LOT less notification-rows and I think it would increase performance.</p>
<hr />
<h2>Thank you for all responses!</h2>
<p>I'm trying to implement my other solution. When a page updates a post, I insert only one notification without a user ID (because it has no specific destination), but with the page ID.</p>
<p>When I fetch all the notifications for a user, I first check for all the notifications with that user ID, and for all notification without a user ID but with a page ID of a page that the user is following.</p>
<p>I think this is not the easiest solution, but it will reduce the number of rows and if I do a good job with indexes and stuff, I think I'm able to write a pretty performant query.</p>
",https://stackoverflow.com/questions/63754030/insert-1-million-rows-in-postgresql-nodejs,"['node.js', 'postgresql']",1283,True,0,2
.NET Core 2.1 API Kestrel problems when stress testing,"<p>I have an API developed in .NET Core 2.1 and while doing stress testing, it reports a Kestrel web server error and I don't know what it is.</p>

<p>The error message is: <em>Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate.</em></p>

<p>I leave the call stack I see in the Application Insights log.</p>

<blockquote>
  <p>Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException:
     at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody+d__4.MoveNext (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.IO.Pipelines.PipeCompletion.ThrowLatchedException (System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
     at System.IO.Pipelines.Pipe.GetReadResult (System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
     at System.IO.Pipelines.Pipe.GetReadAsyncResult (System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
     at System.IO.Pipelines.Pipe+DefaultPipeReader.GetResult (System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
     at System.Runtime.CompilerServices.ValueTaskAwaiter<code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody+&lt;ReadAsync&gt;d__21.MoveNext (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.ValueTaskAwaiter</code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream+d__22.MoveNext (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter<code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream+&lt;ReadAsync&gt;d__35.MoveNext (Microsoft.AspNetCore.WebUtilities, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter</code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.WebUtilities.StreamHelperExtensions+d__3.MoveNext (Microsoft.AspNetCore.WebUtilities, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter+d__17.MoveNext (Microsoft.AspNetCore.Mvc.Formatters.Json, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter<code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder+&lt;BindModelAsync&gt;d__7.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder+&lt;BindModelAsync&gt;d__11.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter</code>1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider+&lt;>c__DisplayClass0_0+&lt;g__Bind|0>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__13.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__23.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__18.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+d__16.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Builder.RouterMiddleware+d__4.MoveNext (Microsoft.AspNetCore.Routing, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+d__6.MoveNext (Microsoft.AspNetCore.Authentication, Version=2.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+d__7.MoveNext (Microsoft.AspNetCore.StaticFiles, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at quodem_qcore_gamification.api.Startup+&lt;>c+&lt;b__5_0>d.MoveNext (quodem-qcore-gamification.api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware+d__8.MoveNext (Microsoft.AspNetCore.Cors, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+d__13.MoveNext (Microsoft.AspNetCore.Server.IISIntegration, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+d__188`1.MoveNext (Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)</p>
</blockquote>
",https://stackoverflow.com/questions/62191747/net-core-2-1-api-kestrel-problems-when-stress-testing,"['c#', 'asp.net-core', '.net-core', 'kestrel-http-server']",640,True,0,1
