title,body,link,tags,view_count,is_answered,score,answer_count
Distributed load testing jmeter,"<p>What is the best way to manage multiple slaves(for eg:50 slaves) and run a load test?</p>
<p>When using distributed testing for jmeter, we need to manually handle all the agent start and stop, copy the files into each slave etc. Any suggestions to automate these type of activities. Is there any open source framework to handle all these?</p>
",https://stackoverflow.com/questions/62890327/distributed-load-testing-jmeter,"['jmeter', 'jmeter-plugins', 'jmeter-5.0', 'jmeter-4.0', 'distributed-testing']",332,True,1,2
ApacheJMeter dynamic load testing,"<p>I've build an application which reacts on resource demand (i.e., number of http accesses). To test it, I want to generate http GET requests programmatically with ApacheJMeter. Unfortunately I cannot find any possibility to generate different numbers of http GET's during predefined segments of the test case.
A test should look like that for example:</p>

<pre><code>seconds 0 to 30: 1000 GET requests per second
seconds 31 to 60: 5000 GET request per second
seconds 61 to 90: 15000 GET request per second
seconds 91 to 120: 5000 GET request per second
seconds 121 to 150: 1000 GET request per second
</code></pre>

<p>I hope this is possible, thank you in advance.</p>
",https://stackoverflow.com/questions/61745482/apachejmeter-dynamic-load-testing,"['jmeter', 'performance-testing']",34,True,-1,1
Browser level load testing,"<p>We are planning to do load testing in browser so would like to know if you suggest any tools to achieve the 10k+ load requests.</p>
<p>Also would like to know if it can be achieved through jmeter for browser test.</p>
<p>Thanks In Advance</p>
",https://stackoverflow.com/questions/62508072/browser-level-load-testing,"['performance', 'browser', 'jmeter']",50,True,0,1
Perform Load Testing in Insomnia,"<p>Can I have some guidance on how to perform load testing by sending multiple POST API calls within a stipulated time frame n Insomnia.
To achieve this, I have to POST the API calls in a for loop going from 0 to 500 in a span of 5 sec.
What can I do to implement this ?</p>
",https://stackoverflow.com/questions/62526357/perform-load-testing-in-insomnia,"['rest', 'insomnia']",2990,True,7,1
Load testing a kafka consumer,"<p>I'm trying to figure out how to load test a kafka consumer.</p>

<p>In my application, the consumer reads message from kafka and does a lot of work most of it is writing stuff in a database.
Since it's an important process for my team, I would like to be able to load test the consumer and be able to have some report as to how the consumption did.
The end goal of this is that it generates the report in our CI and we would be able to see the evolution of the consumption for same load of message.</p>

<p>Sadly I really don't see how I can achieve such a thing. 
Would you have any idea as to how I would be able to do this ?</p>

<p>As of now, I'm thinking about duplicating the production topic on a dedicated environement and everytime I want to execute my load tests I would move the offset.
This would not help me get a report on the consumption.</p>

<p>Thanks for reading me.</p>
",https://stackoverflow.com/questions/61873279/load-testing-a-kafka-consumer,"['apache-kafka', 'load-testing']",580,False,2,1
Keycloak load testing using jmeter,"<p>I have deployed keycloak as a standalone server and wanted to load test on it. I have very less knowledge about how to load test using jmeter. Gone through <a href=""https://www.blazemeter.com/blog/openid-connect-how-to-load-test-with-jmeter"" rel=""nofollow noreferrer"">this resource</a> but it is hard for me to understand it.</p>
<p>Can anybody explain on how can i actually do it ?</p>
<p>EDIT: I made a simple api that will authenticate using keycloak. So what i did is deploy the api in another server and used jmeter to get the auth token from keycloak and use that token to authenticate to the api. I did as much threads as possible as a way of load testing.</p>
",https://stackoverflow.com/questions/63943907/keycloak-load-testing-using-jmeter,"['jmeter', 'keycloak']",404,False,2,0
Load testing AWS SDK client,"<p>What is the recommended way to performance test AWS SDK clients?  I'm basically just listing/describing resources and would like to see what happens when I query 10k objects.  Does AWS provide some type of mock API, or do I really need to request 10k of each type of resource to do this?</p>
<p>I can of course mock in at least two levels:</p>
<ol>
<li>SDK: I wrap the SDK with my own interfaces and create mocks.  This doesn't exercise the SDK's JSON to objects code and my mocks affect the AppDomain with additional memory, garbage collection, etc.</li>
<li>REST API: As I understand it the SDKs are just wrappers to the REST API (hence the HTTP response codes shown in the objects.  It seems I can configure the SDK to go to custom endpoints.
This isolates the mocks from the main AppDomain and is more representative, but of course I'm still making some assumptions about response time, limits, etc.</li>
</ol>
<p>Besides the above taking a long time to implement, I would like to make sure my code won't fail at scale, either locally or at AWS.  The only way I see to guarantee that is creating (and paying for) the resources at AWS.  Am I missing anything?</p>
",https://stackoverflow.com/questions/63350090/load-testing-aws-sdk-client,"['amazon-web-services', 'aws-sdk-net']",190,True,1,1
Jmeter load testing for login,"<p>I want to test how many users can concurrently login to the application. For that, can I create one user name and password and increase the thread to 100? or should I create 100 username and passwords and load it somehow?</p>
",https://stackoverflow.com/questions/64669797/jmeter-load-testing-for-login,"['performance', 'testing', 'jmeter', 'load-testing']",450,True,0,2
Locust load testing For API calls,"<p>I have written a code for locust load testing for my case, where i can do a token call and then will make feature calls as per below code.</p>
<p>This is working fine with single token and 'n' number of users mentioned in master</p>
<p>I made a token call outside class and sending it as parameter to ENV. The userclass is reading the single token and using the same for all users.</p>
<p>I do not want to make token call inside the class, as it generates new token in every execution.</p>
<p>I'm looking if there is anyway like making token calls based on number of users mentioned on master -u and using only those tokens in User class.</p>
<p>Please suggest me if there is any documentation pointer which i can refer for this usecase</p>
<pre><code>#! /usr/bin/python3.6


import json
from locust import HttpUser, task, constant, tag, events
from locust.log import setup_logging
import os
from datetime import datetime

import requests

setup_logging(&quot;INFO&quot;, None)


@events.init_command_line_parser.add_listener
def init_parser(parser):
    parser.add_argument(&quot;--resp-delay&quot;, type=str, env_var=&quot;LOCUST_RESP_DELAY&quot;, default=&quot;&quot;, help=&quot;It's working&quot;)
    parser.add_argument(&quot;--resp-size&quot;, type=str, env_var=&quot;LOCUST_RESP_SIZE&quot;, default=&quot;&quot;, help=&quot;It's working&quot;)
    parser.add_argument(&quot;--env-endpoint&quot;, type=str, env_var=&quot;LOCUST_ENV_ENDPOINT&quot;, default=&quot;&quot;, help=&quot;It's working&quot;)


@events.init.add_listener
def _(environment, **kw):

    os.environ['resp-delay'] = environment.parsed_options.resp_delay
    os.environ['resp-size'] = environment.parsed_options.resp_size
    os.environ['env-endpoint'] = environment.parsed_options.env_endpoint

    with open(&quot;resources/data/&quot; + environment.parsed_options.env_endpoint + '/data.json') as f:
        data = json.load(f)

    cal_transaction_id = datetime.now().strftime('%Y%m%dT%H%M%S')

    #retrive cliend id and client secret from bitbucket repo
    dict_car_app_all = data[&quot;data&quot;]

    print(&quot;env-endpoint:&quot; + os.environ.get(&quot;env-endpoint&quot;))

    token_url = &quot;https://ENDPOINT/auth/token&quot;

    #retrive cliend id and client secret from bitbucket repo
    token_payload = &quot;client_id=&quot; + dict_car_app_all[0][&quot;client_id&quot;] + &quot;&amp;client_secret=&quot; + dict_car_app_all[0][&quot;client_secret&quot;]

    token_headers = {
             'Content-Type': 'application/x-www-form-urlencoded'
    }

    response = requests.request(&quot;POST&quot;, token_url, data=token_payload, headers=token_headers,
                                    cert=( 'resources/certs/' + environment.parsed_options.env_endpoint + '/MyCERT.pem',
                                          'resources/certs/' + environment.parsed_options.env_endpoint + '/MYCERT.key'))

    result = json.loads(response.text)
    token = result[&quot;access_token&quot;]

    os.environ['access_token'] = token
    os.environ['cal_transaction_id'] = cal_transaction_id


#class User_1(User):
class User_0(HttpUser):
    wait_time = constant(1)
    host = &quot;host.com&quot;

    @tag('tag1')
    @task
    def load_test_api_tag1(self):
        token_0 = os.environ.get('access_token')
        cal_transaction_id = os.environ.get('cal_transaction_id')
        env_endpoint = os.environ.get('env-endpoint')


        resp_delay = os.environ.get(&quot;resp-delay&quot;)
        resp_size = os.environ.get(&quot;resp-size&quot;)

        feature_headers = {
            'Authorization': &quot;Bearer &quot; + str(token_0),
            'sm_transactionID': cal_transaction_id
        }

        url = &quot;https://ENDPOINT/SERVICE/mytestservice/first_test&quot;

        querystring = {&quot;response_delay&quot;: resp_delay, &quot;data_size&quot;: resp_size}

        self.client.request(&quot;GET&quot;, url, headers=feature_headers, params=querystring,
                        cert = ('resources/certs/' + env_endpoint + '/MyCERT.pem',
                                 'resources/certs/' + env_endpoint + '/MyCERT.key'))
</code></pre>
",https://stackoverflow.com/questions/65175509/locust-load-testing-for-api-calls,"['python-3.x', 'locust']",915,True,2,1
Load Testing: unstable error &quot;Connection refused&quot;,"<h2>Enviroment:</h2>
<ul>
<li><p>Ubuntu 18.04.1, DigitalOcean: RAM 2Gb + 2CPU</p>
</li>
<li><p>Nginx (OpenResty) + Lua</p>
</li>
</ul>
<h2>What I'm doing:</h2>
<p>I tried to send simple POST request like this by HTTPS: <em>(this is format of YandexTank)</em></p>
<pre><code>[Host: myserver.com]
[Content-Type: application/x-www-form-urlencoded]
80 /api
xxxxxx=777777777&amp;yyyyyyy=666666666&amp;zzzzzzzz=ce96c7c3-87e5-4b90-b1e5-9664697aa5b6
</code></pre>
<p>Schedule is: 100RPS during 30 seconds.</p>
<h2>What I see:</h2>
<p>First ≈ 1700 - 1900 request is success with status 200. But then...
about 99% error requests with response: &quot;111 Connection refused&quot;
maximum 1% success requests with code 200</p>
<p>If I wait 30 seconds and restart the load test, I won't have even 1600 success requests! The first requests already will be with error &quot;111 Connection refused&quot;.</p>
<p>If I wait 10 minutes and restart the load test, the first case will repeat (1700 - 1900 - success, other - wrong).</p>
<hr />
<h1>MY QUESTION:</h1>
<p>Any suggestions, which params should I configure for fix the error? It the problem in NGINX config? or OS?</p>
<p>The below numbers I was changing differently (worker_processes, worker_rlimit_nofile, worker_connections, keepalive_timeout).</p>
<p>Thank you!</p>
<hr />
<h2>CONFIGS:</h2>
<h3>Nginx</h3>
<pre><code>user  www-data;
worker_processes  4;

error_log  logs/error.log;
error_log  logs/error.log debug;

worker_rlimit_nofile 33000;

events {
    worker_connections  4000;
    use epoll;
    multi_accept on;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    reset_timedout_connection on;
    sendfile        on;
    keepalive_timeout 15;

    include '/etc/nginx/sites-enabled/*';
}

</code></pre>
<p>File (server + location)</p>
<pre><code>...
    location ~ ^/api {
        content_by_lua '
            ngx.say(&quot;OK&quot;)
            return ngx.exit(200)
        ';
    }
...
</code></pre>
<h3>ulimit -n</h3>
<pre><code>200000
</code></pre>
",https://stackoverflow.com/questions/60103072/load-testing-unstable-error-connection-refused,"['ubuntu', 'nginx', 'lua', 'load-testing', 'connection-refused']",211,True,1,1
Locust load testing gives me ChunkedEncodingError,"<p>I'm load testing my django gunicorn nginx and postgresql application.
After about 1500 concurrent users I get the following error in my locust failed tab:</p>

<pre><code>1   GET /   ChunkedEncodingError(ProtocolError('Connection broken: IncompleteRead(2773 bytes read, 7467 more expected)', IncompleteRead(2773 bytes read, 7467 more expected)))
</code></pre>

<p><strong>I have checked all my access and error logs (nginx access and error logs, gunicorn log, syslog, postgresql log), But I can't find anything related to the error above.</strong></p>

<p>Is it a Locust error? Is it a timeout error? I can't seem to find what is going wrong. </p>

<p>here is my locust file:</p>

<pre><code>from locust import HttpLocust, TaskSet, task, between
from requests.auth import HTTPBasicAuth


class UserBehavior(TaskSet):

    @task(4)
    def index(self):
        self.client.get("""", auth=(""user"", ""pass""))

    @task(4)
    def program(self):
        self.client.get(""page1/"", auth=(""user"", ""pass""))

    @task(1)
    def artist(self):
        self.client.get(""page1/sub-page/"", auth=(""user"", ""pass""))

    @task(2)
    def tickets(self):
        self.client.get(""page2/"", auth=(""user"", ""pass""))


class WebsiteUser(HttpLocust):
    task_set = UserBehavior
    wait_time = between(7, 30)
</code></pre>

<p>As you can see I am using Basic Auth to get through to the page. I don't know if that actually causes the error after a lot of requests.</p>

<p>What could be causing this error? Thanks in advance!</p>
",https://stackoverflow.com/questions/60005615/locust-load-testing-gives-me-chunkedencodingerror,"['python', 'postgresql', 'nginx', 'gunicorn', 'locust']",225,True,1,1
Load testing of FCM Push Notifications,"<p>I need around 100 devices for testing of push notifications for my react native app. Is there any way or tool to perform the load testing virtually? </p>

<p>Thanks.</p>
",https://stackoverflow.com/questions/62297663/load-testing-of-fcm-push-notifications,"['react-native', 'firebase-cloud-messaging', 'react-native-fcm']",237,False,1,0
Gatling stomp pub/sub load testing,"<p>I have web server Spring boot + STOMP via WS.
Soon this microservice will hit production and I want to measure performance of websocket under load. I want to know how many users my service will handle (and based on that configure autoscaling) </p>

<p>Service is REST API + STOMP topic publisher.
I want to write scenario that :</p>

<ul>
<li>in first iteration spawns 1 user, connect via websocket, subscribe to a topic then one message is published and verify that user received it via WS, close connection.</li>
<li>in second iteration spawns 10 users, connect via websocket, subscribe to a topic then one message is published and verify that  10 users received it via WS, close connection;</li>
<li>in third iteration spawn 100 users, connect via websocket, subscribe to a topic then one message is published and verify that 100 users received it via WS, close connection;</li>
<li>and so on. </li>
</ul>

<p>Then, based on stats, I'll find how many users can process my service.
Currently I can spawn users, connect via WS and that's it. 
How I can create some amount of users and create single http request that will trigger event publication on STOMP topic that this all users are subscribed for?</p>

<p>Here my current test scenario.</p>

<pre><code>package computerdatabase

import java.util.concurrent.TimeUnit
import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.core.check.Check
import io.gatling.http.Predef._
import io.gatling.http.check.ws.WsTextCheck

import scala.concurrent.duration.{Duration, FiniteDuration}
import scala.util.Random

class TickerSimulation extends Simulation {

  val baseUrl = ""https://myserverurl.com""

  val httpProtocol = http
    .baseUrl(baseUrl)
    .inferHtmlResources(BlackList("""""".*\.js"""""", """""".*\.css"""""", """""".*\.gif"""""", """""".*\.jpeg"""""", """""".*\.jpg"""""", """""".*\.ico"""""", """""".*\.woff"""""", """""".*\.woff2"""""", """""".*\.(t|o)tf"""""", """""".*\.png"""""", """""".*detectportal\.firefox\.com.*""""""))
    .acceptHeader(""*/*"")
    .acceptEncodingHeader(""gzip, deflate"")
    .acceptLanguageHeader(""de,en-US;q=0.7,en;q=0.3"")
    .userAgentHeader(""Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0"")

  def randomServerId(): String = {
    val rand = new Random()
    (1 to 3).map { _ =&gt; rand.nextInt(10).toString }.mkString
  }

  def randomSessionId(): String = {
    Random.alphanumeric.take(8).mkString
  }

  val feeder = Iterator.continually(Map(
    ""serverId"" -&gt; randomServerId(),
    ""sessionId"" -&gt; randomSessionId()
  ))

  val headers_0 = Map(
    ""Accept"" -&gt; ""text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"",
    ""DNT"" -&gt; ""1"",
    ""Pragma"" -&gt; ""no-cache"",
    ""Content-Type"" -&gt; ""application/json"",
    ""Upgrade-Insecure-Requests"" -&gt; ""1"",
    ""Authorization"" -&gt; ""Basic somebasicauth="")

  val answerCheck = ws.checkTextMessage(""Connection acknowledge answer"")
    .check(regex(""^a.*""))

  val answerEventCheck = ws.checkTextMessage(""Game event received"")
    .check(regex("".*gameEvent.*""))


  val scn = scenario(""WidgetTicker"")
    .feed(feeder)
        .exec(http(""Get game info "")
          .get(""/api/game/35384"")
          .headers(headers_0))
        .pause(Random.nextInt(10))
    .exec(ws(""WS connection"").connect(""ws://myserverurl.com/api/sock/${serverId}/${sessionId}/websocket""))
    .pause(1)
    .exec(ws(""Connect via STOMP"")
      .sendText(""[\""CONNECT\\naccept-version:1.1,1.0\\nheart-beat:10000,10000\\n\\n\\u0000\""]"")
      .await(60 seconds)(answerCheck)
    ).pause(3)
    .exec(ws(""Subscribe"")
      .sendText(""""""[""SUBSCRIBE\nid:sub-0\ndestination:/topic/game/35384\n\n\u0000""]"""""")
      .await(60 seconds)(answerEventCheck)
    )
    .pause(3)
    .exec(ws(""WS close"").close)


  setUp(scn.inject(
    atOnceUsers(1000)
  )).protocols(httpProtocol)
}

</code></pre>
",https://stackoverflow.com/questions/59771779/gatling-stomp-pub-sub-load-testing,"['scala', 'websocket', 'load-testing', 'stomp', 'gatling']",1209,True,1,1
MQTT.fx tool support for load testing,"<p>Does MQTT.fx tool supports load testing? I want to test GCP cloud IoT core by sending multiple messages. </p>
",https://stackoverflow.com/questions/62087834/mqtt-fx-tool-support-for-load-testing,"['google-cloud-platform', 'cloud', 'mqtt', 'google-cloud-iot']",436,False,-4,1
REST API load testing with Jmeter,"<p>Im new to REST API testing, I want to do a load of an HTTP REST API, is there any possibility to do a 100 number of parallel HTTP request testing with Jmeter? </p>

<p>And also my request need a query params, can I provide a list of values to Jmeter and Jmeter can loop each request with one param form the list provided?</p>

<p>Appreciate your help.</p>
",https://stackoverflow.com/questions/61721585/rest-api-load-testing-with-jmeter,"['api', 'rest', 'testing', 'jmeter']",567,True,0,1
Load Testing in Struts2 Application - JMeter,"<p>I am trying to do a load test using JMeter for the first Time.</p>

<p>My approach is to test each page one by one.</p>

<ol>
<li>The main page is like <a href=""http://localhost:8180/myapp/login.do?actionType=login(I"" rel=""nofollow noreferrer"">http://localhost:8180/myapp/login.do?actionType=login(I</a> hardcoded the credentials)
I am able to reach this page without any problem.

<ul>
<li>I created a <code>HTTP request</code> component and able to see the response without any issue.</li>
</ul></li>
<li>In the main page there is a button which populates the report, in the browser , the <code>url</code> is like 
<code>http://localhost:8180/myapp/mainmenu.do</code>

<ul>
<li>But when i create a <code>HTTP request</code> it is reaching but shows the security error page in the 'Response 
Data' as <strong>Due to security reasons, we still recommend you to close this window.</strong></li>
</ul></li>
</ol>

<p>can someone guide me how to test the other pages without these security errors. This is a <code>struts2</code> Web application.</p>
",https://stackoverflow.com/questions/59856475/load-testing-in-struts2-application-jmeter,"['jmeter', 'struts2']",161,True,0,2
load testing through wifi/lan + vpn,"<p>I really did not found answer on my question in the web. I am currently doing load tests for a web service, for example: how service will handle 15 threads in 1 seconds, for that I use Jmeter. I always get different average response times for 15 threads. When I'm in my company's inner network, I get wonderful results, but when I am at home, using lan/wifi + vpn to get access to that web services, I get horrible results. When I test it through vpn, web service can not handle 30 threads in 1 seconds, average response time is like 13 seconds, otherwise from company's network, average response time is 4-5 seconds. Also, that web service, would be also called from a system using vpn.
My question is, what is correct result and correct way to test it. Test it from company's network, or though vpn?</p>
",https://stackoverflow.com/questions/65448801/load-testing-through-wifi-lan-vpn,"['testing', 'jmeter', 'load-testing', 'stress-testing', 'web-api-testing']",570,True,0,2
Is cloud based load testing deprecated?,"<p>Came across an article <a href=""https://devblogs.microsoft.com/devops/cloud-based-load-testing-service-eol/"" rel=""nofollow noreferrer"">https://devblogs.microsoft.com/devops/cloud-based-load-testing-service-eol/</a> which says that cloud-based load testing service has been deprecated.</p>

<p>in this article, at one point it says that, </p>

<blockquote>
  <p>""Running a load test in the cloud using Visual Studio (both
  auto-provisioned agents and self-provisioned ‘bring-your-own’ agents):
  You can continue to run the tests but self-hosted with Test
  Controller/Test Agent option outlined above.""</p>
</blockquote>

<p>If all my load testing agents, controllers are created as VMs in Azure - and I use my VSTS subscription to run these load tests then do I need to worry? The above paragraph is a little confusing, hence asking.</p>
",https://stackoverflow.com/questions/61946403/is-cloud-based-load-testing-deprecated,"['visual-studio', 'azure-devops', 'performance-testing', 'load-testing']",304,False,0,0
NestJS Mongoose connection dies on load testing,"<p>When multiple devs use my API, multiple concurrent requests are being sent to Mongoose.
When the concurrency is high, the connection just &quot;dies&quot; and refuses to fulfil any new request, no matter how long I wait (hours!).</p>
<p>I just want to state everything is working fine on regular use. Heavy use leads the connection to crash.</p>
<p>My MongooseModule initialization:</p>
<pre class=""lang-js prettyprint-override""><code>MongooseModule.forRoot(DatabasesService.MONGO_FULL_URL, {
  useNewUrlParser: true,
  useUnifiedTopology: true,
  useFindAndModify: false,
  autoEncryption: {
    keyVaultNamespace: DatabasesService.keyVaultNamespace,
    kmsProviders: DatabasesService.kmsProviders,
    extraOptions: {
      mongocryptdSpawnArgs: ['--pidfilepath', '/tmp/mongocryptd.pid']
    }
  } as any
})
</code></pre>
<p>Module that imports the feature:</p>
<pre class=""lang-js prettyprint-override""><code>@Module({
  imports: [MongooseModule.forFeature([{ name: 'modelName', schema: ModelNameSchema }])],
  providers: [ModelNameService],
  controllers: [...],
  exports: [...]
})
</code></pre>
<p>Service:</p>
<pre class=""lang-js prettyprint-override""><code>@Injectable()
export class ModelNameService {
  constructor(
    @InjectModel('modelName') private modelName: Model&lt;IModelName&gt;
  ) {}

  async findAll(): Promise&lt;IModelName[]&gt; {
    const result: IModelName[] = await this.modelName.find().exec();
    if (!result) throw new BadRequestException(`No result was found.`);
    return result;
  }
}
</code></pre>
<p>I've tried loadtesting using different utils, the easiest was:</p>
<pre class=""lang-sh prettyprint-override""><code>ab -c 200 -n 300 -H &quot;Authorization: Bearer $TOKEN&quot; -m GET -b 0 https://example.com/getModelName
</code></pre>
<p>Any new request after the connection hangs gets stuck at ModelNameService.findAll() first line (the request to mongo).</p>
<p>On mongodb logs with verbosity of &quot;-vvvvv&quot; I can see few suspicious lines:</p>
<pre><code>User Assertion: Unauthorized: command endSessions requires authentication src/mongo/db/commands.cpp

Cancelling outstanding I/O operations on connection to 127.0.0.1:33134
</code></pre>
<p>And I've also found that it doesn't exceed 12 open connections at the same time. It always waits to close one before opening a new one.</p>
<p>Other key points:</p>
<ul>
<li>Mongoose doesn't return any value or notifies about any error. It just hangs without notifying anything.</li>
<li>Terminus health check able to ping the DB and returns a healthy status.</li>
<li>NestJS API still works - I'm able to send new requests and receive a response. Just requests that are related to the faulty connection hang.</li>
<li>When I inject connection and check its <code>readyState</code> it returns <code>connected</code>.</li>
<li>Restarting the API fixes it immediately.</li>
<li>MongoDB itself keeps working as normal.</li>
<li>Increasing Mongoose <code>poolSize</code> is able to handle more requests at the same time but will still crash on a larger amount of requests.</li>
</ul>
<p>My main question here is how do I handle this case? Currently, I've added another health check to try and send a query to the problematic connection every half a minute, and k8s restarts the pod if it determines a failure. This works but it is not optimal.</p>
",https://stackoverflow.com/questions/64192992/nestjs-mongoose-connection-dies-on-load-testing,"['mongodb', 'mongoose', 'nestjs']",370,False,6,0
How to do load testing in real browsers[Not HTTP based load testing like JMeter] in testcafe?,"<p>We are using testcafe for end to end testing,But we have one requirement like 10 different users logins simultaniously[parallelly] to different page and each user uploads different excel files.Is it possible to acheive is testcafe or any other opensource tool is available in market for load testing in real browser?</p>
",https://stackoverflow.com/questions/63316066/how-to-do-load-testing-in-real-browsersnot-http-based-load-testing-like-jmeter,"['testing', 'automation', 'automated-tests', 'e2e-testing', 'testcafe']",108,False,0,0
Distributed locust load testing on local machine,"<p>I was wondering is it possible to run locust distributed on the local machine? I mean to create slaves and master locally. I tried next:</p>

<p>Master:</p>

<p><div class=""snippet"" data-lang=""js"" data-hide=""false"" data-console=""true"" data-babel=""false"">
<div class=""snippet-code"">
<pre class=""snippet-code-html lang-html prettyprint-override""><code>&gt; locust --master</code></pre>
</div>
</div>
</p>

<p>Slaves:</p>

<p><div class=""snippet"" data-lang=""js"" data-hide=""false"" data-console=""true"" data-babel=""false"">
<div class=""snippet-code"">
<pre class=""snippet-code-html lang-html prettyprint-override""><code>&gt; locust --slave --master-host=127.0.0.1 --master-port=8089</code></pre>
</div>
</div>
</p>

<p>But I am getting the error:</p>

<p><strong>You are running in distributed mode but have no slave servers connected. Please connect slaves prior to swarming.</strong></p>
",https://stackoverflow.com/questions/62061833/distributed-locust-load-testing-on-local-machine,"['python', 'load-testing', 'locust']",4998,True,3,1
Load testing in an application using Firebase,"<p>How to create load tests for an application that uses Firebase?
It is possible to create typical load tests using e.g. JMeter?</p>
<p>Using Firebase creates communication between the front-end side and the Firebase platform. When creating load tests, we must manually set many different parameters on these requests (e.g. token, different ids, etc.). The SDK containing the Google API is used to communicate with the platform. It has multiple methods that create multiple requests.  Can we handle them, know what parameters to set dynamically, what should they represent, where they come from and finally create load tests?</p>
",https://stackoverflow.com/questions/63232135/load-testing-in-an-application-using-firebase,"['firebase', 'google-cloud-platform', 'google-api', 'jmeter', 'load-testing']",401,False,3,0
Error when runnint jmeter distributed load testing,"<p>I am performing jmeter distributed load testing, On starting remote server from local machine in gui mode test starts but not able to start on local machine. It gives rmi UnmarshalException on local machine. The detail error is that</p>
<pre><code>2020-08-15 15:09:51,364 INFO o.a.j.JMeter: Version 5.1.1 r1855137
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.version=1.8.0_131
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.name=Mac OS X
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.arch=x86_64
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.version=10.15.4
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: file.encoding=UTF-8
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.awt.headless=true
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: Max memory     =1908932608
2020-08-15 15:09:51,365 INFO o.a.j.JMeter: Available Processors =4
2020-08-15 15:09:51,895 INFO o.a.j.e.DistributedRunner: Configuring remote engine: 1.2.3.4:8113
2020-08-15 15:09:51,898 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:52,055 INFO o.a.j.e.DistributedRunner: Starting remote engines
2020-08-15 15:09:52,056 INFO o.a.j.e.DistributedRunner: Starting the test @ Sat Aug 15 15:09:52 CST 2020 (1597475392055)
2020-08-15 15:09:52,056 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method
2020-08-15 15:09:52,063 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2020-08-15 15:09:52,063 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2020-08-15 15:09:52,541 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:52,546 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-08-15 15:09:52,559 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:52,559 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:09:52,561 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:53,108 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:53,108 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:09:53,108 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:53,109 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:53,109 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:10:53,356 ERROR o.a.j.e.ClientJMeterEngine: Error in rconfigure() method
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.io.EOFException
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:229) ~[?:1.8.0_131]
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162) ~[?:1.8.0_131]
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227) ~[?:1.8.0_131]
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179) ~[?:1.8.0_131]
    at com.sun.proxy.$Proxy19.rconfigure(Unknown Source) ~[?:?]
    at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:153) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:132) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:149) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:1089) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:991) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.start(JMeter.java:563) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
    at org.apache.jmeter.NewDriver.main(NewDriver.java:253) [ApacheJMeter.jar:5.1.1 r1855137]
Caused by: java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:1.8.0_131]
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215) ~[?:1.8.0_131]
    ... 15 more
2020-08-15 15:10:53,378 INFO o.a.j.e.ClientJMeterEngine: Interrupting RMI Reaper
2020-08-15 15:10:53,380 ERROR o.a.j.u.JMeterUtils: Error in rconfigure() method java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.io.EOFException
2020-08-15 15:10:53,381 INFO o.a.j.e.DistributedRunner: Remote engines have been started
</code></pre>
<p>anyone know the reason?</p>
",https://stackoverflow.com/questions/63424207/error-when-runnint-jmeter-distributed-load-testing,"['java', 'server', 'jmeter', 'rmi']",318,False,0,1
Locust Load Testing running into infinite loop,"<p>i am really new to Python with Locust load testing.
I Created the below Python script but its running into infinite loop.
I have used
Number of total users to simulate = 1
Spawn rate = 1</p>
<p>Please let me know where i am going wrong.</p>
<pre><code>from locust import HttpUser, task, between, TaskSet


class Behaviour(TaskSet):

    @task
    def first_task(self):
        self.client.get('/LoginHome.aspx')
 
class WebsiteTestUser(HttpUser):
    tasks = [Behaviour]
    wait_time = between(5, 15)
    host = &quot;http://DEV/LoadTesting&quot;
</code></pre>
<p>Thanks.</p>
",https://stackoverflow.com/questions/64257011/locust-load-testing-running-into-infinite-loop,"['python', 'python-3.x', 'python-2.7', 'load-testing', 'locust']",1017,False,0,1
Sitecore 9 - Load testing results in 502 errors,"<p>We have a Sitecore CD (Sitecore 9- update 1) Instances behind an Azure App Gateway.</p>

<p>I am doing a load test on our website with 4000 requests. I see that around 10-15% of our requests returning 502 gateway errors. </p>

<p>Our CPU and Memory Utilization (of Sitecore CD and Application gateway) seem to be fine. I have also examined CPU of SQL Server which looks fine as well. On examining the CD logs I don't see any errors or exceptions (I see few errors which are also seen before a load test as well). I just see 502 gateway errors at Azure app gateway and JMeter also says the same.</p>

<p>Any insights on what could be the reason for these 502 gateway errors for only 10-15% while remaining requests are successful?</p>
",https://stackoverflow.com/questions/61224764/sitecore-9-load-testing-results-in-502-errors,"['azure', 'sitecore', 'load-testing']",542,True,1,2
Using only one credential to do load testing,"<p>Im currently new to end to end testing and planning to do load testing for a website I am currently working on. Im currently looking into jmeter and studying how to use it. My question is, would it make sense to only use one credential for the test? So basically I will be using my credentials then would throwing same HTTP requests multiple times to the server to simulate several users logging in and using the website.</p>
<p>Also if there are other ways to do load testing without using more than one credentials would be helpful!</p>
<p>Thanks in advance for the help!</p>
",https://stackoverflow.com/questions/64387272/using-only-one-credential-to-do-load-testing,"['jmeter', 'performance-testing', 'load-testing']",202,True,-1,1
k6 Load Testing - How extract value from HTML response,"<p>I am using the <em>k6 Load Testing Tool</em> for the first time.</p>
<p>I send a GET request and html is sent in the response. I then need to extract some values from this html.</p>
<p>What is the best way of doing this in HTML? I have seen in the documentation that there are the following 3 commands that could possibly be of help:</p>
<pre><code>Response.body
Selection.find(selector)
Response.json([selector])
</code></pre>
<p>The HTML is shown below. I want to extract the values of csrf and transId</p>
<pre><code>&lt;html lang=&quot;en&quot;&gt;

&lt;head&gt;
    &lt;link rel=&quot;icon&quot; href=&quot;data:;base64,iVBORw0KGgo=&quot;&gt;
    &lt;script data-container=&quot;true&quot; nonce=&quot;ekqlmSlKlpMlCSDxgP6erg==&quot;&gt;
        
        var SETTINGS = {

         &quot;csrf&quot;: &quot;I NEED THIS VALUE&quot;,
         &quot;transId&quot;: &quot;I ALSO NEED THIS VALUE&quot;,
        };

    &lt;/script&gt;
    
&lt;/head&gt;

&lt;body&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>
<p>I think I could do it using Response.body and then searching for a substring. Is this the best way of doing it?</p>
",https://stackoverflow.com/questions/63098923/k6-load-testing-how-extract-value-from-html-response,"['javascript', 'load-testing', 'k6']",3155,True,4,2
Load testing on jmeter to compare request and response,"<p>I am trying to test my <code>Springboot</code> App using <code>jMeter</code>. I want to send multiple request with some <code>JSON</code> payload to receive the response concurrently (via threading). </p>

<p>While doing this, in order to check validity of response, I want to keep a log where it can show the request-response pair (side-by-side or even in separate files, they should just be identifiable which request gave which response).</p>

<p>This is to test if one request is not tampering other request's response (data validation).</p>

<p>I have already tried <code>Simple Writer</code> tool where we can log request and response (I think jmeter have used some different terminology in menu) on configure menu. But it doesn't seem to be working when I run the results.</p>

<p>So my main concern is how can we store the <code>JSON</code> request data and response data pair somewhere after test iteration have completed. I have never used jmeter before so a little bit of detailing will help.</p>

<p>Thanks!</p>
",https://stackoverflow.com/questions/59987535/load-testing-on-jmeter-to-compare-request-and-response,"['java', 'jmeter', 'jmeter-plugins']",202,True,2,2
"Errors with Locust load testing scripts - Connection aborted.&#39;, RemoteDisconnected","<p>I am new to Locust Load testing framework and in process of  migrating my existing Azure cloud based Performance testing C# scripts to Locust's Python based scripts. Our team almost completed migration of scripts. But during our load tests, we are getting errors as below, which fails to create new requests from the machine due to high CPU utilization or because of so many exception on Locust. We are running with Locust web based mode - details are indicated below. These scritps are working fine on smaller loads of 50 to 100 users</p>

<p>""<strong>Error 1 -('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',)</strong>)""</p>

<p>""<strong>Error 2 : Connection pool is full, discarding connection</strong>""</p>

<p>""** **Error 3 :urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 110] Connection timed out****""</p>

<p>Yes, we are using UrlLibs on the utility classes . But first 2 error does seems to be of Locust.</p>

<p>Our Load testing configurations  are : ""<strong>3500 users at a hatch rate of 5 users per second</strong>"". Running natively(no docker container) on a 8 Core , 16 Gb Linux Ubuntu Virtual machine on Azure. ulimit set as 50,000 on Linux machine.</p>

<p>Please help us with your thoughts</p>

<p><strong>Sample test is as below</strong></p>

<pre><code>import os 
import sys
sys.path.append(os.environ.get('WORKDIR', os.getcwd()))

from locust import HttpLocust, TaskSet, task
from locust.wait_time import between

class ContactUsBehavior(TaskSet):


    wait_time = AppUtil.get_wait_time_function(2)


    @task(1)
    def post_load_test_contact(self):
        data = { ""ContactName"" : ""Mane""
            , ""Email"" : ""someone@someone.com""
            , ""EmailVerifaction"" : ""someone@someone.com""
            , ""TelephoneContact"" : """"
            , ""PhoneNumber"" : """"
            , ""ContactReason"" : ""Other""            
            , ""OtherComment"" : ""TEST Comments 2019-12-30""
            , ""Agree"" : ""true""
             }
        self.client.post(""app/contactform"", self.client, 'Contact us submission', post_data = data)


class UnauthenticatedUser(HttpLocust):
    task_set = ContactUsBehavior
    # host is override-able
    host = 'https://app.devurl.com/'
</code></pre>
",https://stackoverflow.com/questions/60326472/errors-with-locust-load-testing-scripts-connection-aborted-remotedisconnect,"['python', 'performance-testing', 'locust']",2596,True,2,1
Integration Karate feature file with jmeter for load testing,"<p>I have to run karate feature files containing all the test through jmeter for load testing.
Any ways to convert karate feature file in to jmx file dynamically or any other way to convert these test feature files into jmeter supportive files for load testing.</p>
",https://stackoverflow.com/questions/63196077/integration-karate-feature-file-with-jmeter-for-load-testing,"['api', 'jmeter', 'karate', 'web-api-testing']",252,False,1,0
How to do load testing of SNS--&gt;SQS--&gt;LAMBDA,"<p>I have a solution </p>

<pre><code>SNS--&gt;SQS--&gt;LAMBDA--&gt;ES(ElastciSearch)
</code></pre>

<p>I want to test this with heavy load like 10K or 5K  request to SNS per second.
The size of the test record can be very small (1kb) and any type of json record .</p>

<p>Is there anyway to test this load ?I did find anything which is native to AWS for this test .</p>
",https://stackoverflow.com/questions/60130842/how-to-do-load-testing-of-sns-sqs-lambda,"['amazon-web-services', 'jmeter', 'load-testing', 'amazon-sqs', 'amazon-sns']",1118,True,0,2
JMeter distribution load testing Error: Connection refused to host,"<p>We are facing issues in JMeter remote testing. Master is stuck at:</p>

<blockquote>
  <p>Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445</p>
</blockquote>

<p>While the client is throwing:</p>

<blockquote>
  <p>Connection refused to host exception</p>
</blockquote>

<p>We are running master like below:</p>

<pre><code>.\jmeter  &lt;b&gt;-Djava.rmi.server.hostname=10.19.120.43 &lt;/b&gt; -n -t .\Test.jmx -R 10.75.225.188
</code></pre>

<p>But in the slave side test completion status is sent to some other IP address:</p>

<pre><code>2020-06-11 15:54:01,788 INFO o.a.j.e.RemoteJMeterEngineImpl: Creating JMeter engine on host 10.75.225.188 base '.'
&lt;br&gt;2020-06-11 15:54:01,788 INFO o.a.j.e.RemoteJMeterEngineImpl:&lt;b&gt; Remote client host: 10.19.120.43&lt;/b&gt;
&lt;br&gt;2020-06-11 15:54:01,788 INFO o.a.j.s.FileServer: Set new base='.'
&lt;br&gt;2020-06-11 15:54:01,793 INFO o.a.j.e.RemoteJMeterEngineImpl: Cleaning previously set properties: {sample_variables=ulp_buffer_fill,ulp_lag_time,ulp_play_time,ulp_lag_ratio,ulp_dwn_time,ulp_hits,ulp_avg_chunk_time,ulp_avg_manifest_time}
2020-06-11 15:54:01,794 INFO o.a.j.e.StandardJMeterEngine: Applying properties {sample_variables=ulp_buffer_fill,ulp_lag_time,ulp_play_time,ulp_lag_ratio,ulp_dwn_time,ulp_hits,ulp_avg_chunk_time,ulp_avg_manifest_time}
&lt;br&gt;2020-06-11 15:54:01,795 INFO o.a.j.e.RemoteJMeterEngineImpl: Running test
&lt;br&gt;2020-06-11 15:54:01,797 INFO o.a.j.e.StandardJMeterEngine: Running the test!
&lt;br&gt;2020-06-11 15:54:01,797 INFO o.a.j.s.SampleEvent: List of sample_variables: [ulp_buffer_fill, ulp_lag_time, ulp_play_time, ulp_lag_ratio, ulp_dwn_time, ulp_hits, ulp_avg_chunk_time, ulp_avg_manifest_time]
&lt;br&gt;2020-06-11 15:54:22,801 ERROR o.a.j.s.RemoteListenerWrapper: testStarted(host) on 10.75.225.188
java.rmi.ConnectException: &lt;b&gt;Connection refused to host: 10.0.75.1; nested exception is: 
    java.net.ConnectException: Connection timed out: connect &lt;/b&gt;
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.server.UnicastRef.invoke(Unknown Source) ~[?:1.8.0_231]
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source) ~[?:1.8.0_231]
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source) ~[?:1.8.0_231]
    at com.sun.proxy.$Proxy20.testStarted(Unknown Source) ~[?:?]
    at org.apache.jmeter.samplers.RemoteListenerWrapper.testStarted(RemoteListenerWrapper.java:79) [ApacheJMeter_core.jar:4.0 r1823414]
    at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:217) [ApacheJMeter_core.jar:4.0 r1823414]
    at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:384) [ApacheJMeter_core.jar:4.0 r1823414]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[?:1.8.0_231]
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[?:1.8.0_231]
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:1.8.0_231]
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:1.8.0_231]
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.PlainSocketImpl.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.Socket.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.Socket.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.Socket.&lt;init&gt;(Unknown Source) ~[?:1.8.0_231]
    at java.net.Socket.&lt;init&gt;(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) ~[?:1.8.0_231]
    ... 11 more
</code></pre>

<p><br><br><br><br>
<b>FYI: this machine has docker running on it and 10.0.75.1 is associated with it</b></p>
",https://stackoverflow.com/questions/62322731/jmeter-distribution-load-testing-error-connection-refused-to-host,"['jmeter', 'connection']",1258,False,0,1
Concurrency in Apache JMeter load testing has strange behaviour,"<p>I'm doing some loadtesting of an API using a somewhat basic setup in JMeter.</p>
<p>The idea here is that the <em>Thread group</em> spawns a bunch of clients/threads and each of these clients has a bunch of <em>loops</em> which runs in <em>parallel</em> (using the Bzm - parallel controller).</p>
<p>Each loop represents some kind of action that a user can perform and each loop has a <em>Uniform Timer Controller</em> to adjust how often a given action is performed for each client.</p>
<p>One of the actions consists of two calls, first one (1) fetches som id's which are then extracted with a J<em>SON extractor</em> and modified a bit with a <em>BeanShell Post Processor</em>. The result from the post processor is then used as a param for the next call (2).</p>
<p>The issue I'm facing is that in my <em>Summary report</em> there is a lot more results from the first HTTP request (1) showing up than from the second one (2). I would expect them to always be called the same number of times.</p>
<p>My guess is that it all comes down to me lacking some basic understanding of flow and concurrency (and maybe timers) in JMeter, but I have been unable to figure it out, so I need help.</p>
<p>This is the setup, imagine there being multiple <em>loops</em>.</p>
<pre><code> Thread group
      +
      |
      +------ ---+ Parallel controller
      |                    +
      |                    |
      |                    +-----------+ Loop
      |                                   +
      |                                   +----------+ Transaction
      |                                   |                +
      |                                   |                |
      |                                   |                +---------+ Uniform random timer
      |                                   |                                    +
      |                                   |                                    |
      |                                   |                                    |
      |                                   |                                    +
      |                                   |                             (1) HTTP request
      |                                   |                                    +
      |                                   |                                    +---------+ JSON extractor
      +                                   |                                    |                +
                                          |                                    |                |
Summary Report                            |                                    |                +
                                          |                                    |       BeanShell Post processor
                                          |                                    |
                                          |                                    |
                                          |                                    |
                                          |                                    +
                                          |
                                          |                              (2) HTTP request
                                          |
                                          |
                                          |
                                        Loop +----------------------------------+
                                          |
                                          |
         
</code></pre>
",https://stackoverflow.com/questions/65221796/concurrency-in-apache-jmeter-load-testing-has-strange-behaviour,"['rest', 'jmeter', 'performance-testing', 'web-api-testing']",102,True,0,1
Load testing with Task.Run() inside a loop vs WhenAll(),"<p>I wanted to do some simple load test on a piece of code I wrote with multiple threads hitting a piece of code at once. </p>

<p>Now the below code Sample #1 gave me the expected results. But I am not quite sure why Sample #2 didn't give me the same. Could someone explain, please? </p>

<p><strong>Code sample #1</strong></p>

<pre><code>    private static FileCreator _fileCreater;
    public static void Main(params string[] args)
    {
        _fileCreater = new FileCreator();
        RunTasks().GetAwaiter().GetResult();
    }

    private static async Task RunTasks()
    {
        List&lt;Task&gt; tasks = new List&lt;Task&gt;();

        for (int i = 0; i &lt; 100000; i++)
        {
            tasks.Add(Task.Run(() =&gt;
            {
                _fileCreater.SaveMessage(new Message());
            }));
        }

        await Task.WhenAll(tasks);
    }
</code></pre>

<p>Initially, I had the below and I expected the same result, but what I noticed was my CPU never went past 20%, which suggested it wasn't really spanning up multiple threads</p>

<p><strong>Code Sample #2</strong></p>

<pre><code>    private static FileCreator _fileCreater;
    public static void Main(params string[] args)
    {
        _fileCreater =  new FileCreator();
        RunTasks().GetAwaiter().GetResult();
    }

    private static async Task RunTasks()
    {
        for (int i = 0; i &lt; 100000; i++)
        {
            await Task.Run(() =&gt;
            {
                _fileCreater.SaveMessage(new Message());
            });
        }
    }
</code></pre>
",https://stackoverflow.com/questions/60779641/load-testing-with-task-run-inside-a-loop-vs-whenall,"['c#', '.net', 'asynchronous', 'async-await', 'task']",285,True,0,1
java.lang.OutOfMemoryError: GC overhead limit exceeded during Jmeter load testing,"<p>I was performing Jmeter load testing of a spring boot application(Java 8) where I fired 50 concurrent requests and allocated heap size was 6GB. During testing I encountered </p>

<blockquote>
  <p>java.lang.OutOfMemoryError: GC overhead limit exceeded</p>
</blockquote>

<p>According to Java docs, </p>

<blockquote>
  <p>by default, the JVM is configured to throw this error if the Java
  process spends more than 98% of its time doing GC and when only less
  than 2% of the heap is recovered in each run.</p>
</blockquote>

<p>After this error, application became extremely slow which is expected behaviour. I checked for possible memory leaks but there were none. What I want to know is how and when will the garbage collector free up the occupied memory of failed requests?</p>

<p>For e.g. if I run test suite again with 20 concurrent requests, will my application be able to serve those requests by freeing up the memory of previous run or do I need to restart application?</p>

<p>Adding few application details:</p>

<ul>
<li>Application is fetching around 50k-200k rows from tables(having 30 columns) per request</li>
<li>It was expected to run into out of memory during testing to find the number of rows that can be fetched per request</li>
</ul>

<p>My concern is how my application will behave if this error comes in production.  Will it able to serve the future requests at the same speed or I'll have to restart my application?</p>
",https://stackoverflow.com/questions/61366525/java-lang-outofmemoryerror-gc-overhead-limit-exceeded-during-jmeter-load-testin,"['java', 'spring-boot', 'java-8', 'garbage-collection']",1054,False,0,1
Locust load testing - change hatch rate from seconds to minutes?,"<p>I'd like to simulate spikey traffic, so that for example:</p>
<ul>
<li>in the first 5 minutes there are only 50 users (instant hatch of 50 at time <code>T0</code>)</li>
<li>then from 5th to 10th minute we have 100 users (instant hatch +50 at <code>T+5</code>)</li>
<li>then 150 (instant hatch +50 at <code>T+10</code>)</li>
<li>etc.</li>
</ul>
<p>Is it possible to create an equal number of users, but instead of doing that every second change that to every xx minutes?</p>
",https://stackoverflow.com/questions/62872079/locust-load-testing-change-hatch-rate-from-seconds-to-minutes,"['python', 'load', 'performance-testing', 'locust']",825,True,2,2
How can artillery.io load testing be distributed across multiple cores,"<p>It is likely realized when attempting to run larger scale tests with artillery.io that high CPU warnings will be displayed. As this technology runs a node process to drive test scenarios defined in yaml scripts, the single-core process can attempt to push so much throughput before lacking in CPU resources. A quick Google search will bring about the following result describing some features within artillery to distribute artillery scenarios across multiple cores, <a href=""https://artillery.io/blog/artillery-20-preview-multicore"" rel=""nofollow noreferrer"">https://artillery.io/blog/artillery-20-preview-multicore</a>, but unfortunately does not seem to be the case...</p>
",https://stackoverflow.com/questions/63894065/how-can-artillery-io-load-testing-be-distributed-across-multiple-cores,"['javascript', 'performance-testing', 'load-testing', 'artillery']",1805,True,1,1
HOW to do Load testing using gatling for 10000 QPS,"<p>gatling is great tool for load testing..
While exploring it how we can extend and do Load testing using gatling for 10000 QPS?
Simple scenario like for 1 hour 10000QPS for given exec scenarios.
Can someone suggest injection pattern to use?
Thanks in advance.</p>
",https://stackoverflow.com/questions/59889539/how-to-do-load-testing-using-gatling-for-10000-qps,"['load-testing', 'gatling']",420,True,0,1
Load testing a sign-in page with 100 concurrent users,"<p>I have a situation where a sign in button actually fires a call to following actions:</p>

<ol>
<li>calling a auth service and gets a token</li>
<li>calls service A with token</li>
<li>calls service B with token</li>
<li>calls service C with token</li>
</ol>

<p>Please note again all these actions are made(serially) on clicking the single sign-in button</p>

<p>I am actually trying to tune the system by applying some metrics monitoring. The problem is I want to load test the sign in process with 100 concurrent users for confirming that tuning works. I actually tried using jmeter with concurrency thread groups after recording the process above in jmeter script by means of blazemeter chrome plugin, but i found a difficulty there when i ran the test the threads are just keep hiting the urls involved in sign-in in arbitrary manner. i dont want that. what i want is: i have 100 * 4 threads and the group of these 4 threads should run concurrently but in each group the thread should run serially and the token in each group should be the one recieved from the auth call. Is it possible to attain such thing ?</p>
",https://stackoverflow.com/questions/62416574/load-testing-a-sign-in-page-with-100-concurrent-users,"['angularjs', 'load-testing', 'jmeter-plugins', 'jmeter-5.0', 'blazemeter']",139,False,0,1
Jmeter load testing with multiple user credentials and form filling,"<p>I am new in jmeter and I am doing r&amp;nd on Jmeter. I have a scenario can you help me regarding this. </p>

<pre><code>1.I have one login form and one details form. User can first do login and then he can fill details form. 
2.I want to test this steps through jmeter. 
3.But, I want to test multiple user can login together and can fill details form together at the same time. 
4.So how can I pass both login and details csv at the same time In jmeter.
</code></pre>

<p>Please guide me. If any video or blog please share. </p>
",https://stackoverflow.com/questions/62296025/jmeter-load-testing-with-multiple-user-credentials-and-form-filling,"['performance', 'jmeter', 'load']",321,False,-1,1
Unable to achieve expected transaction in karate-gatling for load testing,"<p>We are using Karate-Gatling for performing load testing, with 4 API services</p>
<p>when we are running with minimal load i.e. 40 users (10 on each service) with 10 minutes duration and 10 seconds as pacing, we are able to achieve expected transaction.</p>
<p>But when we are trying to run with little more load i.e. 100 users (25 on each service) with 10 minutes duration and 10 seconds as pacing for each API service, we are not able to achieve expected transaction, even though the response times of each service is less than the applied pacing(10 sec), the number of transactions achieved is very much less than the expected.</p>
<p>we tried another load test with same number of users i.e. 100 users (25 on each service) with 10 minutes duration and 20 seconds as pacing for each API service, we almost achieved the expected transaction.</p>
<p>could you please let us know why the expected transactions are not achieved in 100 user tests with 10 sec as pacing.</p>
",https://stackoverflow.com/questions/64679583/unable-to-achieve-expected-transaction-in-karate-gatling-for-load-testing,"['performance', 'karate']",18,False,1,0
locust is not installing on my windows 10 for load testing,"<p>I tried installing this pip but getting some error, I want this package module for load testing
This is the output i am getting:</p>

<pre><code>Collecting locustio
Collecting geventhttpclient-wheels==1.3.1.dev2 (from locustio)
  Using cached https://files.pythonhosted.org/packages/bc/7f/42f8b4ac6c7ddf606fa69769cef2229a159d4af45a294053198f52586095/geventhttpclient-wheels-1.3.1.dev2.tar.gz

Requirement already satisfied: six in c:\users\saurabh\appdata\local\programs\python\python38\lib\site-packages (from geventhttpclient-wheels==1.3.1.dev2-&gt;locustio) (1.14.0)
Requirement already satisfied: pycparser in c:\users\saurabh\appdata\local\programs\python\python38\lib\site-packages (from cffi&gt;=1.12.2; platform_python_implementation == ""CPython"" and sys_platform == ""win32""-&gt;gevent==20.4.0-&gt;locustio) (2.20)

  Running setup.py install for geventhttpclient-wheels: started
    Running setup.py install for geventhttpclient-wheels: finished with status 'error'

    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '""'""'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'""'""'; __file__='""'""'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'""'""';f=getattr(tokenize, '""'""'open'""'""', open)(__file__);code=f.read().replace('""'""'\r\n'""'""', '""'""'\n'""'""');f.close();exec(compile(code, __file__, '""'""'exec'""'""'))' install --record 'C:\Users\SauraBh\AppData\Local\Temp\pip-record-ipuoqz4r\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\SauraBh\AppData\Local\Temp\pycharm-packaging\geventhttpclient-wheels\
    Complete output (45 lines):
    C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\dist.py:471: UserWarning: Normalizing '1.3.1dev2' to '1.3.1.dev2'
      warnings.warn(
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\client.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\connectionpool.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\header.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\httplib.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\response.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\url.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\useragent.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\__init__.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    running egg_info
    writing src\geventhttpclient_wheels.egg-info\PKG-INFO
    writing dependency_links to src\geventhttpclient_wheels.egg-info\dependency_links.txt
    writing requirements to src\geventhttpclient_wheels.egg-info\requires.txt
    writing top-level names to src\geventhttpclient_wheels.egg-info\top_level.txt
    reading manifest file 'src\geventhttpclient_wheels.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
    warning: no previously-included files matching '*.py[co]' found anywhere in distribution
    writing manifest file 'src\geventhttpclient_wheels.egg-info\SOURCES.txt'
    creating build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\oncert.pem -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\server.crt -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\server.key -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_client.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_headers.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_httplib.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_keep_alive.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_network_failures.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_no_module_ssl.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_parser.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_ssl.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_url.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_useragent.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building 'geventhttpclient._parser' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with ""Microsoft Visual C++ Build Tools"": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '""'""'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'""'""'; __file__='""'""'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'""'""';f=getattr(tokenize, '""'""'open'""'""', open)(__file__);code=f.read().replace('""'""'\r\n'""'""', '""'""'\n'""'""');f.close();exec(compile(code, __file__, '""'""'exec'""'""'))' install --record 'C:\Users\SauraBh\AppData\Local\Temp\pip-record-ipuoqz4r\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
</code></pre>

<p>I have  Microsoft Visual C++ 14.0.25 is installed in my system.
If someone knows any better tool/framework/package for testing api using python please help me. I want to check the registration api with many users at a time.</p>
",https://stackoverflow.com/questions/61592069/locust-is-not-installing-on-my-windows-10-for-load-testing,"['python', 'load-testing', 'locust']",4181,True,0,2
Unauthorized error while performing load testing on HMAC API using Jmeter,"<p>I am performing load testing of HMAC API, I get an error message ""unauthorized"".
The API requests in POSTMAN uses HMAC authentication and generates a code.
I tried converting into jmx format from json via Loadimpact. The converted file doesn't hold the HMAC code. In Jmeter, file doesn't load the HMAC code.</p>

<p>Can anyone advice what alternative solutions are available? Does it really work with bean shell pre/post procedures.</p>
",https://stackoverflow.com/questions/60165477/unauthorized-error-while-performing-load-testing-on-hmac-api-using-jmeter,"['jmeter', 'load', 'hmac']",188,False,0,1
How can one execute Java code using Gatling load testing framework?,"<p>I am evaluating different load testing tools. After trying JMeter and having two exceptions when running and viewing the test result, I would like to give Gatling a spin. Reading to various resources I fail to find an idea how to execute once own Java Code.</p>
<p>I understand that Gatling is written in Scala but it runs on a JDK and Scala is able to incooperate/call Java code. So the question is, what does it take to combine both and if there are any resources available.</p>
",https://stackoverflow.com/questions/64593941/how-can-one-execute-java-code-using-gatling-load-testing-framework,"['java', 'scala', 'gatling']",2563,False,0,1
Load testing - decreased number of concurrent users and low session times,"<p>I use tsung to do a load test. I recorded browser behavior with tsung recorder. I did not add anything to the xml file I saved with tsung-recorder.</p>

<p>XML:</p>

<pre><code>    &lt;session name='rec20200313-1147' probability='100'  type='ts_http'&gt;
    &lt;request&gt;&lt;http url='https://www.example.com/' version='1.1' method='GET'&gt;
    &lt;http_header name='Accept' value='text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' /&gt;
    &lt;http_header name='Accept-Encoding' value='gzip, deflate' /&gt;
    &lt;http_header name='Accept-Language' value='en-US,en;q=0.5' /&gt;&lt;/http&gt;&lt;/request&gt;

    &lt;thinktime random='true' value='10'/&gt;

    &lt;request&gt;&lt;http url='https://www.example.com/arama?aranan=example' version='1.1' method='GET'&gt;
    &lt;http_header name='Accept' value='text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' /&gt;
   &lt;http_header name='Accept-Encoding' value='gzip, deflate' /&gt;
   &lt;http_header name='Accept-Language' value='en-US,en;q=0.5' /&gt;&lt;/http&gt;&lt;/request&gt;

   &lt;thinktime random='true' value='17'/&gt;

   &lt;request&gt;  &lt;http url='/arama?search=loadtest&amp;amp;siralama=1' version='1.1' method='GET'&gt;
  &lt;http_header name='Accept' value='text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' /&gt;
   &lt;http_header name='Accept-Encoding' value='gzip, deflate' /&gt;
   &lt;http_header name='Accept-Language' value='en-US,en;q=0.5' /&gt;&lt;/http&gt;&lt;/request&gt;
   &lt;/session&gt;
</code></pre>

<p>When I tried to do this test with 300 bots, the number of users was not more than 200,000. Also this number suddenly began to decrease</p>

<p>Example:</p>

<ul>
<li>I started testing.</li>
<li>20,000 (In 10 seconds)</li>
<li>80,000 (Withing 40 seconds)</li>
<li>170,000 ( 1 min)</li>
<li>50,000 (over a minute)</li>
<li>70,000</li>
<li>100,000</li>
<li>60,000</li>
<li>Test finished</li>
</ul>

<p>I have tried many different scenarios.But I aimed to increase up to 1 million users. That's all I've observed on my side</p>

<p>Administrators who owners the application which I tested said:</p>

<ul>
<li>There is no blocking.</li>
<li>Your session duration does not take more than 5 seconds.</li>
</ul>

<p>The test is over. Afterwards, when logs were checked, they said that i got TCP RST response</p>

<p>I try to understand where the error is about this issue. </p>

<p>What did I do missing in tsung-recorder ? How can I emulate a real browser with tsung-recorder. Why did I get a TCP RST response? Is tsung a suitable tool for what i want to do. What's wrong.</p>

<p>Note: I was not successful when I wanted to make an http get attack.</p>
",https://stackoverflow.com/questions/60735805/load-testing-decreased-number-of-concurrent-users-and-low-session-times,"['performance-testing', 'load-testing', 'tsung', 'tsung-recorder']",140,True,0,1
Automatic distributed reading of csv file in Jmeter distributed load testing?,"<p>My scenario is while doing distributed load testing through jmeter i want csv file should read in auto distributed manner . <em>example</em>
if i have 100 users entry in <strong>csv data set config</strong> file and number of slave server is 10. so in normal scenario i have to keep csv file entry in arranged manner like </p>

<pre><code>user1- to 10 at slave-1
user-11to20 at slave-2
.
.
.
user-91 to 100 at slave 3
</code></pre>

<p>so i want same csv file have entry of all 100 users should be placed at all slave and jmeter automatically read entry from these files and distribute it .</p>
",https://stackoverflow.com/questions/61723831/automatic-distributed-reading-of-csv-file-in-jmeter-distributed-load-testing,"['csv', 'jmeter']",1250,True,0,2
Load Testing on Jmeter for Multiple User Login Through mysql database,"<p>I'm performing load testing on a Java application using Jmeter. I have a mysql database through which I want to fetch users and their password in order to test for login. The steps I’ve followed till now are:</p>
<ol>
<li>Setup of jmeter on system and installing blazemeter plugin on chrome.</li>
<li>Recorded test script for one user login through blazemeter. Edited it to remove all HTTP GET requests so the file only had HTTP POST requests. Saved as &quot;login.jmx.”</li>
<li>Opened login.jmx on jmeter which by default added all the required elements, such as cookie cache manager etc.</li>
<li>Added JDBC configuration to make a connection with mysql database.</li>
<li>Added JDBC connection with select statement
SELECT name, passwd FROM t_user;</li>
<li>Added a result tree and ran my script, all the HTTP POST requests as well as the jdbc request are working and all usernames and passwords are appearing.</li>
<li>In order to dynamically change the usernames and passwords going in the HTTP POST request I added in the VARIABLE NAME field of JDBC request
username, pass
and saved as OBJECT.</li>
<li>Added a counter that starts from 1 and increments by 1 in order to fetch users till the table ends.</li>
<li>Then I wrote the following statement in my HTTP POST request in the parameters tab where credentials of user are sent as:
{&quot;username&quot;:&quot;${_<em>V(username</em>${counter})}&quot;,&quot;password&quot;:&quot;${_<em>V(pass</em>${counter})}&quot;}
However, the username and password don’t go as text instead I get the same code back as shown in the ss below:
<a href=""https://i.stack.imgur.com/ZiSpS.png"" rel=""nofollow noreferrer"">i get the same variables back instead of the actual username and password</a></li>
</ol>
<p>Could anyone guide me as to where I might be going wrong?</p>
",https://stackoverflow.com/questions/65335029/load-testing-on-jmeter-for-multiple-user-login-through-mysql-database,"['java', 'mysql', 'authentication', 'jdbc', 'jmeter']",366,False,0,1
K6 Load Testing - How to make sequential id for entire test run,"<p>I have a api endpoint that each request need to be a different id , but how to make a id global and sequentual increment for each iteration shared for all VU, like a primary key on database table.</p>
<p>Ex:</p>
<pre><code>request 1 : &lt;id&gt;400&lt;/id&gt; VU :1
request 2 : &lt;id&gt;401&lt;/id&gt; VU :1

request 1 : &lt;id&gt;402&lt;/id&gt; VU :2

request 3 : &lt;id&gt;403&lt;/id&gt; VU :1
request 4 : &lt;id&gt;404&lt;/id&gt; VU :1

request 2 : &lt;id&gt;405&lt;/id&gt; VU :2
request 3 : &lt;id&gt;406&lt;/id&gt; VU :2
</code></pre>
<p>Is there any way to declare a variable that is shared by the entire test?
Setup and Init are for each VU and cannot share data according to the documentation.</p>
",https://stackoverflow.com/questions/63294269/k6-load-testing-how-to-make-sequential-id-for-entire-test-run,"['javascript', 'load-testing', 'k6']",2996,True,3,2
"PostgreSQL: Load testing throws error - Npgsql.PostgresException: &#39;53300: sorry, too many clients already&#39;","<p>i have a simple code that tries to simulate a load test for my Postgres database</p>
<pre><code>            List&lt;Values&gt; values = new List&lt;Values&gt;();

            for (int i = 0; i &lt; 200; i++)
            {
                var mythread = new Thread(() =&gt;
                {
                    DatabaseConnection db = new DatabaseConnection();
                    using (var conn = db.GetDatabaseConnection())
                    {
                        var cmd = new NpgsqlCommand();
                        cmd.Connection = conn;
                        cmd.CommandText = &quot;SELECT val.id, val.name FROM val.myvalue val&quot;;
                        cmd.Prepare();
                        var reader = cmd.ExecuteReader();
                        try
                        {
                            while (reader.Read())
                            {
                                Values value = new Values();
                                value.Id = reader.GetInt64(0);
                                value.Name = reader.GetString(1);

                                values.Add(value);
                            }
                            reader.Close();
                        }
                        catch (Exception ex)
                        {
                            reader.Close();
                            var exception = ex;
                            throw exception;
                        }
                    }
                });

                mythread.Start();
            }
</code></pre>
<p>but when I run this I get the error <strong>Npgsql.PostgresException: '53300: sorry, too many clients already'</strong></p>
<p>Database connection class</p>
<pre><code>public class DatabaseConnection
{
    public NpgsqlConnection GetDatabaseConnection()
    {
        var connectionstring = &quot;User ID=myuser;Password=mypassword;Server=localhost;Port=5432;Database=myvaluesdb;Pooling=True;Minimum Pool Size=10;Maximum Pool Size=100;Trust Server Certificate=true;Connection Idle Lifetime=300;keepalive=10;Timeout=60&quot;;
        NpgsqlConnection connection = null;

        try
        {
            connection = new NpgsqlConnection(connectionstring);
            connection.Open();
        }
        catch (Exception)
        {
            // try to reconnect
            connection = new NpgsqlConnection(connectionstring);
            connection.Open();
        }

        if (connection.State == ConnectionState.Open)
            Console.WriteLine(&quot;connection status = OPEN&quot;);
        else
        {
            var exception = new Exception(&quot;could not get DB connection&quot;);
            throw exception;
        }

        return connection;
    }
}
</code></pre>
<p>checking the max_connections shows 100
<br/>
so my question is is this normal or is there something am doing wrong that needs to be corrected and if so how can i correct this
<br/>
Thanks</p>
",https://stackoverflow.com/questions/63988893/postgresql-load-testing-throws-error-npgsql-postgresexception-53300-sorry,"['c#', 'postgresql']",1967,True,3,1
Can we do big data load testing by using Java request sampler?,"<p>We have created custom Hbase plugin and we are using sampler as &quot;java request&quot; in jmeter, here we are passing &quot;table name&quot;, data, Zooker keeper location then we are inserting the data to Hbase then data is inserting to Hbase, Now my question is how we can update and delete the data ? by using the java request sampler?</p>
<p>Please advise me a solution, it will be great helpful.</p>
",https://stackoverflow.com/questions/63242862/can-we-do-big-data-load-testing-by-using-java-request-sampler,"['performance', 'jmeter', 'load-testing', 'database-performance']",30,False,0,0
How to use Robot Framework Scripts for Load Testing or performance testing,"<p>I have python scripts which are based on Robot Framework and were generally developed for Functional Testing. How can I achieve the Load Testing?
How to approach this problem? should I use Jmeter in order to run load testing (if yes then how is it possible) or there are some other methods available?</p>
",https://stackoverflow.com/questions/62080233/how-to-use-robot-framework-scripts-for-load-testing-or-performance-testing,"['selenium', 'jmeter', 'robotframework']",5244,True,0,2
"Jmeter Hbase testing , How to preform the load testing for Big data?","<p>I am new to jmeter Hbase load testing, i have install all plugins related to Hbase load testing, can any one help what exactly i need to do load testing on Hbase and what all need to capture the details related to Hbase load testing.</p>
<ol>
<li>what are the scenarios i need to execute and how i can proceed the Hbase load testing.</li>
</ol>
",https://stackoverflow.com/questions/62638491/jmeter-hbase-testing-how-to-preform-the-load-testing-for-big-data,"['jmeter', 'bigdata', 'performance-testing', 'load-testing', 'query-performance']",253,False,-1,1
How to generate composite html report for distributed load testing in jmeter?,"<p>Context: I am running JMeter load test on a distributed load system with 1:2 master slave ratio, with the following command:</p>
<p>jmeter -n -t &quot;home/jmeterscripts/EventGridScript.jmx&quot; -R slave1:1099,slave2:1099 -l &quot;home/jmeterscripts/Result.csv&quot; -e -o &quot;home/jmeterscripts/HTMLReports&quot;</p>
<p>Will the result report to the same report.html because I am getting error of Result.csv presence from slave2 while reporting? how to handle it this, didn't find similar post.</p>
",https://stackoverflow.com/questions/63362975/how-to-generate-composite-html-report-for-distributed-load-testing-in-jmeter,"['jmeter', 'jmeter-plugins']",585,True,0,1
K6 Load Testing - How to run different scenarios at the same time,"<p>I have written a simple K6 Load testing script that performs a successful login.
I have written a separate K6 Load testing script that performs an unsuccessful login attempt</p>
<p>They are currently separate scripts that you have to run on their own.</p>
<p>What I want to know is how do you simulate users performing different scenarios in one load test? e.g. valid login, invalid login, logout, any other actions.</p>
<p>Do you put the different scenarios all in one script?</p>
",https://stackoverflow.com/questions/63152130/k6-load-testing-how-to-run-different-scenarios-at-the-same-time,['k6'],3787,True,0,1
K6 Load Testing - Can the result be output into the Continuous Integration Pipeline?,"<p>We are using K6 for our load testing.</p>
<p>We want to add the load tests into our Continuous Integration pipeline (Microsoft Azure).</p>
<p>We were hoping that we could set thresholds that pass or fail the test. If the test fails, the Azure build pipeline would continue, however if the test fails the build pipeline would stop.</p>
<p>Can this be done in K6?</p>
",https://stackoverflow.com/questions/63831729/k6-load-testing-can-the-result-be-output-into-the-continuous-integration-pipel,"['azure', 'k6']",854,True,1,2
Does load testing using Tsung on an xmpp ejabberd server create original data?,"<p>I am new to xmpp/ejabberd and also to testing. I have an ejabberd xmpp server setup for my chat application.
I am using Tsung to do load testing on the server.</p>
<p>For this I am creating multiple scenarios or sessions where the Tsung will create MUC and send messages to that MUC.</p>
<p>It works fine, until a question came to my mind.</p>
<p>The tsung does the load testing, and generates the reports too, but why isn't the rooms that are created by tsung and the messages that are sent to those MUC does not reflect on the Server.</p>
<p>I have checked it using ejabberd rest APIs. I don't see any rooms created by tsung. I can assure that the xmpp server works fine as I have created rooms and sent messages from my chat application.</p>
<p>Is it that the tsung only creates dummy data that it later delete once the test is complete?
Or like its said on their docs that it simulates traffic. Does that mean it does not create any of those data?
Or is it with my tsung configuration?</p>
<p>I am sorry if this sounds silly.</p>
<p>Thanks in advance!</p>
",https://stackoverflow.com/questions/63246775/does-load-testing-using-tsung-on-an-xmpp-ejabberd-server-create-original-data,"['xmpp', 'load-testing', 'ejabberd', 'tsung']",269,True,0,1
AKS API Load testing error: Premature end of Content-Length delimited message body,"<p>While load testing, after some successful responses from the API, JMeter records errors:
'Premature end of Content-Length delimited message body'.</p>

<p>From logs inside the code the response seems to complete normally.</p>

<p>The APP is deployed on AKS with ingress nginx/1.15.10 controllers. The APP consists of 4 separate APIs (one master calling the 3 others). The APIs are created in FLASK with CONNEXION and run in a WSGIContainer on a Tornado HTTPServer.</p>

<p>Another confusing factor is that the APP is deployed on two AKS instances on the same cluster. The one deployment does not return errors and the other does.</p>

<p>What could be causing the error?</p>
",https://stackoverflow.com/questions/61172941/aks-api-load-testing-error-premature-end-of-content-length-delimited-message-bo,"['api', 'flask', 'kubernetes', 'tornado', 'azure-aks']",237,False,0,1
SSLClient not able to serve more than 3 requests/sec during jMeter Load Testing,"<p>I have a Spring-boot based REST API which in turn consumes another Secure SOAP Service . All works fine until I load test it with jmeter , Even a simple 5 Requests/Sec causes example errors like below .</p>
<pre><code>example 1 : 
             Error :Socket closed
example 2 :
             java.net.ProtocolException: Cannot write output after reading input
</code></pre>
<p>Given that the line <code>sslContext = sslconfig.setupSSLContext();</code> would load the Truststore and Keystore successfully to setup the SSL Context , below is my SSLClinet.</p>
<pre><code>public class SSLClient {
    
        static SSLClient _sslClient = null;
        int _responseCode = -1;     
        URL url_ = null;
        HttpsURLConnection connection_ = null;
        static SSLContext sslContext = null;
        
        private SSLClient(EnvironmentConfig environmentConfig,PropertyConfig propertyConfig) {
            SSLUtil sslconfig = new SSLUtil(environmentConfig,propertyConfig);
            sslContext = sslconfig.setupSSLContext();
        }
        
        public static SSLClient getSSLClient(EnvironmentConfig environmentConfig,PropertyConfig propertyConfig) {
            if (_sslClient == null) {
            _sslClient = new SSLClient(environmentConfig,propertyConfig);
            }
            return _sslClient;
        }
        
        private boolean setSSLConnection(URL url, String method, String msgtype) {
            HttpsURLConnection.setDefaultSSLSocketFactory(sslContext
            .getSocketFactory());
            try {
                connection_ = (HttpsURLConnection) url.openConnection();
                connection_.setSSLSocketFactory(sslContext.getSocketFactory());
                if(method == &quot;POST&quot;)
                    connection_.setRequestMethod(method);
                connection_.setDoOutput(true );
                connection_.setRequestProperty(&quot;Content-Type&quot;, msgtype /*&quot;text/xml&quot; */ );
                connection_.connect();
                return true;
            } catch (Exception e) {
                log.error(&quot;Exception occurred while establishing connection to SSL server. Error :&quot;+ e.getMessage());
                log.error(e);
                connection_.disconnect();
                connection_ = null;
                return false;
            }
        }
        
        public void releaseConnection() {
            connection_.disconnect();
            connection_ = null;
        }
        
        /**
         * 
         * @param url
         * @param method
         * @param message
         * @param msgtype json or xml
         * @return
         */
        public String sendRequest(URL url, String method, String message, String msgtype) {
            String response = null;
            if (setSSLConnection(url,method,msgtype)) {
                try{
                    //Sending the request to Remote server
                    OutputStreamWriter writer = new OutputStreamWriter(connection_.getOutputStream());
                    writer.write(message);
                    writer.flush();
                    writer.close();
                    _responseCode = connection_.getResponseCode();
                    log.info(&quot;Server Response Code :&quot; + _responseCode);
                    // reading the response
                    InputStreamReader reader = new InputStreamReader(connection_.getInputStream());
                    StringBuilder buf = new StringBuilder();
                    char[] cbuf = new char[ 2048 ];
                    int num;
                    while ( -1 != (num = reader.read( cbuf )))
                    {
                        buf.append(cbuf, 0, num );
                    }
                    response = buf.toString();
                    reader.close();
                  }catch(Exception e){
                    response = &quot;&lt;EXCEPTION&gt;Exception occurred while sending message&lt;/EXCEPTION&gt;&quot;;
                    log.error(&quot;Exception occurred while sending Request. Error :&quot;+ e.getMessage());
                    log.error(e);
                 }
            }
            releaseConnection();
            return response;
        }

}

</code></pre>
<p>I use the client in one of the service impl classes as below ( The code below is called for each request which comes in )</p>
<pre><code>SSLClient sslClient = SSLClient.getSSLClient(environmentConfig,propertyConfig);
response = sslClient.sendRequest(url, &quot;POST&quot;, message, msgtype);

</code></pre>
<p>As you see in SSLClinet , I'm creating a Singleton object for HttpsURLConnection
Is Opening and Closing the connection for every request creating the problem ?
Should i implement some better ways to effectively access a Secured SOAP Webservice ?</p>
",https://stackoverflow.com/questions/62612501/sslclient-not-able-to-serve-more-than-3-requests-sec-during-jmeter-load-testing,"['java', 'performance', 'spring-boot', 'web-services', 'sockets']",30,False,1,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
Load Testing couchbase server - Unable to capture calls triggered from couchbase lite to sync_gateway,"<p>Our mobile app uses couchbase lite (version 2.7) and it replicates the data to couchbase server through sync_gateway. Now we want to capture the calls being triggered from couchbaseLite to the sync_gateway. we need to capture these calls because we want to simulate these calls in our load testing tool and load test the sync_gateway directly from our load test tool.</p>
<p>we tried using charles proxy to capture these requests, but however we are not able to capture the replication requests. Only request i could capture is _blipsync call (and that too in websocket format).</p>
<p>I understand that couchbaseLite 2.7 talks to sync gateway in websocket layer. But is there a way i can capture the requests triggered from couchbase lite to the sync_gateway for push/pull replications?</p>
",https://stackoverflow.com/questions/63258067/load-testing-couchbase-server-unable-to-capture-calls-triggered-from-couchbase,"['websocket', 'couchbase', 'couchbase-lite', 'couchbase-sync-gateway']",166,False,1,1
HTTP/1.1 401 Unauthorized error message is encountered when doing load testing in soapui,"<p>I am doing a simple load testing in soapui with 5 threads and I am encountering this error in the logs: &quot;DEBUG:Receiving response: HTTP/1.1 401 Unauthorized&quot;. I gave soapui the authorization details (using Basic authorization). When I send the request without using load testing, I receive a successful response. The error is encountered only when I execute load testing.</p>
<p>Any ideas as to why this happens?</p>
<p>Thanks!</p>
",https://stackoverflow.com/questions/63628121/http-1-1-401-unauthorized-error-message-is-encountered-when-doing-load-testing-i,"['web-services', 'soap', 'soapui', 'performance-testing', 'load-testing']",621,False,0,0
K6 Load Testing - How to calculate accurate response times when using the rps option,"<p>I am recording how long each request takes by capturing Date.now() before and after the request.</p>
<p>I am doing this because the inbuild metric for the response time only records the time taken for the FIRST REQUEST and not for any redirects that it follows.</p>
<p>My method was working fine until I started using the rps option.</p>
<p>The rps option throttles how many requests per second are sent.</p>
<p>The problem that this is causing is that my manual calculations are going up even though the HTTP_REQ_DURATION is roughly the same.</p>
<p>I presume this is because of the RPS throttle i.e. it is WAITING and this is causing my calc using Date.now() to go up - which is not an accurate reflection of what is happening.</p>
<p>How can I calculate the total time taken for a response to a request including all redirects when I am using the rps option?</p>
",https://stackoverflow.com/questions/65130775/k6-load-testing-how-to-calculate-accurate-response-times-when-using-the-rps-op,['k6'],871,True,0,1
Load testing azure app service yields terrible results for simple requests (asp.net Core WebAPI),"<p>The application is a asp.net Core WebAPI. We are using jmeter with taurus to run the tests on an agent in azure devops. When load testing the API we see spikes in response time even if the endpoint returns OK immediately on the first line of code.</p>
<p>The spikes start happening at ~20 hits per second.</p>
<p>What we have tried:</p>
<ul>
<li>Scaling up the app service (higher tier plan) and adding multiple instances.</li>
<li>Configuring the thread pool according to <a href=""https://learn.microsoft.com/en-us/troubleshoot/aspnet/performance-call-web-service"" rel=""nofollow noreferrer"">recommendations</a>.</li>
</ul>
<p>Test result:
<a href=""https://i.stack.imgur.com/zovdY.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/zovdY.png"" alt=""enter image description here"" /></a>
When we reach ~20 hit/s the response time jumps from 50ms to almost 20 seconds.</p>
",https://stackoverflow.com/questions/64427888/load-testing-azure-app-service-yields-terrible-results-for-simple-requests-asp,"['asp.net-core', 'jmeter', 'azure-web-app-service', 'load-testing', 'taurus']",328,True,0,1
"Load testing throws Server 502 error: Bad Gateway after 700 users. Gunicorn, Gevent, Nginx, Django","<p>I'm trying to reach 2000 concurrent users with my benchmarking tool. I'm using locust to simulate them. </p>

<p>My server has 24vCPUs, 128GB RAM, 25SSD. </p>

<p>I want to be able to serve 2000 concurrent users without errors but after only 700 users I run into trouble.</p>

<h2>Gunicorn</h2>

<p>I installed gevent to be able to serve async but this didn't change anything on my load test (can gevent not be working?).
My systemd file is as follows:</p>

<p><strong>mysite-production.conf</strong></p>

<pre><code>    [Unit]
    Description=mysite production daemon
    After=network.target

    [Service]
    User=www-data
    Group=www-data
    WorkingDirectory=/var/www/mysite/production/src
    ExecStart=/var/www/mysite/production/venv/bin/gunicorn --worker-class=gevent --worker-connections=1000  --workers=49 --bind unix:/var/www/mysite/production/sock/gunicorn --log-level DEBUG --log-file '/var/www/mysite/production/log/gunicorn.log' mysite.wsgi:application
    ExecReload=/bin/kill -s HUP $MAINPID
    ExecStop=/bin/kill -s TERM $MAINPID

    [Install]
    WantedBy=multi-user.target

</code></pre>

<p>According to my calculations: 49 x 1000 = 49000 requests per second that I could be serving. </p>

<p>Instead at about 700 users I get the following error in my locust failures tab:</p>

<pre><code># fails Method  Name    Type
1227    GET     //  HTTPError('500 Server Error: Internal Server Error for url: http://my.site.com//')
</code></pre>

<p>It basically says I have a internal server error.</p>

<p>when I open my gunicorn.log I see <strong>Ignoring EPIPE</strong>:</p>

<p><strong>gunicorn.log</strong></p>

<pre><code>[2020-01-27 20:22:30 +0000] [13121] [DEBUG] Ignoring EPIPE
[2020-01-27 20:22:31 +0000] [13121] [DEBUG] Ignoring EPIPE
[2020-01-27 20:22:31 +0000] [13121] [DEBUG] Ignoring EPIPE
[2020-01-27 20:22:31 +0000] [13121] [DEBUG] Ignoring EPIPE
[2020-01-27 20:22:31 +0000] [13121] [DEBUG] Ignoring EPIPE
</code></pre>

<h2>Nginx</h2>

<p>My nginx access.log shows some 499 and 500 errors:</p>

<p><strong>access.log</strong></p>

<pre><code>185.159.126.246 - - [27/Jan/2020:19:22:25 +0000] ""GET // HTTP/1.1"" 200 30727 ""-"" ""python-requests/2.22.0""
185.159.126.246 - - [27/Jan/2020:19:22:25 +0000] ""GET // HTTP/1.1"" 499 0 ""-"" ""python-requests/2.22.0""
185.159.126.246 - - [27/Jan/2020:19:22:25 +0000] ""GET // HTTP/1.1"" 499 0 ""-"" ""python-requests/2.22.0""
185.159.126.246 - - [27/Jan/2020:19:22:25 +0000] ""GET // HTTP/1.1"" 200 30727 ""-"" ""python-requests/2.22.0""
185.159.126.246 - - [27/Jan/2020:19:22:25 +0000] ""GET // HTTP/1.1"" 500 2453 ""-"" ""python-requests/2.22.0""
185.159.126.246 - - [27/Jan/2020:19:22:25 +0000] ""GET // HTTP/1.1"" 500 2453 ""-"" ""python-requests/2.22.0""
185.159.126.246 - - [27/Jan/2020:19:22:25 +0000] ""GET // HTTP/1.1"" 499 0 ""-"" ""python-requests/2.22.0""
185.159.126.246 - - [27/Jan/2020:19:22:25 +0000] ""GET // HTTP/1.1"" 499 0 ""-"" ""python-requests/2.22.0""

</code></pre>

<p>the nginx error.log doesn't show anything, but in the previous test it showed <strong>Resource temporary unavailable</strong>:</p>

<p><strong>error.log</strong></p>

<pre><code>
2020/01/27 19:15:32 [error] 1514#1514: *57151 connect() to unix:/var/www/mysite/production/sock/gunicorn failed (11: Resource temporarily unavailable) while connecting to upstream, client: 185.159.126.246, server: my.site.com, request: ""GET // HTTP/1.1"", upstream: ""http://unix:/var/www/mysite/production/sock/gunicorn://"", host: ""my.site.com""
2020/01/27 19:15:32 [error] 1514#1514: *56133 connect() to unix:/var/www/mysite/production/sock/gunicorn failed (11: Resource temporarily unavailable) while connecting to upstream, client: 185.159.126.246, server: my.site.com, request: ""GET // HTTP/1.1"", upstream: ""http://unix:/var/www/mysite/production/sock/gunicorn://"", host: ""my.site.com""

</code></pre>

<p>Here is my nginx.conf:</p>

<p><strong>nginx.conf</strong></p>

<pre><code>user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
worker_rlimit_nofile 40000;

events {
        worker_connections 4096;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
   }

</code></pre>

<p>and here is my server block:</p>

<p><strong>my.site.com (server-block)</strong></p>

<pre><code>
upstream mysite-production {
    server unix:/var/www/mysite/production/sock/gunicorn;
}
server {
    listen [::]:80;
    listen 80;
    server_name my.site.com;

    # set client body size to 100M #
    client_max_body_size 100M;

    location / {
      include proxy_params;
      proxy_pass http://unix:/var/www/mysite/production/sock/gunicorn;
    }

    location /static/ {
        root /var/www/mysite/production/;
        expires 30d;
        add_header Vary Accept-Encoding;
        access_log off;
        gzip on;
        gzip_comp_level 6;
        gzip_vary on;
        gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype;
    }

    location /media/ {
        root /var/www/mysite/production/;
        expires 30d;
        add_header Vary Accept-Encoding;
        access_log off;
    }
}
</code></pre>

<h2>Questions</h2>

<p>Questions that come up when I look at all this:</p>

<p>Where does the 502 error come from? It does not show me enough information to understand what is happening... Are all my workers occupied after 700 users causing the errors?</p>

<p>Where does the 499 error come from?</p>

<p>Does it have anything to do with my postgresql database? if so how do I find out? </p>

<p>How can I know if gevent has worked or not? the results of the load tests with ab and locust haven't really changed. </p>

<p>what does <strong>Ignoring EPIPE</strong> mean and why is it happening?</p>

<p>I appreciate you taking the time to look at this. Thank you in advance for all your comments and answers! </p>

<p><strong>If you need more info please let me know and I will add it to my question.</strong></p>

<h1>EDIT:</h1>

<p>Based on @ServerFaults comment I checked how much memory gets drained when the load test happens. apparently nothing really significant:</p>

<pre><code>MemTotal:       132027088 kB
MemFree:        127013484 kB
MemAvailable:   126458072 kB
Buffers:           57788 kB
Cached:           401088 kB
</code></pre>

<p>After running <code>netstat -s</code> (I don't have the knowledge to understand what everything means):</p>

<pre><code>Ip:
    Forwarding: 2
    6956023 total packets received
    8 with invalid addresses
    0 forwarded
    0 incoming packets discarded
    6953503 incoming packets delivered
    6722961 requests sent out
    20 outgoing packets dropped
Icmp:
    107 ICMP messages received
    0 input ICMP message failed
    ICMP input histogram:
        destination unreachable: 45
        echo requests: 62
    968 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 906
        echo replies: 62
IcmpMsg:
        InType3: 45
        InType8: 62
        OutType0: 62
        OutType3: 906
Tcp:
    222160 active connection openings
    136492 passive connection openings
    78293 failed connection attempts
    161239 connection resets received
    2 connections established
    6245053 segments received
    6487229 segments sent out
    11978 segments retransmitted
    0 bad segments received
    185530 resets sent
Udp:
    667101 packets received
    41158 packets to unknown port received
    0 packet receive errors
    727164 packets sent
    0 receive buffer errors
    0 send buffer errors
UdpLite:
TcpExt:
    2939 SYN cookies sent
    28 SYN cookies received
    215 invalid SYN cookies received
    113 resets received for embryonic SYN_RECV sockets
    18751 TCP sockets finished time wait in fast timer
    175 packetes rejected in established connections because of timestamp
    61997 delayed acks sent
    54 delayed acks further delayed because of locked socket
    Quick ack mode was activated 3475 times
    2687504 packet headers predicted
    1171485 acknowledgments not containing data payload received
    2270054 predicted acknowledgments
    TCPSackRecovery: 921
    Detected reordering 22500 times using SACK
    Detected reordering 596 times using time stamp
    139 congestion windows fully recovered without slow start
    490 congestion windows partially recovered using Hoe heuristic
    TCPDSACKUndo: 14
    413 congestion windows recovered without slow start after partial ack
    TCPLostRetransmit: 47
    TCPSackFailures: 5
    7 timeouts in loss state
    2416 fast retransmits
    123 retransmits in slow start
    TCPTimeouts: 5279
    TCPLossProbes: 4284
    TCPLossProbeRecovery: 22
    TCPSackRecoveryFail: 1
    TCPDSACKOldSent: 3482
    TCPDSACKRecv: 1996
    TCPDSACKOfoRecv: 4
    52968 connections reset due to unexpected data
    54079 connections reset due to early user close
    51 connections aborted due to timeout
    TCPDSACKIgnoredOld: 25
    TCPDSACKIgnoredNoUndo: 822
    TCPSpuriousRTOs: 81
    TCPSackShifted: 4787
    TCPSackMerged: 5128
    TCPSackShiftFallback: 33199
    TCPReqQFullDoCookies: 2939
    TCPRcvCoalesce: 84434
    TCPOFOQueue: 26
    TCPChallengeACK: 3
    TCPAutoCorking: 7
    TCPFromZeroWindowAdv: 125
    TCPToZeroWindowAdv: 125
    TCPWantZeroWindowAdv: 1376
    TCPSynRetrans: 4695
    TCPOrigDataSent: 5023492
    TCPHystartTrainDetect: 2403
    TCPHystartTrainCwnd: 53596
    TCPHystartDelayDetect: 346
    TCPHystartDelayCwnd: 9883
    TCPACKSkippedSynRecv: 6
    TCPACKSkippedPAWS: 10
    TCPACKSkippedSeq: 15
    TCPWinProbe: 15
IpExt:
    InOctets: 6090026491
    OutOctets: 7098177391
    InNoECTPkts: 6966279
    InECT0Pkts: 11
    InCEPkts: 1
</code></pre>

<h2>Edit 2:</h2>

<p>After creating a static html page without spawning Gunicorn, and it was able to easily serve 4000 users without any delays. After passing the worker_connections I received:</p>

<pre><code>/loadtest/  ConnectionError(MaxRetryError(""HTTPConnectionPool(host='ll-my.site.com', port=80): Max retries exceeded with url: /loadtest/ (Caused by NewConnectionError('&lt;urllib3.connection.HTTPConnection object at 0x....&gt;: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))""))
</code></pre>

<p>From what I understand from this is that NGINX is not issue here.</p>

<h2>Edit 3:</h2>

<p>I checked my postgresql logs and found out that it's full of this error:</p>

<pre><code>FATAL:  remaining connection slots are reserved for non-replication superuser connections
</code></pre>
",https://stackoverflow.com/questions/59938087/load-testing-throws-server-502-error-bad-gateway-after-700-users-gunicorn-gev,"['django', 'postgresql', 'nginx', 'gunicorn', 'load-testing']",2012,False,4,0
How to pass XHR dynamically generated token in jmeter for load testing of my application,"<p>In my application, when i hit the URL, it generate a JWT token, which i have to pass in jmeter. How to do this.</p>

<p><a href=""https://i.stack.imgur.com/bJusk.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/bJusk.png"" alt=""enter image description here""></a>
<a href=""https://i.stack.imgur.com/JZvpX.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/JZvpX.png"" alt=""enter image description here""></a></p>

<p><a href=""https://i.stack.imgur.com/gGIWH.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/gGIWH.png"" alt=""enter image description here""></a></p>

<p><a href=""https://i.stack.imgur.com/orB8h.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/orB8h.png"" alt=""enter image description here""></a></p>
",https://stackoverflow.com/questions/59627368/how-to-pass-xhr-dynamically-generated-token-in-jmeter-for-load-testing-of-my-app,"['jmeter', 'performance-testing']",185,True,1,1
How can be set the network Bandwidth while load testing of any application using jmeter,"<p>I am doing the load testing of our API using jmeter. Now I need to set the network bandwidth to 256kbps and 512kbps.</p>
<p>I added below lines in apache-jmeter/bin/jmeter.properties but that didn't works.</p>
<pre><code>#httpclient.socket.http.cps=32728
#httpclient.socket.https.cps=32728
</code></pre>
<p>is any other approach to set the network bandwidth or any other best tool for this requirement?</p>
",https://stackoverflow.com/questions/64910723/how-can-be-set-the-network-bandwidth-while-load-testing-of-any-application-using,"['jmeter', 'load-testing']",161,False,0,1
How much time typically a load testing takes for any application to give the metrics?,"<p>How much time it takes to receive metrics like throughput, response time , latency etc after performing a performance or load test?</p>
<p>Are there any references for it and theories behind it? Also are there links on performing a manual load testing on a web application which we have developed?</p>
",https://stackoverflow.com/questions/62698520/how-much-time-typically-a-load-testing-takes-for-any-application-to-give-the-met,"['performance-testing', 'load-testing']",82,False,0,1
Tomcat unexpected maximum response time for a request when load testing is done using jmeter,"<p>I have a spring boot application which has a post endpoint which takes the request and send it to another service and get the response back and save it to mongo database and returned the response back to user. The application is deployed on embedded tomcat of spring boot. I am using jmeter to see the max response time, throughput etc.</p>

<p>When i ran a test from jmeter with 500 threads for 10 minutes, i got maximum time as around 3500ms. 
When i repeat the test from jmeter the maximum time gets reduced to 900ms. 
Again, if i run the test after a long time, the maximum again goes upto 3500ms.</p>

<p>I am not able to get any information regarding this behavior of tomcat.</p>

<p>Could you please help me with understanding this behavior of tomcat?</p>
",https://stackoverflow.com/questions/61605834/tomcat-unexpected-maximum-response-time-for-a-request-when-load-testing-is-done,"['spring-boot', 'jmeter', 'embedded-tomcat']",306,False,0,1
Spring Boot Application using Oracle - ORA-01000: maximum open cursors exceeded - error happening during load testing,"<p>Am working on spring-boot application. While performing load testing we get error </p>

<p>""ORA-01000:maximum open cursors exceeded""</p>

<p>We have following entries for spring boot and jdbc in the pom.xml file</p>

<pre><code>&lt;parent&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
    &lt;version&gt;2.1.6.RELEASE&lt;/version&gt;
&lt;/parent&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.oracle&lt;/groupId&gt;
    &lt;artifactId&gt;ojdbc6&lt;/artifactId&gt;
    &lt;version&gt;11.2.0.3&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>

<p>To fix the issue I tried changing the ""ojdbc"" from 6 to 8.</p>

<pre><code>&lt;dependency&gt;
    &lt;groupId&gt;com.oracle.jdbc&lt;/groupId&gt;
    &lt;artifactId&gt;ojdbc8&lt;/artifactId&gt;
    &lt;version&gt;12.2.0.1&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>

<p>but I still got the same issue.</p>

<p>All our backend calls using either ""jdbcTemplate"" or ""namedParameterJdbcTemplate"".</p>

<p>The error is happening during load testing.
Our Oracle DB cursor limit is 1000.
Load test run game the error after 1hr 55mins and failure rate our our service was 0.5%
the number of users/threads is set to 25.</p>

<p>Looking for some suggestions to fix this issue.</p>
",https://stackoverflow.com/questions/61071201/spring-boot-application-using-oracle-ora-01000-maximum-open-cursors-exceeded,"['java', 'spring-boot', 'jdbctemplate', 'ojdbc']",3202,True,1,4
K6 Load Testing - I am completely baffled by the stats that are printed at the end,"<p>Here is my very simple K6 script that I am running:</p>
<pre><code>import {group } from &quot;k6&quot;;
import { Trend} from &quot;k6/metrics&quot;;
let response = null;
let loginTime = new Trend('login_time');
import http from &quot;k6/http&quot;;

export let options = {
  stages: [
        {iterations: 1}
  ]
};

export default function(){

  group(&quot;Log In&quot;, function(){
    let url = &quot;myurl&quot;;
    let headers = {
          headers: {
            &quot;accept&quot;: &quot;*/*&quot;,
            &quot;accept-encoding&quot;: &quot;gzip, deflate, br&quot;,
            &quot;connection&quot;: &quot;keep-alive&quot;
          }
    };
    
    response = http.get(url,headers);

    loginTime.add(response.timings.duration);
    console.log(&quot;The duration for this request was:&quot; + response.timings.duration);
})
};
</code></pre>
<p>The script just sends one request and runs for one interation and I save the duration of this request to a Trend called 'login_time'.</p>
<p>The stats that K6 prints at the end are as follows:</p>
<pre><code>data_received..............: 29 kB  9.0 kB/s
    data_sent..................: 3.4 kB 1.1 kB/s
    group_duration.............: avg=3.15s      min=3.15s      med=3.15s      max=3.15s      p(90)=3.15s      p(95)=3.15s
    http_req_blocked...........: avg=414.88ms   min=2µs        med=291.79ms   max=1.31s      p(90)=976.28ms   p(95)=1.14s
    http_req_connecting........: avg=17.55ms    min=0s         med=25.97ms    max=31.96ms    p(90)=31.1ms     p(95)=31.53ms
    http_req_duration..........: avg=216.66ms   min=29.72ms    med=231.06ms   max=478.72ms   p(90)=407.62ms   p(95)=443.17ms
    http_req_receiving.........: avg=407.68µs   min=119.9µs    med=205.8µs    max=1.33ms     p(90)=892.84µs   p(95)=1.11ms
    http_req_sending...........: avg=74.86µs    min=12.4µs     med=76.8µs     max=170.2µs    p(90)=142.79µs   p(95)=156.49µs
    http_req_tls_handshaking...: avg=102.44ms   min=0s         med=73.61ms    max=315.35ms   p(90)=238.5ms    p(95)=276.93ms
    http_req_waiting...........: avg=216.18ms   min=29.59ms    med=230.68ms   max=477.3ms    p(90)=406.68ms   p(95)=441.99ms
    http_reqs..................: 5      1.563597/s
    iteration_duration.........: avg=3.15s      min=3.15s      med=3.15s      max=3.15s      p(90)=3.15s      p(95)=3.15s
    iterations.................: 1      0.312719/s
    login_time.................: avg=478.721924 min=478.721924 med=478.721924 max=478.721924 p(90)=478.721924 p(95)=478.721924
    vus........................: 1      min=1 max=1
    vus_max....................: 1      min=1 max=1
</code></pre>
<p>As you can see all the stats for my custom Trend 'login_time' show the same number 478.721924.</p>
<p>'login_time' is recording the 'response.timings.duration' - duration here is supposed to be 'http_req_duration'.</p>
<p>So I would expect the stats on the 'http_req_duration' row to be exactly the same as the 'login_time' stats i.e. all show 478.721924.</p>
<p>Instead the stats on the 'http_req_duration' row are completely different and all show different numbers even though only 1 iteration was ran so they should all be the same. (Only the 'max' values shows 478.72).</p>
<p>As only 1 iteration was ran - the data in each column for each row should be the same.</p>
<p>So my question is, can I trust any of these numbers and if so which ones?</p>
<p>Also, I want to report how long login took - is this just the http_req_duration value or do I have to include other values like http_req_blocked....or is that just waiting for K6 getting ready to send the request?</p>
",https://stackoverflow.com/questions/64050823/k6-load-testing-i-am-completely-baffled-by-the-stats-that-are-printed-at-the-e,['k6'],1614,True,0,1
Best way of running a cron job with puppeteer-cluster in a cron meant for load testing,"<p>I am doing load testing i don't want the server to crash which it was doing earlier when i was launching separate puppeteer instances and was trying to run two queries each of them fetching 100mb of data from mysql db, when i ran single puppeteer it went fine, so i researched and came across puppeteer-cluster, now basically i need to run cron every minute and there is no limit to what the number of no of requests per cron each minute, so what is the best practice here?</p>
<p>Option 1:</p>
<pre><code>// Launch cluster outside cron
const cluster = await Cluster.launch({
   concurrency: Cluster.CONCURRENCY_CONTEXT, // use one browser per worker
   maxConcurrency: 4, // cluster with four workers
   timeout: 3600000 // 1 Hour - worst case scenario
});

nodeCron.schedule(&quot;* * * * *&quot;, async () =&gt; {
   for (const items of items) {
      // Get item specific url
      cluster.queue(({ page, url }) =&gt; { 
         await page.goto(url, { timeout:  3600000 });
      });
   }
});
</code></pre>
<p>Option 2:</p>
<pre><code>nodeCron.schedule(&quot;* * * * *&quot;, async () =&gt; {
   // Launch cluster inside cron function
   const cluster = await Cluster.launch({
      concurrency: Cluster.CONCURRENCY_CONTEXT, // use one browser per worker
      maxConcurrency: 4, // cluster with four workers
   });

   for (const items of items) {
      // Get item specific url
      cluster.queue(({ page, url }) =&gt; { 
         await page.goto(url, { timeout:  3600000 });
      });
   }

   await cluster.idle();
   await cluster.close();
});
</code></pre>
<p>I am presently following Option 2, i am having problem understanding if i have to use option one will i have to keep my browser open indefinitely i.e when i will close it</p>
<ul>
<li>Note there can be any number of items every minute with no upper limit and and each item can go on upto 1 hour maximum as some worst case limit i put there since the request can load huge amounts of data ~ 250mb (should be in chunks but i cant change present architecture so this sometime gives no response for larger db tables)</li>
</ul>
",https://stackoverflow.com/questions/62646561/best-way-of-running-a-cron-job-with-puppeteer-cluster-in-a-cron-meant-for-load-t,"['node.js', 'cron', 'performance-testing', 'puppeteer', 'puppeteer-cluster']",446,False,1,0
Is it possible to do load testing with Selenium with many instances of cloud-based virtual machines?,"<p>Suppose we have a simple Selenium script where the tool queries a website's search field and records the response time. </p>

<p>Would it be possible to have 100*n virtual machines replicate this same action simultaneously, and record their respective response times? Our end-goal is to determine at what user count the response time begins to slow significantly. </p>
",https://stackoverflow.com/questions/62092290/is-it-possible-to-do-load-testing-with-selenium-with-many-instances-of-cloud-bas,"['selenium', 'testing', 'cloud', 'load', 'load-testing']",63,False,-1,1
How to configure jmeter for load testing a secure application if I have .pem files with me,"<p>I am new to JMeter, just started. I have a secure application and I downloaded the .pem file. I am confused(steps converting .pem to .cer or pk12) about how to use this for accessing the application. When I tried to convert .pem to pfx it is giving error saying either private key does not match or format is different. Can anyone help with a clear list of steps to follow to use JMeter for load testing the application? 
Thanks in advance.</p>
",https://stackoverflow.com/questions/60369519/how-to-configure-jmeter-for-load-testing-a-secure-application-if-i-have-pem-fil,"['jmeter', 'keystore']",335,False,0,1
"Jmeter response time confusion, In load testing what time do I need to consider as the response time","<p>I am using Jmeter for performan testing, I believe elapsed time is the response time which I am considering(i.e.,85 milliseconds). When I hit the same request from postman It is taking very less time(i.e.,35 milliseconds) so I want to know where my JMETER giving correct results or not</p>
",https://stackoverflow.com/questions/60007757/jmeter-response-time-confusion-in-load-testing-what-time-do-i-need-to-consider,"['jmeter', 'postman']",206,False,0,1
How to setup distributed JMeter load testing using one local machine as a client and aws VM instances as servers?,"<p>I want to set up load testing environment using JMeter and my local machine as a client and some AWS Ubuntu instances as servers. I followed almost every article and answers like this <a href=""https://stackoverflow.com/questions/16618915/setting-up-jmeter-for-distributed-testing-in-aws-with-connectivity-issues"">Setting up JMeter for Distributed testing in AWS with connectivity issues</a> and youtube tutorial but I get different exceptions every time. Can someone describe clearly step by step how to do that?</p>

<p>also, I can't find a clear answer to these questions:</p>

<ul>
<li><p>Which changes needed only in the jmeter.properties on the server-side or
only on the client-side and which changes needed on both sides?  </p></li>
<li><p>Do I need to change firewall config to allow some ports?</p></li>
<li><p>Will the client machine run part of the tests or not?</p></li>
</ul>
",https://stackoverflow.com/questions/61864021/how-to-setup-distributed-jmeter-load-testing-using-one-local-machine-as-a-client,"['amazon-web-services', 'jmeter', 'load-testing']",133,False,0,1
K6 Load Testing - Can you specify whether the output metric for data received/sent is shown in kB or MB?,"<p>K6 Load Testing</p>
<p>At the end of testing, the following metrics are shown:</p>
<pre><code>data_received..............: 1.4 MB  44 kB/s
data_sent..................: 214 kB  6.7 kB/s
</code></pre>
<p>In the above example, data_received is shown in MB whereas data_sent is shown in kB.</p>
<p>Is it possible to specify that these values are ALWAYS shown in kB or MB?</p>
<p>This will make comparing values easier as we know that we are comparing like with like.</p>
",https://stackoverflow.com/questions/63883213/k6-load-testing-can-you-specify-whether-the-output-metric-for-data-received-se,['k6'],269,True,0,1
How to find out the errors behind a lot of non-2xx or 3xx responses when load testing nginx reverse proxy with wrk,"<p>We are doing some test with NGINX as reverse proxy in front of two NGINX sample web servers. The tool being used in our tests is <a href=""https://github.com/wg/wrk"" rel=""nofollow noreferrer"">wrk</a>. The web servers' configuration are very simple. Each of them has a static page (similar to default welcome page) and the NGINX proxy is directing traffic in a round robin fashion. The aim of the test is to measure the impact of different OSes with a NGiNX reverse proxy on the results (We are doing this with CentOS 7, Debian 10 and FreeBSD 12)
In our results, (except FreeBSD) we have a lot of non-2xx or 3xx errors inside:</p>
<pre><code>      10 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    74.50ms  221.36ms   1.90s    91.31%
    Req/Sec     5.88k     4.56k   16.01k    43.96%
  Latency Distribution
     50%    4.68ms
     75%    7.71ms
     90%  196.01ms
     99%    1.03s 
  3509526 requests in 1.00m, 1.11GB read
  Socket errors: connect 0, read 0, write 0, timeout 875
  Non-2xx or 3xx responses: 3285230
Requests/sec:  58431.20
Transfer/sec:     18.96MB
</code></pre>
<p>As you can see, about 90 percent of the responses are in this category.
I've tried several different configurations on NGINX logging to &quot;catch&quot; some of these errors. But all I get is <code>200 OK</code> in the log. How can I get more information about these responses?</p>
",https://stackoverflow.com/questions/65491563/how-to-find-out-the-errors-behind-a-lot-of-non-2xx-or-3xx-responses-when-load-te,"['http', 'nginx', 'logging', 'wrk']",2100,True,4,3
How to check web page load time in Jmeter without using api.? Is it possible to perform load testing in jmeter without using api&#39;s?,"<p>I was given with a task in which I need to check load time of webpages in Jmeter and there is not any api's available. so hot to perform load testing without having api's.</p>
",https://stackoverflow.com/questions/61026308/how-to-check-web-page-load-time-in-jmeter-without-using-api-is-it-possible-to,"['jmeter', 'load-testing', 'web-api-testing']",785,True,0,1
"Jmeter Hbase testing , How to preform the load testing for Big data?","<p>I am new to jmeter Hbase load testing, i have install all plugins related to Hbase load testing, can any one help what exactly i need to do load testing on Hbase and what all need to capture the details related to Hbase load testing.</p>
<ol>
<li>what are the scenarios i need to execute and how i can proceed the Hbase load testing.</li>
</ol>
",https://stackoverflow.com/questions/62638491/jmeter-hbase-testing-how-to-preform-the-load-testing-for-big-data,"['jmeter', 'bigdata', 'performance-testing', 'load-testing', 'query-performance']",253,False,-1,1
HTTP/1.1 401 Unauthorized error message is encountered when doing load testing in soapui,"<p>I am doing a simple load testing in soapui with 5 threads and I am encountering this error in the logs: &quot;DEBUG:Receiving response: HTTP/1.1 401 Unauthorized&quot;. I gave soapui the authorization details (using Basic authorization). When I send the request without using load testing, I receive a successful response. The error is encountered only when I execute load testing.</p>
<p>Any ideas as to why this happens?</p>
<p>Thanks!</p>
",https://stackoverflow.com/questions/63628121/http-1-1-401-unauthorized-error-message-is-encountered-when-doing-load-testing-i,"['web-services', 'soap', 'soapui', 'performance-testing', 'load-testing']",621,False,0,0
Using JMeter testing tool,"<p>I was thinking about load testing with JMeter. When I add threads and test some services for load, it measures load time for my local IP yes? I mean when I create 100 threads it means that 100 user will hit service with same address? There will be much difference between load testing with different addresses?</p>

<p>I want to figure it out, if I do right job for load testing.</p>
",https://stackoverflow.com/questions/61309813/using-jmeter-testing-tool,"['testing', 'jmeter', 'load-testing']",112,True,0,2
Google Compute Engine Automated Load Test VM Instance?,"<p>I have a simple web server application in a docker container that I have pinned to a vm instance in GCP Compute Engine. </p>

<p>I am wondering how to set up automated load testing (Locust load testing via GKE) on the web server application running on my VM instance?</p>

<p>I saw a tutorial here: <a href=""https://cloud.google.com/solutions/distributed-load-testing-using-gke"" rel=""nofollow noreferrer"">https://cloud.google.com/solutions/distributed-load-testing-using-gke</a>. But this involves using App Engine. I am not able to find a GCP tutorial to auto load test vm instances in Compute Engine.</p>

<p>Any links or ideas?</p>
",https://stackoverflow.com/questions/62271347/google-compute-engine-automated-load-test-vm-instance,"['kubernetes', 'google-cloud-platform', 'google-compute-engine', 'load-testing', 'locust']",471,True,4,1
NETTY EventloopExecutor,"<p>This is my <code>childhandler</code>. All seems to work fine but when I start load testing at 60 users and 30 concurrently after about 3 minutes the server starts rejecting my connections. Any ideias on how to fix this?
I'm using <a href=""https://locust.io/"" rel=""nofollow noreferrer"">Locust</a> for load testing.</p>
<pre class=""lang-java prettyprint-override""><code>public class CspNettySocketServerInitializer extends ChannelInitializer&lt;SocketChannel&gt; {
    
    // ===========================================================
    // 1. define a separate thread pool to execute handlers with
    //    slow business logic. e.g database operation
    // ===========================================================
    final EventExecutorGroup group = new DefaultEventExecutorGroup(1500); //thread pool of 1500

    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(&quot;idleStateHandler&quot;, new IdleStateHandler(1, 1, 1, TimeUnit.MINUTES)); // https://netty.io/4.1/api/index.html?io/netty/handler/timeout/IdleStateHandler.html
        pipeline.addLast(new ByteArrayDecoder()); // add without name, name auto generated
        pipeline.addLast(new ByteArrayEncoder()); // add without name, name auto generated

        //===========================================================
        // 2. run handler with slow business logic 
        //    in separate thread from I/O thread
        //===========================================================
        pipeline.addLast(group, &quot;serverHandler&quot;, new CspNettyServerHandle()); 
        //pipeline.addLast(new CspNettyServerHandle());
    }
}
</code></pre>
",https://stackoverflow.com/questions/62717566/netty-eventloopexecutor,"['java', 'performance', 'netty', 'netty-socketio']",70,False,0,0
Integration Karate feature file with jmeter for load testing,"<p>I have to run karate feature files containing all the test through jmeter for load testing.
Any ways to convert karate feature file in to jmx file dynamically or any other way to convert these test feature files into jmeter supportive files for load testing.</p>
",https://stackoverflow.com/questions/63196077/integration-karate-feature-file-with-jmeter-for-load-testing,"['api', 'jmeter', 'karate', 'web-api-testing']",252,False,1,0
How to add ssh key using JGit in JMeter,"<p>I'm trying to do a load testing on a Bitbucket server using JMeter.
I referred this link <a href=""https://stackoverflow.com/questions/43679039/jmeter-and-bitbucket-server-load-testing"">Jmeter and Bitbucket server load testing</a>, but I'm not sure how to pass the ssh-key details using JGit in JSR223 Sampler in JMeter.</p>

<p>Thanks for the help!</p>
",https://stackoverflow.com/questions/60676731/how-to-add-ssh-key-using-jgit-in-jmeter,"['jmeter', 'jgit', 'jsr223']",744,False,0,1
HOW to do Load testing using gatling for 10000 QPS,"<p>gatling is great tool for load testing..
While exploring it how we can extend and do Load testing using gatling for 10000 QPS?
Simple scenario like for 1 hour 10000QPS for given exec scenarios.
Can someone suggest injection pattern to use?
Thanks in advance.</p>
",https://stackoverflow.com/questions/59889539/how-to-do-load-testing-using-gatling-for-10000-qps,"['load-testing', 'gatling']",420,True,0,1
Resolving promise inside function causes a X(...) is not a function error,"<p>I'm working on load testing my API, but at some point I make a call to a different API. 
Since I don't want to stress the second one, whenever I'm load testing I want to set a timeout and return an OK response like this:</p>

<pre><code>function sendMessage(requestLib, blockApi, logger) {
    if(!blockApi){
        return (*my params*) =&gt; requestLib(`someURL`, {
            headers: { Authorization: `Bearer ${token}` },
            method: 'post',
            data
        });
    }else{
        logger.info(""About to use the promise"");
        const response = returnOk.then(function() {
            return new Response(200, {}, null, 'dummy.com');
        });
        return response;
    }
}
</code></pre>

<p>returnOk is a Promise I defined earlier this way:</p>

<pre><code>const returnOk = new Promise((resolve, reject) =&gt; {
    setTimeout( function() {
      resolve(""Success!"") 
    }, 2000) 
  });
</code></pre>

<p>And the function <code>sendMessage</code> is called inside a different function like this:</p>

<pre><code>module.exports = ({ requestLib, Logger }) =&gt; async function(req, res) {
     // Some unrelated code to decide if I'll call sendMessage
     const response = await sendMessage(requestLib, blockApi, logger)(params);
     // I log the response
     res.end();
}
</code></pre>

<p>The regular flow works like a charm, but when I'm load testing and I get to returnOk.then()...
It throws </p>

<blockquote>
  <p>sendMessage(...) is not a function</p>
</blockquote>

<p>If I remove the timeout and just return</p>

<pre><code>return new Response(200, {}, null, 'dummy.com');
</code></pre>

<p>Things work just fine.</p>
",https://stackoverflow.com/questions/60065307/resolving-promise-inside-function-causes-a-x-is-not-a-function-error,"['javascript', 'promise', 'settimeout']",155,True,0,1
How to use Robot Framework Scripts for Load Testing or performance testing,"<p>I have python scripts which are based on Robot Framework and were generally developed for Functional Testing. How can I achieve the Load Testing?
How to approach this problem? should I use Jmeter in order to run load testing (if yes then how is it possible) or there are some other methods available?</p>
",https://stackoverflow.com/questions/62080233/how-to-use-robot-framework-scripts-for-load-testing-or-performance-testing,"['selenium', 'jmeter', 'robotframework']",5244,True,0,2
Is cloud based load testing deprecated?,"<p>Came across an article <a href=""https://devblogs.microsoft.com/devops/cloud-based-load-testing-service-eol/"" rel=""nofollow noreferrer"">https://devblogs.microsoft.com/devops/cloud-based-load-testing-service-eol/</a> which says that cloud-based load testing service has been deprecated.</p>

<p>in this article, at one point it says that, </p>

<blockquote>
  <p>""Running a load test in the cloud using Visual Studio (both
  auto-provisioned agents and self-provisioned ‘bring-your-own’ agents):
  You can continue to run the tests but self-hosted with Test
  Controller/Test Agent option outlined above.""</p>
</blockquote>

<p>If all my load testing agents, controllers are created as VMs in Azure - and I use my VSTS subscription to run these load tests then do I need to worry? The above paragraph is a little confusing, hence asking.</p>
",https://stackoverflow.com/questions/61946403/is-cloud-based-load-testing-deprecated,"['visual-studio', 'azure-devops', 'performance-testing', 'load-testing']",304,False,0,0
K8 container orchestration: JVM not releasing memory,"<p>We have java based microservices.  When these microservices are not serving any requests, each pod of the microservice is using about 270MB.   We have kept the memory limit as 512Mi for each microservice.</p>
<p>I did some load testing on some of these microservices. For one microservice, I made 20 API requests per second. For another , 30 requests per second.<br />
A consistent pattern that I have observed is that: the memory utilization goes up as I increase the load and memory does not get released after the load testing (unless of course that container gets terminated).<br />
Once I complete the load testing, I wait for an hour or so.   Yet, the memory utilization does not come down. The pod continues occupying same amount of memory as before.<br />
I also got a shell inside the container of such a pod, I can see only the <code>java process</code> and the <code>sh process</code> running. And indeed, I see that memory usage of the pod has increased to about 360MB.</p>
<p>So, a pod which usually takes 270MB (in absence of any load testing), takes 360MB under load test (of 30 API requests per second), and continues to use 360MB long after the load testing has completed.</p>
<p>I do not understand why the pod usage is not coming down.</p>
<p>Could it be:</p>
<ol>
<li>JVM heap usage problem, probably garbage collection not happening?</li>
<li>Something related to Kubernetes pod requests and limits settings?</li>
</ol>
<p>Here are my requests and limits for Kubernetes pods:</p>
<pre><code>  resources:
    limits:
      memory: 512Mi
      cpu: '0.5'
    requests:
      memory: 256Mi
      cpu: '0.1'
</code></pre>
<p>By the way, I am using <code>Apache JMeter</code> for API load testing.
The Docker image being used is : <code> openjdk:8-alpine</code><br />
I also downloaded the heap dump and opened it in <code>Eclipse Memory analyzer tool</code>.<br />
But, I do not see any application classes (from our code) using a lot of heap.<br />
I see classes related to JDK and Spring framework only, and they do not show any memory leak.</p>
<p>So, the mystery for me is : why does memory usage not come down even 2-3 hours after load testing?<br />
Is it the Kubernetes config of requests and limits OR is it the JVM GC settings tuning?<br />
Is it possible that JVM GC settings are not playing nicely with Kubernetes requests and memory limits?</p>
<p>adding JVM details for reference:</p>
<pre><code>openjdk version &quot;1.8.0_212&quot;
OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
</code></pre>
",https://stackoverflow.com/questions/64051579/k8-container-orchestration-jvm-not-releasing-memory,"['java', 'performance', 'kubernetes', 'microservices', 'heap-dump']",1510,False,2,0
MQTT.fx tool support for load testing,"<p>Does MQTT.fx tool supports load testing? I want to test GCP cloud IoT core by sending multiple messages. </p>
",https://stackoverflow.com/questions/62087834/mqtt-fx-tool-support-for-load-testing,"['google-cloud-platform', 'cloud', 'mqtt', 'google-cloud-iot']",436,False,-4,1
K6 Load Testing - How to run different scenarios at the same time,"<p>I have written a simple K6 Load testing script that performs a successful login.
I have written a separate K6 Load testing script that performs an unsuccessful login attempt</p>
<p>They are currently separate scripts that you have to run on their own.</p>
<p>What I want to know is how do you simulate users performing different scenarios in one load test? e.g. valid login, invalid login, logout, any other actions.</p>
<p>Do you put the different scenarios all in one script?</p>
",https://stackoverflow.com/questions/63152130/k6-load-testing-how-to-run-different-scenarios-at-the-same-time,['k6'],3787,True,0,1
Wiremock Snapshotting with simulated delay,"<p>Wiremock version: 2.27.0</p>
<p>Using Wiremock to run load testing, with the following workflow.</p>
<p>a. Proxy enabled and a single run of Load testing is executed (warm-up phase).</p>
<p>b. Generate SnapShot</p>
<p>c. Then modify the mapping (getting/setting via REST API), and decorate it with <code>delayDistribution</code></p>
<p>d. Run Subsequent Load test runs (the actual runs, that contribute to final stats)</p>
<p>Is there a better way to do this? For instance, is there a way to decorate existing mapping with DelayCharacteristics. I looked into the extensions, but could not find a more elegant method.</p>
",https://stackoverflow.com/questions/63063077/wiremock-snapshotting-with-simulated-delay,"['wiremock', 'wiremock-record']",338,True,1,1
"MaxActive / wait may not work, thousands of connections are still being created","<p>[Go redigo] MaxActive / wait may not work, thousands of connections are still being created.</p>
<p>Go version: 1.14
github.com/gomodule/redigo v2.0.0+incompatible</p>
<p>Step 1: Wrote code as below, wait is true, maxActive is 99.
Step 2: Deploy the container in k8s. Doing load testing/
Step 3: Using <code>netstat -nat | grep 6379 | wc -l</code>, you can find the connection all more than maxActive for each pod.</p>
<pre><code># netstat -nat | grep 6379 | wc -l
xxbp-blacklist-6c9fcb57f4-66jpw
2897
xxbp-blacklist-6c9fcb57f4-6pdrp
12853
xxbp-blacklist-6c9fcb57f4-9kpjs
252
xxbp-blacklist-6c9fcb57f4-hkwj7
165
</code></pre>
<p>Step 4, In aws elasticache redis server monitoring tool, you can find the connections go up to 10000 totally.</p>
<p>Code --redisutil.go--</p>
<pre><code>package redisutil

import (
    &quot;AuthService/config&quot;
    &quot;context&quot;
    &quot;fmt&quot;
    &quot;github.com/gomodule/redigo/redis&quot;
    &quot;log&quot;
    &quot;time&quot;
)

var pool *redis.Pool

func InitializeRedisPool() error {
    conf := config.GetConfig()
    conf.AutomaticEnv()
    pool = &amp;redis.Pool{
        MaxIdle:     10,
        MaxActive:   99,
        Wait:        true,
        IdleTimeout: 240 * time.Second,
        Dial: func() (redis.Conn, error) {
            c, err := redis.Dial(&quot;tcp&quot;,
                conf.GetString(&quot;redis_host&quot;),
                redis.DialPassword(conf.GetString(&quot;redis_token&quot;)),
                redis.DialTLSSkipVerify(conf.GetBool(&quot;redis_tlsskipverify&quot;)),
                redis.DialUseTLS(conf.GetBool(&quot;redis_usetls&quot;)))
            if err != nil {
                log.Fatalln(&quot;Redis error during connect! &quot; + conf.GetString(&quot;redis_host&quot;) +
                    &quot; redis_token&quot; + conf.GetString(&quot;redis_token&quot;) +
                    &quot; redis_tlsskipverify:&quot; + conf.GetString(&quot;redis_tlsskipverify&quot;) +
                    &quot; redis_usetls:&quot; + conf.GetString(&quot;redis_usetls&quot;))
                log.Fatalln(err)
                return nil, err
            } else {
                return c, nil
            }
        },
    }

    //Check whether conn can be set up correctly
    conn, err := pool.GetContext(context.Background())
    if err != nil {
        return err
    }
    defer conn.Close()
    return nil
}
 

func VerifyBlacklist(token string) bool {
    conn := pool.Get()

    defer conn.Close()

    exists, err := redis.Bool(conn.Do(&quot;EXISTS&quot;, &quot;blacklist:&quot;+token))
    if err != nil {
        // handle error return from c.Do or type conversion error.
        log.Println(&quot;Redis error: error return from c.Do or type conversion error.&quot;)
        log.Println(err)
        return false //Use this temporally, friend for testing
    }

    return exists
}

</code></pre>
<p>--  code main.go ---</p>
<pre><code>    err := redisutil.InitializeRedisPool()
    if err != nil {
        log.Print(&quot;Redis error! InitializeRedisPool Fail!&quot;)
    }
</code></pre>
<p>-- API will invoke thousands of redisutil.VerifyBlacklist during load testing ---</p>
",https://stackoverflow.com/questions/64870030/maxactive-wait-may-not-work-thousands-of-connections-are-still-being-created,"['go', 'redis']",368,False,0,0
Load testing of FCM Push Notifications,"<p>I need around 100 devices for testing of push notifications for my react native app. Is there any way or tool to perform the load testing virtually? </p>

<p>Thanks.</p>
",https://stackoverflow.com/questions/62297663/load-testing-of-fcm-push-notifications,"['react-native', 'firebase-cloud-messaging', 'react-native-fcm']",237,False,1,0
Using only one credential to do load testing,"<p>Im currently new to end to end testing and planning to do load testing for a website I am currently working on. Im currently looking into jmeter and studying how to use it. My question is, would it make sense to only use one credential for the test? So basically I will be using my credentials then would throwing same HTTP requests multiple times to the server to simulate several users logging in and using the website.</p>
<p>Also if there are other ways to do load testing without using more than one credentials would be helpful!</p>
<p>Thanks in advance for the help!</p>
",https://stackoverflow.com/questions/64387272/using-only-one-credential-to-do-load-testing,"['jmeter', 'performance-testing', 'load-testing']",202,True,-1,1
System.InvalidOperationException: A DbContext instance cannot be used inside OnConfiguring since it is still being configured at this point,"<p>I am encountering below error while doing load testing in my applicaiton. This error does not appear while doing load testing from postman. Can anyone help me out with this. I don't know what is getting wrong here.</p>
<blockquote>
<p>An attempt was made to use the context while it is being configured. A DbContext instance cannot be used inside OnConfiguring since it is still being configured at this point. This can happen if a second operation is started on this context before a previous operation completed. Any instance members are not guaranteed to be thread safe.</p>
</blockquote>
<pre><code>   // Service regisered in Startup.cs
   services.AddTransient&lt;IExceptionHandlerService, ExceptionHandlerService&gt;();
    
   // Calling the below method like this
   return exceptionHandler.LogRequestAsync(log);
    
   // LogRequestAsync method inside ExceptionHandlerService class is 
   // throwing this error

   public class ExceptionHandlerService : IExceptionHandlerService
   {

    private ConnectionStrings _connectionStrings;
    private myapp_myappContext dbContext;

    public ExceptionHandlerService(IOptions&lt;ConnectionStrings&gt; connectionStrings)
    {
        _connectionStrings = connectionStrings.Value;
        dbContext = new myapp_myappContext(_connectionStrings);
    }

    // This method is throwing error. This method was not async earlier. 
    // I made this async due to the above error but still, 
    // the result is the same.
    public async Task&lt;int&gt; LogRequestAsync(RequestLogDto model)
    {
        try
        {
            var log = new MyappRequestlog()
            {
                Ipaddress = model.Ipaddress,
                UserId = model.UserId,
                Url = model.Url,
                MethodType = model.MethodType,
                Urlreferrer = model.Urlreferrer,
                Browser = model.Browser,
                Device = model.Device,
                RequestBody = model.RequestBody,
                Response = model.Response,
                ExceptionMessage = model.ExceptionMessage,
                StackTrace = model.StackTrace,
                CreatedDate = DateTime.Now
            };
            dbContext = new myapp_myappContext(_connectionStrings);
            await dbContext.MyappRequestlog.AddAsync(log);
            await dbContext.SaveChangesAsync();
            return log.LogId;
        }
        catch (Exception ex)
        {
            string strFilePath = ApplicationVariables.ErrorFilePath;
            if (!string.IsNullOrEmpty(strFilePath))
            {
                File.AppendAllLines(strFilePath, new[] { $&quot;{ex}. Error generate datetime : {DateTime.Now}&quot; });
            }
            return 0;
        }
    }

    public virtual DbSet&lt;MyappExternalcalllog&gt; MyappExternalcalllog { get; set; }

    // This is OnConfiguringmethod which the error is indicating
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        if (!optionsBuilder.IsConfigured)
        {
            optionsBuilder.UseMySql(_connectionStrings.DefaultConnection);
        }
    }


    // This method is saving data in database
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
      modelBuilder.Entity&lt;MyappRequestlog&gt;(entity =&gt;
        {
            entity.HasKey(e =&gt; e.LogId);

            entity.ToTable(&quot;myapp_requestlog&quot;);

            entity.Property(e =&gt; e.LogId).HasColumnType(&quot;int(11)&quot;);

            entity.Property(e =&gt; e.Browser).HasColumnType(&quot;varchar(1000)&quot;);

            entity.Property(e =&gt; e.CreatedDate).HasColumnType(&quot;datetime&quot;);

            entity.Property(e =&gt; e.Device).HasColumnType(&quot;varchar(15)&quot;);

            entity.Property(e =&gt; e.ExceptionMessage).HasColumnType(&quot;text&quot;);

            entity.Property(e =&gt; e.Ipaddress)
                .HasColumnName(&quot;IPAddress&quot;)
                .HasColumnType(&quot;varchar(25)&quot;);

            entity.Property(e =&gt; e.MethodType).HasColumnType(&quot;varchar(9)&quot;);

            entity.Property(e =&gt; e.RequestBody).HasColumnType(&quot;text&quot;);

            entity.Property(e =&gt; e.Response).HasColumnType(&quot;text&quot;);

            entity.Property(e =&gt; e.StackTrace).HasColumnType(&quot;text&quot;);

            entity.Property(e =&gt; e.Url)
                .HasColumnName(&quot;URL&quot;)
                .HasColumnType(&quot;text&quot;);

            entity.Property(e =&gt; e.Urlreferrer)
                .HasColumnName(&quot;URLReferrer&quot;)
                .HasColumnType(&quot;text&quot;);

            entity.Property(e =&gt; e.UserId).HasColumnType(&quot;varchar(38)&quot;);
        });
     }
</code></pre>
<p>// Following is the stack trace for this error</p>
<pre><code>System.InvalidOperationException: An attempt was made to use the context while it is being configured. A DbContext instance cannot be used inside OnConfiguring since it is still being configured at this point. This can happen if a second operation is started on this context before a previous operation completed. Any instance members are not guaranteed to be thread safe.
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.EntryWithoutDetectChanges[TEntity](TEntity entity)
   at Microsoft.EntityFrameworkCore.DbContext.SetEntityState[TEntity](TEntity entity, EntityState entityState)
   at MyApp.LoggerService.ExceptionHandlerService.LogRequest(RequestLogDto model) in D:\My API and Application TFS\My API\WebAPICore\MyAPI_V2\MyApp.LoggerService\ExceptionHandlerService.cs:line 47. Error generate datetime : 07/07/2020 10:41:26
System.InvalidOperationException: An attempt was made to use the context while it is being configured. A DbContext instance cannot be used inside OnConfiguring since it is still being configured at this point. This can happen if a second operation is started on this context before a previous operation completed. Any instance members are not guaranteed to be thread safe.
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.EntryWithoutDetectChanges[TEntity](TEntity entity)
   at Microsoft.EntityFrameworkCore.DbContext.SetEntityState[TEntity](TEntity entity, EntityState entityState)
   at MyApp.LoggerService.ExceptionHandlerService.LogRequest(RequestLogDto model) in D:\My API and Application TFS\My API\WebAPICore\MyAPI_V2\MyApp.LoggerService\ExceptionHandlerService.cs:line 47. Error generate datetime : 07/07/2020 10:41:26
System.InvalidOperationException: A second operation started on this context before a previous operation completed. Any instance members are not guaranteed to be thread safe.
   at Microsoft.EntityFrameworkCore.Internal.ConcurrencyDetector.EnterCriticalSection()
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IReadOnlyList`1 entriesToSave)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
at MyApp.LoggerService.ExceptionHandlerService.LogRequest(RequestLogDto model) in D:\My API and Application TFS\My API\WebAPICore\MyAPI_V2\MyApp.LoggerService\ExceptionHandlerService.cs:line 47. Error generate datetime : 07/07/2020 10:41:27
System.InvalidOperationException: A second operation started on this context before a previous operation completed. Any instance members are not guaranteed to be thread safe.
   at Microsoft.EntityFrameworkCore.Internal.ConcurrencyDetector.EnterCriticalSection()
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IReadOnlyList`1 entriesToSave)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at MyApp.LoggerService.ExceptionHandlerService.LogRequest(RequestLogDto model) in D:\My API and Application TFS\My API\WebAPICore\MyAPI_V2\MyApp.LoggerService\ExceptionHandlerService.cs:line 47. Error generate datetime : 07/07/2020 10:41:27
</code></pre>
",https://stackoverflow.com/questions/62781525/system-invalidoperationexception-a-dbcontext-instance-cannot-be-used-inside-onc,"['.net-core', 'async-await', 'entity-framework-core', 'dbcontext', 'invalidoperationexception']",261,False,0,0
Spring Boot Application using Oracle - ORA-01000: maximum open cursors exceeded - error happening during load testing,"<p>Am working on spring-boot application. While performing load testing we get error </p>

<p>""ORA-01000:maximum open cursors exceeded""</p>

<p>We have following entries for spring boot and jdbc in the pom.xml file</p>

<pre><code>&lt;parent&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
    &lt;version&gt;2.1.6.RELEASE&lt;/version&gt;
&lt;/parent&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.oracle&lt;/groupId&gt;
    &lt;artifactId&gt;ojdbc6&lt;/artifactId&gt;
    &lt;version&gt;11.2.0.3&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>

<p>To fix the issue I tried changing the ""ojdbc"" from 6 to 8.</p>

<pre><code>&lt;dependency&gt;
    &lt;groupId&gt;com.oracle.jdbc&lt;/groupId&gt;
    &lt;artifactId&gt;ojdbc8&lt;/artifactId&gt;
    &lt;version&gt;12.2.0.1&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>

<p>but I still got the same issue.</p>

<p>All our backend calls using either ""jdbcTemplate"" or ""namedParameterJdbcTemplate"".</p>

<p>The error is happening during load testing.
Our Oracle DB cursor limit is 1000.
Load test run game the error after 1hr 55mins and failure rate our our service was 0.5%
the number of users/threads is set to 25.</p>

<p>Looking for some suggestions to fix this issue.</p>
",https://stackoverflow.com/questions/61071201/spring-boot-application-using-oracle-ora-01000-maximum-open-cursors-exceeded,"['java', 'spring-boot', 'jdbctemplate', 'ojdbc']",3202,True,1,4
How to check web page load time in Jmeter without using api.? Is it possible to perform load testing in jmeter without using api&#39;s?,"<p>I was given with a task in which I need to check load time of webpages in Jmeter and there is not any api's available. so hot to perform load testing without having api's.</p>
",https://stackoverflow.com/questions/61026308/how-to-check-web-page-load-time-in-jmeter-without-using-api-is-it-possible-to,"['jmeter', 'load-testing', 'web-api-testing']",785,True,0,1
How can I translate this requests.post into a locust request?,"<p>I have a template for a Python function that calls an API and returns data. I'd like to run load testing against that API using locust.</p>

<pre><code>import requests

proxies = {""http"" : None,
           ""https"" : None}

verify = ""/data/certs/abc123.crt""


def call_api(par1, par2, par3):


    r = requests.post(url = 'https://ABCD123.XYZ.QWERTY:9010/public/api/v1/ABC_TEST/query',
                      json = {""par1"" : par1, ""par2"" : par2, ""par3"" : par3}, verify = verify, proxies = proxies)
return r
</code></pre>

<p>How could I translate this into a locust class?</p>
",https://stackoverflow.com/questions/62417684/how-can-i-translate-this-requests-post-into-a-locust-request,"['python', 'api', 'locust']",7927,False,0,1
"nodejs get request is blocking loadtest, needed non blocking","<p>I am trying to re-request another webaddress after i get nodejs route.</p>
<p>so</p>
<pre><code>route('/get')

request('google.com.')
res.end(200)
</code></pre>
<p>When I try load testing with this code. App cannot process requests concurrently.</p>
<p>How can I resolve this to run paralel?</p>
",https://stackoverflow.com/questions/64879882/nodejs-get-request-is-blocking-loadtest-needed-non-blocking,['node.js'],24,False,0,1
Logging into web application with microsoft account through JMeter,"<p>I am trying to login into a web application which uses microsoft accounts for authentication. I am using Jmeter for load testing and I was wondering how I could login to the microsoft accounts using Jmeter.</p>
",https://stackoverflow.com/questions/62417568/logging-into-web-application-with-microsoft-account-through-jmeter,"['authentication', 'post', 'jmeter', 'load-testing']",223,True,-1,1
Using locust to simulate load test from android or iOS phones,"<p>Is there a way to simulate an android user agent in locust.io load testing? I have a server I need to load test and they check if the call is from an android or iOS phone</p>
",https://stackoverflow.com/questions/64420338/using-locust-to-simulate-load-test-from-android-or-ios-phones,"['user-agent', 'locust']",445,True,0,1
Run executable inside Azure Kubernetes Service Pod,"<p>I want to use JMeter with OS Sampler for load testing. Jmeter is deployed on Azure Kubernetes Service(AKS). Can we run executable inside AKS Pod ( Jmeter slave container will execute that exe inside pod)? </p>

<p>Regards,
Amit Agrawal</p>
",https://stackoverflow.com/questions/61168973/run-executable-inside-azure-kubernetes-service-pod,"['azure-aks', 'jmeter-5.0']",637,True,0,2
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
SSLException while testing spring boot rest endpoint using JMeter,"<p>I am trying to do load testing with JMeter for a spring boot application running locally on port 8080.
Request configured is a GET request, and protocol is https. I get following error message:</p>
<pre><code>javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
    at java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:439)
    at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:184)
    at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:108)
    at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1151)
    at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1062)
    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
</code></pre>
<p>Any input on it would help?</p>
",https://stackoverflow.com/questions/63400245/sslexception-while-testing-spring-boot-rest-endpoint-using-jmeter,"['spring-boot', 'jmeter', 'sslexception']",3354,True,0,2
How to integrate .Net unit tests with JMeter,"<p>Earlier I was using <code>Visual Studio Load Test</code> to generate load for my load testing. I created .Net unit tests which I called by VS Load Test. Now VS Load Test is retired by Microsoft. Can I integrate my existing .Net code with JMeter?</p>
",https://stackoverflow.com/questions/60976837/how-to-integrate-net-unit-tests-with-jmeter,"['jmeter', 'load-testing', 'jmeter-5.0']",1140,True,0,1
"Connect to a running JavaWebStart, Oracle Forms 12c App [Performance Testing]","<p>Until now I was doing load testing on our Oracle Forms application with Oracle Load Testing. Now we want to change our App, new app will be a Java Web Start application - will be started from a .jnlp file, not from InternetExplorer. </p>

<p>Now, when I'm testing the new app I have got a problem - I can't connect to a running application. I have got a FRM-93618: fatal error reading data from runtime process in the test-tool and FRM-92104 in the running application.
The problem occurs during step nca.connect();</p>

<p>Maybe someone has an idea what can be the problem? 
Or how to test the performance in this kind of application (functional tests are possible - we are using TestComplete). </p>

<p>Thanks in advice!</p>
",https://stackoverflow.com/questions/61053021/connect-to-a-running-javawebstart-oracle-forms-12c-app-performance-testing,"['oracle', 'performance-testing', 'java-web-start', 'jnlp', 'oracleforms']",359,False,0,1
Multiple user login in JMeter,"<p>I am trying to perform load testing on NodeJS application, the application allows single login session for an user. </p>

<p>But, when i tried to perform load testing with 8 concurrent users (using the same credentials) it was working. </p>

<p>So, i tried to create 10 user IDs and added to the CSV file and configured ""CSV Data Set Config"" and ""HTTP Cookie Manager"" and set the ""Number of Threads"" to 80.</p>

<p>When I run the test plan, the credentials are not passed to each sessions equally. for example, userID1 is passed 3 times and userID2 is passed 7 times.</p>

<p>Can you clarify the reason for this behaviour and how to run the threads with each credentials (8 sessions for every credentials) from csv file ? </p>
",https://stackoverflow.com/questions/60483407/multiple-user-login-in-jmeter,"['jmeter', 'jmeter-5.0']",1337,True,0,3
Browser level load testing,"<p>We are planning to do load testing in browser so would like to know if you suggest any tools to achieve the 10k+ load requests.</p>
<p>Also would like to know if it can be achieved through jmeter for browser test.</p>
<p>Thanks In Advance</p>
",https://stackoverflow.com/questions/62508072/browser-level-load-testing,"['performance', 'browser', 'jmeter']",50,True,0,1
Is it possible to feed the response data of jmeter to a REST API?,"<p>I am using jmeter to perform load testing of a REST API. I want to feed the response data of this test(which includes duration, size of the response) to another REST API.</p>
<p>Is there any way to do so using the tool?</p>
",https://stackoverflow.com/questions/65314369/is-it-possible-to-feed-the-response-data-of-jmeter-to-a-rest-api,['jmeter'],37,True,0,1
Error when runnint jmeter distributed load testing,"<p>I am performing jmeter distributed load testing, On starting remote server from local machine in gui mode test starts but not able to start on local machine. It gives rmi UnmarshalException on local machine. The detail error is that</p>
<pre><code>2020-08-15 15:09:51,364 INFO o.a.j.JMeter: Version 5.1.1 r1855137
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.version=1.8.0_131
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.name=Mac OS X
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.arch=x86_64
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.version=10.15.4
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: file.encoding=UTF-8
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.awt.headless=true
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: Max memory     =1908932608
2020-08-15 15:09:51,365 INFO o.a.j.JMeter: Available Processors =4
2020-08-15 15:09:51,895 INFO o.a.j.e.DistributedRunner: Configuring remote engine: 1.2.3.4:8113
2020-08-15 15:09:51,898 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:52,055 INFO o.a.j.e.DistributedRunner: Starting remote engines
2020-08-15 15:09:52,056 INFO o.a.j.e.DistributedRunner: Starting the test @ Sat Aug 15 15:09:52 CST 2020 (1597475392055)
2020-08-15 15:09:52,056 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method
2020-08-15 15:09:52,063 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2020-08-15 15:09:52,063 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2020-08-15 15:09:52,541 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:52,546 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-08-15 15:09:52,559 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:52,559 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:09:52,561 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:53,108 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:53,108 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:09:53,108 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:53,109 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:53,109 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:10:53,356 ERROR o.a.j.e.ClientJMeterEngine: Error in rconfigure() method
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.io.EOFException
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:229) ~[?:1.8.0_131]
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162) ~[?:1.8.0_131]
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227) ~[?:1.8.0_131]
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179) ~[?:1.8.0_131]
    at com.sun.proxy.$Proxy19.rconfigure(Unknown Source) ~[?:?]
    at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:153) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:132) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:149) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:1089) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:991) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.start(JMeter.java:563) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
    at org.apache.jmeter.NewDriver.main(NewDriver.java:253) [ApacheJMeter.jar:5.1.1 r1855137]
Caused by: java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:1.8.0_131]
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215) ~[?:1.8.0_131]
    ... 15 more
2020-08-15 15:10:53,378 INFO o.a.j.e.ClientJMeterEngine: Interrupting RMI Reaper
2020-08-15 15:10:53,380 ERROR o.a.j.u.JMeterUtils: Error in rconfigure() method java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.io.EOFException
2020-08-15 15:10:53,381 INFO o.a.j.e.DistributedRunner: Remote engines have been started
</code></pre>
<p>anyone know the reason?</p>
",https://stackoverflow.com/questions/63424207/error-when-runnint-jmeter-distributed-load-testing,"['java', 'server', 'jmeter', 'rmi']",318,False,0,1
Locust Load Testing running into infinite loop,"<p>i am really new to Python with Locust load testing.
I Created the below Python script but its running into infinite loop.
I have used
Number of total users to simulate = 1
Spawn rate = 1</p>
<p>Please let me know where i am going wrong.</p>
<pre><code>from locust import HttpUser, task, between, TaskSet


class Behaviour(TaskSet):

    @task
    def first_task(self):
        self.client.get('/LoginHome.aspx')
 
class WebsiteTestUser(HttpUser):
    tasks = [Behaviour]
    wait_time = between(5, 15)
    host = &quot;http://DEV/LoadTesting&quot;
</code></pre>
<p>Thanks.</p>
",https://stackoverflow.com/questions/64257011/locust-load-testing-running-into-infinite-loop,"['python', 'python-3.x', 'python-2.7', 'load-testing', 'locust']",1017,False,0,1
Apache2: how to log rejected connections and client timeout,"<p>I am doing some load testing on a service run with Apache2 and my load testing tool has a default timeout of 30 seconds. When I run the tool for a minute with 1 request per second load, it reports that 40 succeeded with 200 OK response and 20 requests were cancelled because client timeout exceeded while awaiting headers.</p>

<p>Now, I was trying to spot this on the server side. I can't see the timeouts logged either in apache access logs or gunicorn access logs. Note that I am interested in connections that weren't accepted as well as that are accepted and times out.</p>

<p>I have some experience working on similar services on Windows. The http.sys error logs would show connection dropped errors and we would know if our server was dropping connections.</p>
",https://stackoverflow.com/questions/60366932/apache2-how-to-log-rejected-connections-and-client-timeout,"['apache2', 'http.sys']",2302,True,1,1
"Django, Apache, WSGIDaemonProcess, and threads","<p>I'm trying to tune the performance of a Django app that's served through Apache.</p>

<p>When doing load testing with Locust, I'm finding that latency is very high when the server is under heavy load. Right now I'm using the <code>mpm_event_module</code> using <code>ThreadsPerChild=25</code> since that seems to be a common thing I've found in example configs. Similarly, inside my site config I have</p>

<p><code>WSGIDaemonProcess ... processes=8 threads=15 python-path=...</code></p>

<p>since this also matched some example.</p>

<p>I was wondering whether the GIL in Python applies to the webserving when configured this way. If so, does that mean I need to change my config to use more processes and fewer threads to get more parallelism? When I tried doing this, my load testing reported many more failures when loading static files, so I'm not sure if it makes sense.</p>
",https://stackoverflow.com/questions/59947736/django-apache-wsgidaemonprocess-and-threads,"['python', 'django', 'apache', 'gil']",209,False,0,0
NTLM requests in K6 and .NEТ Core,"<p>I wrote load testing of my API with NTLM auth (here I additionally check if NTLM authorized user is presend in Database). During resquest:</p>
<pre><code>  var url = 'https://login:*****@localhost:xxxx/api/authorization/logon';
  var payload = { };

  var params = {
    headers: {
      'Content-Type': 'application/json'
    },
  };

   let response = http.post(url, params, {auth: &quot;ntlm&quot;});  
   check(response, {
    'status is 200': (r) =&gt; r.status === 200
    });
}
</code></pre>
<p>i have an error:</p>
<p><em>error=&quot;Post &quot;https://user:*****@localhost:xxx/api/authorization/logon&quot;: stream error: stream ID 3; HTTP_1_1_REQUIRED&quot;</em>.</p>
<p>Why? Kestrel serve HTTP/1.1</p>
",https://stackoverflow.com/questions/63811942/ntlm-requests-in-k6-and-ne%d0%a2-core,"['asp.net-core-webapi', 'ntlm', 'k6']",242,True,0,2
Append a text file multiple times to create one big text file for testing,"<p>I have one text file having 100,000 lines (xyz.txt). I want to append this file 60 times (n times) to another file to create a big text file (big.txt). How can it be done using cmd (command line)?</p>

<p>(I need this for performance/load testing.) </p>

<p>Thanks,</p>
",https://stackoverflow.com/questions/60500442/append-a-text-file-multiple-times-to-create-one-big-text-file-for-testing,"['windows', 'cmd']",405,True,0,1
Running k6 load test converted from Postman fails,"<p>I converted a <a href=""https://www.postman.com/"" rel=""nofollow noreferrer"">Postman</a> collection into a script for load testing tool <a href=""https://k6.io/"" rel=""nofollow noreferrer"">k6</a> with <a href=""https://github.com/loadimpact/postman-to-k6"" rel=""nofollow noreferrer"">postman-to-k6</a>. Running the k6 test fails with this error message:</p>
<pre><code>ERRO[0016] TypeError: Cannot read property 'set' of undefined or null
Run     at executePrerequest (file:///home/dm/temp/39/k6/libs/shim/core.js:1187:203(89))
default at executeRequest (file:///home/dm/temp/39/k6/libs/shim/core.js:969:22(73))
        at executeRequest (file:///home/dm/temp/39/k6/libs/shim/core.js:968:5(57))
        at file:///home/dm/temp/39/k6/libs/shim/core.js:307:46(35)
        at file:///home/dm/temp/39/k6/k6-script.js:38:21(26)
        at github.com/loadimpact/k6/js/common.Bind.func1 (native)
        at file:///home/dm/temp/39/k6/k6-script.js:37:17(5)  executor=per-vu-iterations scenario=default source=stacktrace
</code></pre>
<p>What do I have to change for the load test to work?</p>
<p>Extract from the file <code>k6-script.js</code>:</p>
<pre><code>// Auto-generated by the Load Impact converter

import &quot;./libs/shim/core.js&quot;;
import &quot;./libs/shim/expect.js&quot;;
import &quot;./libs/shim/urijs.js&quot;;
import { group } from &quot;k6&quot;;

export let options = { maxRedirects: 4 };

const Request = Symbol.for(&quot;request&quot;);
postman[Symbol.for(&quot;initial&quot;)]({
options,
collection: {
    baseUrl: &quot;http://localhost:8070&quot;,
    unitId: &quot;&quot;,
    processId: &quot;&quot;,
    processName: &quot;&quot;,
    unitName: &quot;&quot;,
    accessToken: &quot;&quot;,
    assetId: &quot;&quot;,
    assetName: &quot;&quot;,
    personId: &quot;&quot;,
    personName: &quot;&quot;,
    controlId: &quot;&quot;,
    controlName: &quot;&quot;,
    processIdveo271: &quot;&quot;,
    subUnitName: &quot;&quot;,
    subUnitId: &quot;&quot;,
    searchId: &quot;&quot;
},
environment: {
    baseUrl: &quot;https://veo.develop.verinice.com&quot;
}
});

export default function() {
group(&quot;Basic CRUD operations&quot;, function() {
    postman[Request]({
    name: &quot;Create a unit&quot;,
    id: &quot;f3a7bc74-372e-4811-b077-ceed662613a4&quot;,
    method: &quot;POST&quot;,
    address: &quot;{{baseUrl}}/units&quot;,
    data: '{\n    &quot;name&quot;: &quot;{{unitName}}&quot;\n}',
    headers: {
        &quot;Content-Type&quot;: &quot;application/json&quot;
    },
    pre() {
        pm.collectionVariables.set(&quot;unitName&quot;, &quot;CRUD test unit&quot;);
    },
    post(response) {
        pm.test(&quot;Validate status code&quot;, function() {
        pm.response.to.have.status(201);
        });
        var jsonData = pm.response.json();
        var resourceId = jsonData.resourceId;
        pm.test(&quot;Resource ID is a string&quot;, function() {
        pm.expect(resourceId).to.be.a(&quot;string&quot;);
        });
        pm.collectionVariables.set(&quot;unitId&quot;, resourceId);
    },
    auth(config, Var) {
        config.headers.Authorization = `Bearer ${pm[Var](&quot;accessToken&quot;)}`;
    }
    });

    postman[Request]({
    name: &quot;Load the unit&quot;,
    id: &quot;70a71fdb-6d67-405d-895a-4f2ca998c92c&quot;,
    method: &quot;GET&quot;,
    address: &quot;{{baseUrl}}/units/{{unitId}}&quot;,
    post(response) {
        pm.test(&quot;Validate status code&quot;, function() {
        pm.response.to.have.status(200);
        });
        var jsonData = pm.response.json();
        pm.test(&quot;Returned unit has the correct values&quot;, function() {
        pm.expect(jsonData.id).to.equal(pm.collectionVariables.get(&quot;unitId&quot;));
        pm.expect(jsonData.name).to.equal(
            pm.collectionVariables.get(&quot;unitName&quot;)
        );
        });
    },
    auth(config, Var) {
        config.headers.Authorization = `Bearer ${pm[Var](&quot;accessToken&quot;)}`;
    }
    });

    ...

    postman[Request]({
    name: &quot;Run a search&quot;,
    id: &quot;9a66875b-6a03-4662-b287-7311632a0e27&quot;,
    method: &quot;GET&quot;,
    address: &quot;{{baseUrl}}{{searchId}}&quot;,
    post(response) {
        pm.test(&quot;Validate status code&quot;, function() {
        pm.response.to.have.status(200);
        });
    },
    auth(config, Var) {
        config.headers.Authorization = `Bearer ${pm[Var](&quot;accessToken&quot;)}`;
    }
    });

    postman[Request]({
    name: &quot;Delete the asset&quot;,
    id: &quot;90367e36-0718-4fd1-b483-f37b17b554f6&quot;,
    method: &quot;DELETE&quot;,
    address: &quot;{{baseUrl}}/assets/{{assetId}}&quot;,
    post(response) {
        pm.test(&quot;Validate status code&quot;, function() {
        pm.response.to.have.status(200);
        });
    },
    auth(config, Var) {
        config.headers.Authorization = `Bearer ${pm[Var](&quot;accessToken&quot;)}`;
    }
    });

    postman[Request]({
    name: &quot;Delete the unit&quot;,
    id: &quot;6657b858-18a8-4271-bd54-6084ee876d2f&quot;,
    method: &quot;DELETE&quot;,
    address: &quot;{{baseUrl}}/units/{{unitId}}&quot;,
    post(response) {
        pm.test(&quot;Validate status code&quot;, function() {
        pm.response.to.have.status(204);
        });
    },
    auth(config, Var) {
        config.headers.Authorization = `Bearer ${pm[Var](&quot;accessToken&quot;)}`;
    }
    });
});
}
</code></pre>
<p>Extract from the Postman collection:</p>
<pre><code>{
&quot;info&quot;: {
    &quot;_postman_id&quot;: &quot;43d0a18e-1631-4124-8a15-c84edd1c5eb4&quot;,
    &quot;name&quot;: &quot;verinice.VEO REST API&quot;,
    &quot;description&quot;: &quot;OpenAPI documentation for verinice.VEO.\n\nContact Support:\n Email: verinice@sernet.de&quot;,
    &quot;schema&quot;: &quot;https://schema.getpostman.com/json/collection/v2.1.0/collection.json&quot;
},
&quot;item&quot;: [
    {
    &quot;name&quot;: &quot;Basic CRUD operations&quot;,
    &quot;item&quot;: [
        {
        &quot;name&quot;: &quot;Create a unit&quot;,
        &quot;event&quot;: [
            {
            &quot;listen&quot;: &quot;test&quot;,
            &quot;script&quot;: {
                &quot;id&quot;: &quot;69edb44e-a7da-4b87-b05f-55927d2af355&quot;,
                &quot;exec&quot;: [
                &quot;pm.test(\&quot;Validate status code\&quot;, function () {&quot;,
                &quot;    pm.response.to.have.status(201);&quot;,
                &quot;});&quot;,
                &quot;var jsonData = pm.response.json();&quot;,
                &quot;var resourceId = jsonData.resourceId;&quot;,
                &quot;pm.test(\&quot;Resource ID is a string\&quot;, function () {&quot;,
                &quot;    pm.expect(resourceId).to.be.a('string')&quot;,
                &quot;});&quot;,
                &quot;pm.collectionVariables.set(\&quot;unitId\&quot;, resourceId);&quot;
                ],
                &quot;type&quot;: &quot;text/javascript&quot;
            }
            },
            {
            &quot;listen&quot;: &quot;prerequest&quot;,
            &quot;script&quot;: {
                &quot;id&quot;: &quot;d619b1ae-b51d-4d06-b831-4129d8d69d79&quot;,
                &quot;exec&quot;: [
                &quot;pm.collectionVariables.set('unitName', 'CRUD test unit');&quot;
                ],
                &quot;type&quot;: &quot;text/javascript&quot;
            }
            }
        ],
        &quot;request&quot;: {
            &quot;method&quot;: &quot;POST&quot;,
            &quot;header&quot;: [
            {
                &quot;key&quot;: &quot;Content-Type&quot;,
                &quot;value&quot;: &quot;application/json&quot;
            }
            ],
            &quot;body&quot;: {
            &quot;mode&quot;: &quot;raw&quot;,
            &quot;raw&quot;: &quot;{\n    \&quot;name\&quot;: \&quot;{{unitName}}\&quot;\n}&quot;
            },
            &quot;url&quot;: {
            &quot;raw&quot;: &quot;{{baseUrl}}/units&quot;,
            &quot;host&quot;: [
                &quot;{{baseUrl}}&quot;
            ],
            &quot;path&quot;: [
                &quot;units&quot;
            ]
            }
        },
        &quot;response&quot;: [
            {
            &quot;name&quot;: &quot;Unit created&quot;,
            &quot;originalRequest&quot;: {
                &quot;method&quot;: &quot;POST&quot;,
                &quot;header&quot;: [],
                &quot;body&quot;: {
                &quot;mode&quot;: &quot;raw&quot;,
                &quot;raw&quot;: &quot;{\n    \&quot;name\&quot;: \&quot;My unit\&quot;,\n    \&quot;id\&quot;: \&quot;adf037f1-0089-48ad-9177-92269918758b\&quot;,\n    \&quot;validFrom\&quot;: \&quot;1990-12-31T23:59:60Z\&quot;,\n    \&quot;validUntil\&quot;: \&quot;1990-12-31T23:59:60Z\&quot;,\n    \&quot;abbreviation\&quot;: \&quot;U-96\&quot;,\n    \&quot;description\&quot;: \&quot;This is currently the main and only unit for our organization.\&quot;,\n    \&quot;riskvalues\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;objects\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;units\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;parent\&quot;: {\n        \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n        \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n    },\n    \&quot;domains\&quot;: [\n        {\n            \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n            \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n        },\n        {\n            \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n            \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n        }\n    ]\n}&quot;
                },
                &quot;url&quot;: {
                &quot;raw&quot;: &quot;{{baseUrl}}/units&quot;,
                &quot;host&quot;: [
                    &quot;{{baseUrl}}&quot;
                ],
                &quot;path&quot;: [
                    &quot;units&quot;
                ]
                }
            },
            &quot;status&quot;: &quot;Created&quot;,
            &quot;code&quot;: 201,
            &quot;_postman_previewlanguage&quot;: &quot;json&quot;,
            &quot;header&quot;: [
                {
                &quot;key&quot;: &quot;Content-Type&quot;,
                &quot;value&quot;: &quot;application/json&quot;
                }
            ],
            &quot;cookie&quot;: [],
            &quot;body&quot;: &quot;\&quot;&lt;object&gt;\&quot;&quot;
            }
        ]
        },
        {
        &quot;name&quot;: &quot;Load the unit&quot;,
        &quot;event&quot;: [
            {
            &quot;listen&quot;: &quot;test&quot;,
            &quot;script&quot;: {
                &quot;id&quot;: &quot;1366b020-d215-49e1-903d-12a710fc6dad&quot;,
                &quot;exec&quot;: [
                &quot;pm.test(\&quot;Validate status code\&quot;, function () {&quot;,
                &quot;    pm.response.to.have.status(200);&quot;,
                &quot;});&quot;,
                &quot;var jsonData = pm.response.json();&quot;,
                &quot;pm.test(\&quot;Returned unit has the correct values\&quot;, function () {&quot;,
                &quot;    pm.expect(jsonData.id).to.equal(pm.collectionVariables.get(\&quot;unitId\&quot;));&quot;,
                &quot;    pm.expect(jsonData.name).to.equal(pm.collectionVariables.get(\&quot;unitName\&quot;));&quot;,
                &quot;});&quot;
                ],
                &quot;type&quot;: &quot;text/javascript&quot;
            }
            }
        ],
        &quot;request&quot;: {
            &quot;method&quot;: &quot;GET&quot;,
            &quot;header&quot;: [],
            &quot;url&quot;: {
            &quot;raw&quot;: &quot;{{baseUrl}}/units/:id&quot;,
            &quot;host&quot;: [
                &quot;{{baseUrl}}&quot;
            ],
            &quot;path&quot;: [
                &quot;units&quot;,
                &quot;:id&quot;
            ],
            &quot;variable&quot;: [
                {
                &quot;key&quot;: &quot;id&quot;,
                &quot;value&quot;: &quot;{{unitId}}&quot;,
                &quot;description&quot;: &quot;(Required) &quot;
                }
            ]
            }
        },
        &quot;response&quot;: [
            {
            &quot;name&quot;: &quot;Unit loaded&quot;,
            &quot;originalRequest&quot;: {
                &quot;method&quot;: &quot;GET&quot;,
                &quot;header&quot;: [],
                &quot;url&quot;: {
                &quot;raw&quot;: &quot;{{baseUrl}}/units/:id&quot;,
                &quot;host&quot;: [
                    &quot;{{baseUrl}}&quot;
                ],
                &quot;path&quot;: [
                    &quot;units&quot;,
                    &quot;:id&quot;
                ],
                &quot;variable&quot;: [
                    {
                    &quot;key&quot;: &quot;id&quot;
                    }
                ]
                }
            },
            &quot;status&quot;: &quot;OK&quot;,
            &quot;code&quot;: 200,
            &quot;_postman_previewlanguage&quot;: &quot;json&quot;,
            &quot;header&quot;: [
                {
                &quot;key&quot;: &quot;Content-Type&quot;,
                &quot;value&quot;: &quot;application/json&quot;
                }
            ],
            &quot;cookie&quot;: [],
            &quot;body&quot;: &quot;{\n \&quot;id\&quot;: \&quot;adf037f1-0089-48ad-9177-92269918758b\&quot;,\n \&quot;name\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n \&quot;validFrom\&quot;: \&quot;1990-12-31T23:59:60Z\&quot;,\n \&quot;abbreviation\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n \&quot;description\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n \&quot;riskvalues\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n \&quot;objects\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n \&quot;units\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n \&quot;parent\&quot;: {\n  \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n  \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n },\n \&quot;domains\&quot;: [\n  {\n   \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n   \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n  },\n  {\n   \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n   \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n  }\n ]\n}&quot;
            },
            {
            &quot;name&quot;: &quot;Unit not found&quot;,
            &quot;originalRequest&quot;: {
                &quot;method&quot;: &quot;GET&quot;,
                &quot;header&quot;: [],
                &quot;url&quot;: {
                &quot;raw&quot;: &quot;{{baseUrl}}/units/:id&quot;,
                &quot;host&quot;: [
                    &quot;{{baseUrl}}&quot;
                ],
                &quot;path&quot;: [
                    &quot;units&quot;,
                    &quot;:id&quot;
                ],
                &quot;variable&quot;: [
                    {
                    &quot;key&quot;: &quot;id&quot;
                    }
                ]
                }
            },
            &quot;status&quot;: &quot;Not Found&quot;,
            &quot;code&quot;: 404,
            &quot;_postman_previewlanguage&quot;: &quot;text&quot;,
            &quot;header&quot;: [
                {
                &quot;key&quot;: &quot;Content-Type&quot;,
                &quot;value&quot;: &quot;*/*&quot;
                }
            ],
            &quot;cookie&quot;: [],
            &quot;body&quot;: &quot;&quot;
            }
        ]
        },
        {
        &quot;name&quot;: &quot;Load the asset&quot;,
        &quot;event&quot;: [
            {
            &quot;listen&quot;: &quot;test&quot;,
            &quot;script&quot;: {
                &quot;id&quot;: &quot;c7b133bc-997b-409b-b9e4-79817462c9a7&quot;,
                &quot;exec&quot;: [
                &quot;pm.test(\&quot;Validate status code\&quot;, function () {&quot;,
                &quot;    pm.response.to.have.status(200);&quot;,
                &quot;});&quot;,
                &quot;var jsonData = pm.response.json();&quot;,
                &quot;pm.test(\&quot;Returned asset has the correct values\&quot;, function () {&quot;,
                &quot;    pm.expect(jsonData.id).to.equal(pm.collectionVariables.get(\&quot;assetId\&quot;));&quot;,
                &quot;    pm.expect(jsonData.name).to.equal(pm.collectionVariables.get(\&quot;assetName\&quot;))&quot;,
                &quot;    pm.expect(jsonData.owner.displayName).to.equal(pm.collectionVariables.get(\&quot;unitName\&quot;));&quot;,
                &quot;    pm.expect(jsonData.owner.targetUri).to.equal(pm.collectionVariables.get(\&quot;baseUrl\&quot;)+'/units/'+pm.collectionVariables.get(\&quot;unitId\&quot;));&quot;,
                &quot;    pm.expect(jsonData.customAspects.myaspecttest1.type).to.equal('myaspecttest1');&quot;,
                &quot;    pm.expect(jsonData.links.A1[0].type).to.equal('A1');&quot;,
                &quot;});&quot;,
                &quot;&quot;
                ],
                &quot;type&quot;: &quot;text/javascript&quot;
            }
            }
        ],
        &quot;request&quot;: {
            &quot;method&quot;: &quot;GET&quot;,
            &quot;header&quot;: [],
            &quot;url&quot;: {
            &quot;raw&quot;: &quot;{{baseUrl}}/assets/:id&quot;,
            &quot;host&quot;: [
                &quot;{{baseUrl}}&quot;
            ],
            &quot;path&quot;: [
                &quot;assets&quot;,
                &quot;:id&quot;
            ],
            &quot;variable&quot;: [
                {
                &quot;key&quot;: &quot;id&quot;,
                &quot;value&quot;: &quot;{{assetId}}&quot;,
                &quot;description&quot;: &quot;(Required) &quot;
                }
            ]
            }
        },
        &quot;response&quot;: [
            {
            &quot;name&quot;: &quot;Asset loaded&quot;,
            &quot;originalRequest&quot;: {
                &quot;method&quot;: &quot;GET&quot;,
                &quot;header&quot;: [],
                &quot;url&quot;: {
                &quot;raw&quot;: &quot;{{baseUrl}}/assets/:id&quot;,
                &quot;host&quot;: [
                    &quot;{{baseUrl}}&quot;
                ],
                &quot;path&quot;: [
                    &quot;assets&quot;,
                    &quot;:id&quot;
                ],
                &quot;variable&quot;: [
                    {
                    &quot;key&quot;: &quot;id&quot;
                    }
                ]
                }
            },
            &quot;status&quot;: &quot;OK&quot;,
            &quot;code&quot;: 200,
            &quot;_postman_previewlanguage&quot;: &quot;json&quot;,
            &quot;header&quot;: [
                {
                &quot;key&quot;: &quot;Content-Type&quot;,
                &quot;value&quot;: &quot;application/json&quot;
                }
            ],
            &quot;cookie&quot;: [],
            &quot;body&quot;: &quot;{\n \&quot;id\&quot;: \&quot;adf037f1-0089-48ad-9177-92269918758b\&quot;,\n \&quot;name\&quot;: \&quot;Lock doors\&quot;,\n \&quot;owner\&quot;: {\n  \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n  \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n },\n \&quot;validFrom\&quot;: \&quot;1990-12-31T23:59:60Z\&quot;,\n \&quot;abbreviation\&quot;: \&quot;Lock doors\&quot;,\n \&quot;description\&quot;: \&quot;Lock doors\&quot;,\n \&quot;domains\&quot;: [\n  {\n   \&quot;displayName\&quot;: \&quot;EU GDPR 2016-05-04\&quot;,\n   \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/domain/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n  },\n  {\n   \&quot;displayName\&quot;: \&quot;EU GDPR 2016-05-04\&quot;,\n   \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/domain/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n  }\n ],\n \&quot;riskvalues\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n \&quot;customAspects\&quot;: \&quot;&lt;object&gt;\&quot;,\n \&quot;links\&quot;: \&quot;&lt;object&gt;\&quot;\n}&quot;
            }
        ]
        },
        {
        &quot;name&quot;: &quot;Create a process VEO-271&quot;,
        &quot;event&quot;: [
            {
            &quot;listen&quot;: &quot;prerequest&quot;,
            &quot;script&quot;: {
                &quot;id&quot;: &quot;0c80d09d-d411-45b0-848a-3c214099b514&quot;,
                &quot;exec&quot;: [
                &quot;pm.collectionVariables.set(\&quot;processName\&quot;, \&quot;Process of \&quot; + pm.variables.replaceIn('{{$randomFirstName}}'));&quot;
                ],
                &quot;type&quot;: &quot;text/javascript&quot;
            }
            },
            {
            &quot;listen&quot;: &quot;test&quot;,
            &quot;script&quot;: {
                &quot;id&quot;: &quot;00c46943-969a-4599-9f3e-1524c6aab374&quot;,
                &quot;exec&quot;: [
                &quot;pm.test(\&quot;Validate status code\&quot;, function () {&quot;,
                &quot;    pm.response.to.have.status(201);&quot;,
                &quot;});&quot;,
                &quot;var jsonData = pm.response.json();&quot;,
                &quot;var resourceId = jsonData.resourceId;&quot;,
                &quot;pm.test(\&quot;Resource ID is a string\&quot;, function () {&quot;,
                &quot;    pm.expect(resourceId).to.be.a('string')&quot;,
                &quot;});&quot;,
                &quot;pm.collectionVariables.set(\&quot;processIdveo271\&quot;, resourceId);&quot;
                ],
                &quot;type&quot;: &quot;text/javascript&quot;
            }
            }
        ],
        &quot;request&quot;: {
            &quot;method&quot;: &quot;POST&quot;,
            &quot;header&quot;: [
            {
                &quot;key&quot;: &quot;Content-Type&quot;,
                &quot;value&quot;: &quot;application/json&quot;
            }
            ],
            &quot;body&quot;: {
            &quot;mode&quot;: &quot;raw&quot;,
            &quot;raw&quot;: &quot;{\n    \&quot;name\&quot;: \&quot;Verarbeitungstätigkeit 1\&quot;,\n    \&quot;customAspects\&quot;: {\n        \&quot;ProcessDvGroupRechtsgrundlage\&quot;: {\n            \&quot;attributes\&quot;: {\n                \&quot;processDvRechtsgrundlage\&quot;: [\n                    \&quot;processDvRechtsgrundlage1\&quot;,\n                    \&quot;processDvRechtsgrundlage5\&quot;,\n                    \&quot;processDvRechtsgrundlage2\&quot;,\n                    \&quot;processDvRechtsgrundlage3\&quot;,\n                    \&quot;processDvRechtsgrundlage4\&quot;\n                ]\n            },\n            \&quot;type\&quot;: \&quot;ProcessDvGroupRechtsgrundlage\&quot;\n        }\n    },\n    \&quot;owner\&quot;: {\n        \&quot;targetUri\&quot;: \&quot;/units/{{unitId}}\&quot;\n    }\n}&quot;
            },
            &quot;url&quot;: {
            &quot;raw&quot;: &quot;{{baseUrl}}/processes&quot;,
            &quot;host&quot;: [
                &quot;{{baseUrl}}&quot;
            ],
            &quot;path&quot;: [
                &quot;processes&quot;
            ]
            }
        },
        &quot;response&quot;: [
            {
            &quot;name&quot;: &quot;default response&quot;,
            &quot;originalRequest&quot;: {
                &quot;method&quot;: &quot;POST&quot;,
                &quot;header&quot;: [],
                &quot;body&quot;: {
                &quot;mode&quot;: &quot;raw&quot;,
                &quot;raw&quot;: &quot;{\n    \&quot;name\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;owner\&quot;: {\n        \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n        \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n    },\n    \&quot;id\&quot;: \&quot;adf037f1-0089-48ad-9177-92269918758b\&quot;,\n    \&quot;validFrom\&quot;: \&quot;1990-12-31T23:59:60Z\&quot;,\n    \&quot;validUntil\&quot;: \&quot;1990-12-31T23:59:60Z\&quot;,\n    \&quot;abbreviation\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;description\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;domains\&quot;: [\n        {\n            \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n            \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n        },\n        {\n            \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n            \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n        }\n    ],\n    \&quot;links\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;customAspects\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;riskvalues\&quot;: \&quot;&lt;add example here&gt;\&quot;,\n    \&quot;assets\&quot;: [\n        {\n            \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n            \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n        },\n        {\n            \&quot;displayName\&quot;: \&quot;My Unit\&quot;,\n            \&quot;targetUri\&quot;: \&quot;http://&lt;api.example.org&gt;/api/v1/unit/&lt;00000000-0000-0000-0000-000000000000&gt;\&quot;\n        }\n    ],\n    \&quot;extinguishingTime\&quot;: \&quot;&lt;add example here&gt;\&quot;\n}&quot;
                },
                &quot;url&quot;: {
                &quot;raw&quot;: &quot;{{baseUrl}}/processes&quot;,
                &quot;host&quot;: [
                    &quot;{{baseUrl}}&quot;
                ],
                &quot;path&quot;: [
                    &quot;processes&quot;
                ]
                }
            },
            &quot;status&quot;: &quot;Created&quot;,
            &quot;code&quot;: 201,
            &quot;_postman_previewlanguage&quot;: &quot;text&quot;,
            &quot;header&quot;: [
                {
                &quot;key&quot;: &quot;Content-Type&quot;,
                &quot;value&quot;: &quot;*/*&quot;
                }
            ],
            &quot;cookie&quot;: [],
            &quot;body&quot;: &quot;&quot;
            }
        ]
        },
        {
        &quot;name&quot;: &quot;Load the process VEO-271&quot;,
        &quot;event&quot;: [
            {
            &quot;listen&quot;: &quot;test&quot;,
            &quot;script&quot;: {
                &quot;id&quot;: &quot;d883576e-b7e3-46e5-b897-52557422236d&quot;,
                &quot;exec&quot;: [
                &quot;pm.test(\&quot;Validate status code\&quot;, function () {&quot;,
                &quot;    pm.response.to.have.status(200);&quot;,
                &quot;});&quot;,
                &quot;var jsonData = pm.response.json();&quot;,
                &quot;pm.test(\&quot;Returned process has the correct values\&quot;, function () {&quot;,
                &quot;    pm.expect(jsonData.id).to.equal(pm.collectionVariables.get(\&quot;processIdveo271\&quot;));&quot;,
                &quot;    pm.expect(jsonData.name).to.equal(\&quot;Verarbeitungstätigkeit 1\&quot;)&quot;,
                &quot;});&quot;,
                &quot;&quot;,
                &quot;&quot;
                ],
                &quot;type&quot;: &quot;text/javascript&quot;
            }
            }
        ],
        &quot;request&quot;: {
            &quot;method&quot;: &quot;GET&quot;,
            &quot;header&quot;: [],
            &quot;url&quot;: {
            &quot;raw&quot;: &quot;{{baseUrl}}/processes/:id&quot;,
            &quot;host&quot;: [
                &quot;{{baseUrl}}&quot;
            ],
            &quot;path&quot;: [
                &quot;processes&quot;,
                &quot;:id&quot;
            ],
            &quot;variable&quot;: [
                {
                &quot;key&quot;: &quot;id&quot;,
                &quot;value&quot;: &quot;{{processIdveo271}}&quot;,
                &quot;description&quot;: &quot;(Required) &quot;
                }
            ]
            }
        },
        &quot;response&quot;: [
            {
            &quot;name&quot;: &quot;default response&quot;,
            &quot;originalRequest&quot;: {
                &quot;method&quot;: &quot;GET&quot;,
                &quot;header&quot;: [],
                &quot;url&quot;: {
                &quot;raw&quot;: &quot;{{baseUrl}}/processes/:id&quot;,
                &quot;host&quot;: [
                    &quot;{{baseUrl}}&quot;
                ],
                &quot;path&quot;: [
                    &quot;processes&quot;,
                    &quot;:id&quot;
                ],
                &quot;variable&quot;: [
                    {
                    &quot;key&quot;: &quot;id&quot;
                    }
                ]
                }
            },
            &quot;status&quot;: &quot;OK&quot;,
            &quot;code&quot;: 200,
            &quot;_postman_previewlanguage&quot;: &quot;text&quot;,
            &quot;header&quot;: [
                {
                &quot;key&quot;: &quot;Content-Type&quot;,
                &quot;value&quot;: &quot;*/*&quot;
                }
            ],
            &quot;cookie&quot;: [],
            &quot;body&quot;: &quot;&quot;
            }
        ]
        }
    ],
    &quot;description&quot;: &quot;Basic CRUD operations&quot;,
    &quot;protocolProfileBehavior&quot;: {
        
    }
    }
],
&quot;auth&quot;: {
    &quot;type&quot;: &quot;oauth2&quot;,
    &quot;oauth2&quot;: [
    {
        &quot;key&quot;: &quot;accessToken&quot;,
        &quot;value&quot;: &quot;{{accessToken}}&quot;,
        &quot;type&quot;: &quot;string&quot;
    },
    {
        &quot;key&quot;: &quot;tokenType&quot;,
        &quot;value&quot;: &quot;bearer&quot;,
        &quot;type&quot;: &quot;string&quot;
    },
    {
        &quot;key&quot;: &quot;addTokenTo&quot;,
        &quot;value&quot;: &quot;header&quot;,
        &quot;type&quot;: &quot;string&quot;
    }
    ]
},
&quot;event&quot;: [
    {
    &quot;listen&quot;: &quot;prerequest&quot;,
    &quot;script&quot;: {
        &quot;id&quot;: &quot;8b2028b3-ea03-415b-bdcf-4e7a0df39d4e&quot;,
        &quot;type&quot;: &quot;text/javascript&quot;,
        &quot;exec&quot;: [
        &quot;&quot;
        ]
    }
    },
    {
    &quot;listen&quot;: &quot;test&quot;,
    &quot;script&quot;: {
        &quot;id&quot;: &quot;f18a8e83-d6c3-4155-aa24-ecf10f252354&quot;,
        &quot;type&quot;: &quot;text/javascript&quot;,
        &quot;exec&quot;: [
        &quot;&quot;
        ]
    }
    }
],
&quot;variable&quot;: [
    {
    &quot;id&quot;: &quot;823938c1-f3ac-4ad6-b2b7-c11f634fac51&quot;,
    &quot;key&quot;: &quot;baseUrl&quot;,
    &quot;value&quot;: &quot;http://localhost:8070&quot;
    },
    {
    &quot;id&quot;: &quot;8134e904-4436-4801-ab18-f59169865344&quot;,
    &quot;key&quot;: &quot;unitId&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;ae618ae5-3b5c-449e-a452-3b9e8ec2abde&quot;,
    &quot;key&quot;: &quot;processId&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;7a38da8f-0870-4ef8-a9ed-db61ade1bb1e&quot;,
    &quot;key&quot;: &quot;processName&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;0717d2f5-9673-483c-b8cd-febb6b115ad5&quot;,
    &quot;key&quot;: &quot;unitName&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;83eed492-e881-4ac4-b2f7-54560a65ad1d&quot;,
    &quot;key&quot;: &quot;accessToken&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;0628bdb2-94b9-41ff-a062-91c4c7fb2134&quot;,
    &quot;key&quot;: &quot;assetId&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;63381cb9-7d3d-4535-84b5-0c33fcd15947&quot;,
    &quot;key&quot;: &quot;assetName&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;354bcf34-860e-4d67-9b9d-fa87e00211d3&quot;,
    &quot;key&quot;: &quot;personId&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;1202dd72-fd93-4e28-8181-a2a6f8b1937f&quot;,
    &quot;key&quot;: &quot;personName&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;1e17139b-c605-4641-9b09-1bd88f62bb2a&quot;,
    &quot;key&quot;: &quot;controlId&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;b92fc81c-2573-4f37-857e-6b59a26b3765&quot;,
    &quot;key&quot;: &quot;controlName&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;bfe6276d-96f0-4a4f-bd96-4214e9360e1b&quot;,
    &quot;key&quot;: &quot;processIdveo271&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;0af17639-8862-43ff-824a-4d691f19ad1c&quot;,
    &quot;key&quot;: &quot;subUnitName&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;074a4920-43d2-4fc1-9bb9-5ad5f0adedfb&quot;,
    &quot;key&quot;: &quot;subUnitId&quot;,
    &quot;value&quot;: &quot;&quot;
    },
    {
    &quot;id&quot;: &quot;1468cf81-6110-44a9-8258-104214f4b48b&quot;,
    &quot;key&quot;: &quot;searchId&quot;,
    &quot;value&quot;: &quot;&quot;
    }
],
&quot;protocolProfileBehavior&quot;: {
    
}
}
</code></pre>
",https://stackoverflow.com/questions/64099977/running-k6-load-test-converted-from-postman-fails,"['rest', 'postman', 'k6']",1805,True,-1,1
Perform Load Testing in Insomnia,"<p>Can I have some guidance on how to perform load testing by sending multiple POST API calls within a stipulated time frame n Insomnia.
To achieve this, I have to POST the API calls in a for loop going from 0 to 500 in a span of 5 sec.
What can I do to implement this ?</p>
",https://stackoverflow.com/questions/62526357/perform-load-testing-in-insomnia,"['rest', 'insomnia']",2990,True,7,1
Load test using jmeter,"<p>how to do load test using <code>JMETER</code> to find the maximum users that the application can handle? I had done load testing for the gaming application using <code>JMETER</code> I have a summary report , aggregate report and graph are generated using available plugins. How to find the load capacity with these reports</p>
",https://stackoverflow.com/questions/60985459/load-test-using-jmeter,"['jmeter', 'load-testing']",68,True,0,1
How to send call audio via WebSocket with any tools,"<p>i have to perform a load testing by sending audio files chunks via websocket ,i tried all the websocket sampler in jmeter but seems no luck .I am able to make connection by using WebSocket Single Write Sampler but not able to send audo files .</p>
<p>help needed on same.</p>
",https://stackoverflow.com/questions/64999620/how-to-send-call-audio-via-websocket-with-any-tools,"['audio', 'websocket', 'load-testing', 'jmeter-plugins', 'chunks']",115,False,0,1
How much time typically a load testing takes for any application to give the metrics?,"<p>How much time it takes to receive metrics like throughput, response time , latency etc after performing a performance or load test?</p>
<p>Are there any references for it and theories behind it? Also are there links on performing a manual load testing on a web application which we have developed?</p>
",https://stackoverflow.com/questions/62698520/how-much-time-typically-a-load-testing-takes-for-any-application-to-give-the-met,"['performance-testing', 'load-testing']",82,False,0,1
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
Is there a way to include Android unit test as JMeter Sampler?,"<p>I'm new with JMeter load testing.</p>
<p>Is there a way to include Android unit test as JMeter Sampler?</p>
<p>I know we can add .Jar files and JMeter can detect the unit tests included, so is there a way to do the same thing for Android app? like adding .apk file?</p>
",https://stackoverflow.com/questions/64146457/is-there-a-way-to-include-android-unit-test-as-jmeter-sampler,"['android', 'unit-testing', 'jmeter', 'load-testing']",58,False,0,1
How to do load testing in real browsers[Not HTTP based load testing like JMeter] in testcafe?,"<p>We are using testcafe for end to end testing,But we have one requirement like 10 different users logins simultaniously[parallelly] to different page and each user uploads different excel files.Is it possible to acheive is testcafe or any other opensource tool is available in market for load testing in real browser?</p>
",https://stackoverflow.com/questions/63316066/how-to-do-load-testing-in-real-browsersnot-http-based-load-testing-like-jmeter,"['testing', 'automation', 'automated-tests', 'e2e-testing', 'testcafe']",108,False,0,0
How can be set the network Bandwidth while load testing of any application using jmeter,"<p>I am doing the load testing of our API using jmeter. Now I need to set the network bandwidth to 256kbps and 512kbps.</p>
<p>I added below lines in apache-jmeter/bin/jmeter.properties but that didn't works.</p>
<pre><code>#httpclient.socket.http.cps=32728
#httpclient.socket.https.cps=32728
</code></pre>
<p>is any other approach to set the network bandwidth or any other best tool for this requirement?</p>
",https://stackoverflow.com/questions/64910723/how-can-be-set-the-network-bandwidth-while-load-testing-of-any-application-using,"['jmeter', 'load-testing']",161,False,0,1
Karate framework - mock server define thread pool,"<p>I'm using karate framework for load testing and ruining mock server using following command with -T option to achive higher tps and it seems it is not effected and its always run 8 threads which is number of cores in the server.</p>

<pre><code>  java -jar karate-0.9.5.RC5.jar -T 100 -m featurefilename.feature -p 8080
</code></pre>

<p>Kindly help to define thread pool count for the karate mock server.</p>
",https://stackoverflow.com/questions/61675202/karate-framework-mock-server-define-thread-pool,"['java', 'karate', 'mockserver']",272,True,1,1
aws auto scaling remove unhealthy instance before it scales up rendering the application unusable,"<p>I am testing out aws auto scaling and other corresponding services.</p>
<p>I have 1 instance registered to target group</p>
<p>minimum/desired instances on auto scaling group as 1. Scale up when CPU utilisation above 50%</p>
<p>During load testing, due to increase in server response time, aws target group fails health check and starts draining the 1 instance that is serving behind my aws application load balancer. Afterwards auto scaling group starts removing the unhealthy instance and my web service goes down.</p>
<p>What should happen is that aws auto scaling group should spin off new insurance as soon as there is an increase in load on the server.</p>
<p>If I increase the minimum/desired server to 2 or 4, same results, on load testing, all servers receive heavy traffic, target group health check fails and it marks all of them unhealthy and aws asg starts removing them all before detecting high CPU utilisation and spawn new instances.</p>
<p>What should be done here?</p>
",https://stackoverflow.com/questions/63417404/aws-auto-scaling-remove-unhealthy-instance-before-it-scales-up-rendering-the-app,"['amazon-web-services', 'amazon-ec2', 'amazon-elb', 'aws-code-deploy', 'aws-auto-scaling']",585,True,3,1
Wordpress + php + mysql High cpu usage,"<p>I'm load testing a production server using <strong>wordpress</strong>, <strong>php 7.2</strong> and <strong>mysql</strong>  <code>Ver 15.1 Distrib 10.1.44-MariaDB</code>, with 4 Core i7 CPUs and 10GB Ram running on <strong>ubuntu 18.04 LTS</strong>. The problem is even with a low load, like 5 users per second, all 4 CPUs spike to 100% and they persist. After a while CPUs are full and I only get Error 500. Also, all of my modules are up to date.</p>

<p>I tried disabling all the plugins in wordpress and ran the same test, but the problem persisted.</p>

<p>I also used some plugins to optimize database like <code>wp-optimize</code>, but no luck. The <code>/var/log/mysql/mysql-slow.log</code> file is also empty.</p>

<p><a href=""https://i.stack.imgur.com/XRoW1.jpg"" rel=""nofollow noreferrer"">Result of load testing after only few sec including htop</a></p>

<p><a href=""https://i.stack.imgur.com/akhdH.png"" rel=""nofollow noreferrer"">Datadog's monitoring dashboard of the related test</a></p>

<p>As shown in pictures above you can comprehend that <code>mysqld</code> is using too much CPU for no reason.</p>

<p>I also ran <strong>mysqltuner</strong> and this is the result:</p>

<pre><code> &gt;&gt;  MySQLTuner 1.7.19 - Major Hayden &lt;major@mhtx.net&gt;
 &gt;&gt;  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 &gt;&gt;  Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[OK] Logged in using credentials passed on the command line
[OK] Currently running supported MySQL version 10.1.44-MariaDB-0ubuntu0.18.04.1
[OK] Operating on 64-bit architecture

-------- Log file Recommendations ------------------------------------------------------------------
[OK] Log file /var/log/mysql/error.log exists
[--] Log file: /var/log/mysql/error.log(7K)
[OK] Log file /var/log/mysql/error.log is readable.
[OK] Log file /var/log/mysql/error.log is not empty
[OK] Log file /var/log/mysql/error.log is smaller than 32 Mb
[!!] /var/log/mysql/error.log contains 8 warning(s).
[!!] /var/log/mysql/error.log contains 3 error(s).
[--] 3 start(s) detected in /var/log/mysql/error.log
[--] 1) 2020-05-09 12:36:17 139638727916672 [Note] /usr/sbin/mysqld: ready for connections.
[--] 2) 2020-05-09 12:28:42 140719406492800 [Note] /usr/sbin/mysqld: ready for connections.
[--] 3) 2020-05-09 10:52:43 139784491093120 [Note] /usr/sbin/mysqld: ready for connections.
[--] 2 shutdown(s) detected in /var/log/mysql/error.log
[--] 1) 2020-05-09 12:32:02 140713171822336 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 2) 2020-05-09 10:53:00 139784442357504 [Note] /usr/sbin/mysqld: Shutdown complete

-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE
[--] Data in InnoDB tables: 112.0K (Tables: 4)
[--] Data in MyISAM tables: 38.7M (Tables: 52)
[OK] Total fragmented tables: 0

-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.

-------- Security Recommendations ------------------------------------------------------------------
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
[!!] There is no basic password file list!

-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined

-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 48m 13s (73K q [25.317 qps], 1K conn, TX: 978M, RX: 11M)
[--] Reads / Writes: 96% / 4%
[--] Binary logging is disabled
[--] Physical Memory     : 9.8G
[--] Max MySQL memory    : 10.6G
[--] Other process memory: 0B
[--] Total buffers: 4.7G global + 6.9M per thread (800 max threads)
[--] P_S Max memory usage: 511M
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 6.5G (67.07% of installed RAM)
[!!] Maximum possible memory usage: 10.6G (108.28% of installed RAM)
[!!] Overall possible memory usage with other process exceeded memory
[OK] Slow queries: 0% (0/73K)
[OK] Highest usage of available connections: 25% (204/800)
[!!] Aborted connections: 10.65%  (193/1812)
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 12K sorts)
[OK] No joins without indexes
[!!] Temporary tables created on disk: 83% (2K on disk / 3K total)
[OK] Thread cache hit rate: 84% (284 created / 1K connections)
[OK] Table cache hit rate: 97% (222 open / 228 opened)
[OK] table_definition_cache(400) is upper than number of tables(303)
[OK] Open file limit used: 6% (304/4K)
[!!] Table locks acquired immediately: 84%

-------- Performance schema ------------------------------------------------------------------------
[--] Memory used by P_S: 511.6M
[--] Sys schema is installed.

-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is enabled.
[--] Thread Pool Size: 4 thread(s).
[--] Using default value is good enough for your version (10.1.44-MariaDB-0ubuntu0.18.04.1)

-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.4% (24M used / 134M cache)
[OK] Key buffer size / total MyISAM indexes: 128.0M/10.0M
[OK] Read Key buffer hit rate: 100.0% (695K cached / 152 reads)
[OK] Write Key buffer hit rate: 100.0% (18 cached / 18 writes)

-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 3.9G/112.0K
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 500.0M * 2/3.9G should be equal to 25%
[OK] InnoDB buffer pool instances: 3
[--] InnoDB Buffer Pool Chunk Size not used or defined in your version
[!!] InnoDB Read buffer efficiency: 85.36% (1493 hits/ 1749 total)
[!!] InnoDB Write Log efficiency: 0% (1 hits/ 0 total)
[OK] InnoDB log waits: 0.00% (0 waits / 1 writes)

-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/1B
[!!] Aria pagecache hit rate: 89.4% (26K cached / 2K reads)

-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.

-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.

-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.

-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: STATEMENT
[--] XA support enabled: ON
[--] Semi synchronous replication Master: Not Activated
[--] Semi synchronous replication Slave: Not Activated
[--] This is a standalone server

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
    Control warning line(s) into /var/log/mysql/error.log file
    Control error line(s) into /var/log/mysql/error.log file
    MySQL was started within the last 24 hours - recommendations may be inaccurate
    Reduce your overall MySQL memory footprint for system stability
    Dedicate this server to your database for highest performance.
    Reduce or eliminate unclosed connections and network issues
    Temporary table size is already large - reduce result set size
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Optimize queries and/or use InnoDB to reduce lock wait
</code></pre>

<p><strong>mysql</strong> config in  <code>/etc/mysqld/my.cnf</code>:</p>

<pre><code>[mysqld]
general_log = on
skip-name-resolve
innodb_read_io_threads=4
innodb_write_io_threads=4
general_log_file = /var/log/mysql/mysql.log
log_error=/var/log/mysql/mysql_error.log
#
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries       = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id              = 1
#log_bin                        = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
max_binlog_size         = 100M
#binlog_do_db           = include_database_name
#binlog_ignore_db       = include_database_name
#
# * InnoDB
innodb_buffer_pool_size= 4000M
max_connections =800
wait_timeout=100
interactive_timeout=100
query_cache_size=0
query_cache_type=0
query_cache_limit=2M
tmp_table_size=500M
max_heap_table_size=500M
thread_cache_size=4
performance_schema=ON
innodb_log_file_size=500M
innodb_buffer_pool_instances=3
innodb_autoinc_lock_mode = 2

</code></pre>

<p><code>/var/log/mysql/error.log</code></p>

<pre><code>2020-05-09 12:36:16 139638727916672 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: The InnoDB memory heap is disabled
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: Using Linux native AIO
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: Using SSE crc32 instructions
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: Initializing buffer pool, size = 3.9G
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: Completed initialization of buffer pool
2020-05-09 12:36:16 139638727916672 [Note] InnoDB: Highest supported file format is Barracuda.
2020-05-09 12:36:17 139638727916672 [Note] InnoDB: 128 rollback segment(s) are active.
2020-05-09 12:36:17 139638727916672 [Note] InnoDB: Waiting for purge to start
2020-05-09 12:36:17 139638727916672 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.46-86.2 started; log sequence number 1832982
2020-05-09 12:36:17 139632989665024 [Note] InnoDB: Dumping buffer pool(s) not yet started
2020-05-09 12:36:17 139638727916672 [Note] Plugin 'FEEDBACK' is disabled.
2020-05-09 12:36:17 139638727916672 [Note] Server socket created on IP: '::'.
2020-05-09 12:36:17 139638727916672 [Warning] 'user' entry 'wp_user@server' ignored in --skip-name-resolve mode.
2020-05-09 12:36:17 139638727916672 [Warning] 'db' entry 'db_name wp_user@server' ignored in --skip-name-resolve mode.
2020-05-09 12:36:17 139638727916672 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.44-MariaDB-0ubuntu0.18.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Ubuntu 18.04
</code></pre>
",https://stackoverflow.com/questions/61697075/wordpress-php-mysql-high-cpu-usage,"['php', 'mysql', 'wordpress', 'nginx', 'cpu']",2516,True,-1,1
Artillery.io always return failure: ensure.p95 &lt; 200,"<p>I use artillery.io for load testing our server. After the tests are run I always get back a failure: <strong>ansure.p95 &lt; 200</strong></p>
<p>My scenario:</p>
<pre><code>config:
  target: &quot;https://testing.ros.chat:8080&quot;
  ensure:
    p95: 200
    maxErrorRate: 1
  socketio:
    transports: [&quot;websocket&quot;]
  phases:
    - duration: 1  # Test for 60 seconds
      arrivalRate: 1 # Every second, add 10 users
      maxVusers: 1
      #rampTo: 10 # And ramp it up to 100 users in total over the 60s period
      name: &quot;Ramping up the load&quot;
    #- duration: 5 # Then resume the load test for 120s
    #  arrivalRate: 1 # With those 100 users we ramped up to in the first phase
    #  maxVusers: 1
    #  rampTo: 1 # And keep it steady at 100 users
    #  name: &quot;Pushing a constant load&quot;
  ws:
      # Ignore SSL certificate errors
      # - useful in *development* with self-signed certs
      rejectUnauthorized: false
  payload:
    path: &quot;./users0.csv&quot;
    fields:
      - &quot;login&quot;
      - &quot;password&quot;
      - &quot;level&quot;
    skipHeader: true
    order: sequence
scenarios:
  - name: &quot;Scenario login user and get user params&quot;
    engine: socketio
    flow:
      - log: &quot;Login users {{ login }} on server&quot;
      - emit:
          channel: &quot;login&quot;
          data: {&quot;login&quot;:&quot;{{ login }}&quot;,&quot;password&quot;:&quot;{{ password }}&quot;,&quot;APILevel&quot;:&quot;{{ level }}&quot;}
          acknowledge:
            match:
              json: &quot;$.0.status&quot;
              value: &quot;ok&quot;
      - emit:
          channel: &quot;get-user-params&quot;
          data: null
          acknowledge:
            match:
              json: &quot;$.0.httpServer&quot;
              value: &quot;testing.ros.chat:80&quot;
      - think: 2
      - emit:
          channel: &quot;logout&quot;
</code></pre>
<p>Results:</p>
<pre><code>Started phase 0 (Ramping up the load), duration: 1s @ 13:06:44(+0300) 2020-08-17
    Login users 9000 on server
Report @ 13:06:49(+0300) 2020-08-17
Elapsed time: 4 seconds
  Scenarios launched:  1
  Scenarios completed: 1
  Requests completed:  3
  Mean response/sec: 0.86
  Response time (msec):
    min: 0.8
    max: 1434.4
    median: 3.2
    p95: 1434.4
    p99: 1434.4
  Codes:
    0: 3

All virtual users finished
Summary report @ 13:06:49(+0300) 2020-08-17
  Scenarios launched:  1
  Scenarios completed: 1
  Requests completed:  3
  Mean response/sec: 0.86
  Response time (msec):
    min: 0.8
    max: 1434.4
    median: 3.2
    p95: 1434.4
    p99: 1434.4
  Scenario counts:
    Scenario login user and get user params: 1 (100%)
  Codes:
    0: 3

Log file: result.json
ensure condition failed: ensure.p95 &lt; 200
</code></pre>
<p>I tried different values for p95 (0, 10, 100) but the result is always the same</p>
<p>Artillery version:</p>
<p>Artillery: 1.6.1
Artillery Pro: not installed (<a href=""https://artillery.io/pro"" rel=""nofollow noreferrer"">https://artillery.io/pro</a>)
Node.js: v10.19.0
OS: linux/x64</p>
",https://stackoverflow.com/questions/63450095/artillery-io-always-return-failure-ensure-p95-200,"['javascript', 'json', 'testing', 'websocket', 'socket.io']",721,False,1,0
Having trouble loading library dependency gatling-grpc into my scala project,"<p>I am a newbie to the whole load testing world and trying to get gatling-grpc working within a scala script to be used within Taurus.</p>
<p>I am using IntelliJ as the IDE and SBT.  I keep getting the following error when compiling my module with SBT:</p>
<p>[error] sbt.librarymanagement.ResolveException: Error downloading com.github.phisgr:gatling-grpc_2.13:0.9.0</p>
<p>Here is my current build.sbt:</p>
<pre><code>PB.targets in Test := Seq(
  scalapb.gen() -&gt; (sourceManaged in Compile).value / &quot;scalapb&quot;
)

name := &quot;cfd-gatling&quot;

version := &quot;0.1&quot;

scalaVersion := &quot;2.13.3&quot;

scalacOptions := Seq(
  &quot;-encoding&quot;, &quot;UTF-8&quot;, &quot;-target:jvm-1.8&quot;, &quot;-deprecation&quot;,
  &quot;-feature&quot;, &quot;-unchecked&quot;, &quot;-language:implicitConversions&quot;, &quot;-language:postfixOps&quot;)

libraryDependencies ++= Seq(
  &quot;io.gatling.highcharts&quot; % &quot;gatling-charts-highcharts&quot; % &quot;3.4.0&quot; % &quot;test,it&quot;,
  &quot;io.gatling&quot;            % &quot;gatling-test-framework&quot;    % &quot;3.4.0&quot; % &quot;test,it&quot;,
  &quot;com.thesamet.scalapb&quot; %% &quot;scalapb-runtime&quot; % scalapb.compiler.Version.scalapbVersion % &quot;protobuf&quot;,
  &quot;io.grpc&quot; % &quot;grpc-netty&quot; % scalapb.compiler.Version.grpcJavaVersion,
  &quot;com.thesamet.scalapb&quot; %% &quot;scalapb-runtime-grpc&quot; % scalapb.compiler.Version.scalapbVersion,
  &quot;com.github.phisgr&quot; %% &quot;gatling-grpc&quot; % &quot;0.9.0&quot; % &quot;test,it&quot;)

enablePlugins(GatlingPlugin)
</code></pre>
",https://stackoverflow.com/questions/64220502/having-trouble-loading-library-dependency-gatling-grpc-into-my-scala-project,"['grpc', 'gatling']",262,False,0,1
Locust : HTTPConnectionClosed,"<p>I am using locust for load testing, I have deployed locust in kubernetes with master and workers. I am testing with 100 users and Hatch rate 20 users. After certain requests, I am continuously facing the issue with 'HttpConnectionClosed'. I have researched lot on this but none of them given me clue.</p>
<p><a href=""https://i.stack.imgur.com/EjJwS.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/EjJwS.png"" alt=""enter image description here"" /></a></p>
<p>I really appreciate if anyone help me.</p>
",https://stackoverflow.com/questions/63133292/locust-httpconnectionclosed,"['python', 'docker', 'flask', 'kubernetes', 'locust']",274,False,0,1
Azure AppService Performance Issue,"<p>We have ASP.Net Core 2.1 Web API hosted in AppService (S1) that talks to Azure SQL DB (S1-20DTUs). Both are in same region. During load testing we found that some API instances are taking too much time to return the result. </p>

<p>We tried to troubleshoot the performance issue and below are our observations.</p>

<ol>
<li>API responds within 0.5 secs most of the time.</li>
<li>API methods are all async methods.</li>
<li>Sometimes it takes around 50 secs to over a minute.</li>
<li>CPU &amp; Memory utilization are below 60%</li>
<li>Database has 20 DTU capacity, out of which 6 DTUs are used during load testing.</li>
<li>In the below example snapshot from Application Insights, we see total duration of the request was 27.4 secs. But the database dependency duration was just 97ms. There is no activity till the database was called. Please refer below example. </li>
</ol>

<p>Can someone please help me to understand what was happening in this 27 secs of wait time. What could be  the reason for this?</p>

<p><a href=""https://i.stack.imgur.com/GvYwu.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/GvYwu.png"" alt=""enter image description here""></a></p>
",https://stackoverflow.com/questions/61632614/azure-appservice-performance-issue,"['azure', 'azure-application-insights', 'azure-web-app-service']",1216,True,1,2
K6 Load Testing - Can you specify whether the output metric for data received/sent is shown in kB or MB?,"<p>K6 Load Testing</p>
<p>At the end of testing, the following metrics are shown:</p>
<pre><code>data_received..............: 1.4 MB  44 kB/s
data_sent..................: 214 kB  6.7 kB/s
</code></pre>
<p>In the above example, data_received is shown in MB whereas data_sent is shown in kB.</p>
<p>Is it possible to specify that these values are ALWAYS shown in kB or MB?</p>
<p>This will make comparing values easier as we know that we are comparing like with like.</p>
",https://stackoverflow.com/questions/63883213/k6-load-testing-can-you-specify-whether-the-output-metric-for-data-received-se,['k6'],269,True,0,1
Thresholding the deviation in `http_req_duration` with k6?,"<p>I want to create a custom metric with <code>k6</code> for load testing of a service. I want to measure the deviation between the <code>http_req_duration</code> between the old version (before the code change), and the new version (with the code change), and put a threshold on the difference. Is it possible to do in <code>k6</code>? If yes, how should I do it?</p>
",https://stackoverflow.com/questions/60940737/thresholding-the-deviation-in-http-req-duration-with-k6,"['javascript', 'backend', 'load-testing', 'k6']",405,False,0,1
Gatling Error Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: io/gatling/charts/component/impl/ComponentLibraryImpl,"<p>Im New To Gatling Load Testing.</p>
<p>1.Program run from Run configuration throwing error No goal Found to execute for following In Goal</p>
<p><strong>gatling:test -Dgatling.simulationClass=RestAPITest.GetRequest.scala</strong></p>
<p>2.Projects are running from Scala Engine But Charts are not generation error exception message like as fallows Exception <strong>in thread &quot;main&quot; java.lang.NoClassDefFoundError: io/gatling/charts/component/impl/ComponentLibraryImpl</strong></p>
<p><a href=""https://i.stack.imgur.com/ygMen.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/ygMen.jpg"" alt=""enter image description here"" /></a></p>
<p><strong>//Test code as follows</strong></p>
<pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;

&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;

    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

    &lt;groupId&gt;WOW_CT_PT&lt;/groupId&gt;

    &lt;artifactId&gt;WOW_CT_PT&lt;/artifactId&gt;

    &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;

    &lt;properties&gt;
        &lt;scala.version&gt;2.12.10&lt;/scala.version&gt;
        &lt;gatling.version&gt;3.3.1&lt;/gatling.version&gt;
    &lt;/properties&gt;

    &lt;repositories&gt;
        &lt;repository&gt;
            &lt;id&gt;scala-tools.org&lt;/id&gt;
            &lt;name&gt;Scala-Tools Maven2 Repository&lt;/name&gt;
            &lt;url&gt;http://scala-tools.org/repo-releases&lt;/url&gt;
        &lt;/repository&gt;
    &lt;/repositories&gt;

    &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;io.gatling&lt;/groupId&gt;
      &lt;artifactId&gt;gatling-test-framework&lt;/artifactId&gt;
      &lt;version&gt;3.3.1&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/io.gatling/gatling-core --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;io.gatling&lt;/groupId&gt;
      &lt;artifactId&gt;gatling-core&lt;/artifactId&gt;
      &lt;version&gt;3.3.1&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/io.gatling.highcharts/gatling-highcharts --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;io.gatling.highcharts&lt;/groupId&gt;
      &lt;artifactId&gt;gatling-highcharts&lt;/artifactId&gt;
      &lt;version&gt;3.3.1&lt;/version&gt;
      &lt;type&gt;pom&lt;/type&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/io.gatling.highcharts/gatling-charts-highcharts --&gt;
&lt;dependency&gt;
    &lt;groupId&gt;io.gatling.highcharts&lt;/groupId&gt;
    &lt;artifactId&gt;gatling-charts-highcharts&lt;/artifactId&gt;
    &lt;version&gt;3.4.0&lt;/version&gt;
&lt;/dependency&gt;   
    &lt;/dependencies&gt;

    &lt;build&gt;
        &lt;testSourceDirectory&gt;src/test/scala&lt;/testSourceDirectory&gt;
        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;net.alchim31.maven&lt;/groupId&gt;
                &lt;artifactId&gt;scala-maven-plugin&lt;/artifactId&gt;
                &lt;version&gt;3.3.1&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;scalaVersion&gt;2.11.8&lt;/scalaVersion&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;io.gatling&lt;/groupId&gt;
                &lt;artifactId&gt;gatling-maven-plugin&lt;/artifactId&gt;
                &lt;version&gt;2.2.3&lt;/version&gt;
                &lt;executions&gt;
                    &lt;execution&gt;
                        &lt;id&gt;performanceTests&lt;/id&gt;
                        &lt;goals&gt;
                            &lt;goal&gt;execute&lt;/goal&gt;
                        &lt;/goals&gt;
                        &lt;configuration&gt;
                            &lt;simulationClass&gt;simulations.SimulationClass&lt;/simulationClass&gt;
                        &lt;/configuration&gt;
                    &lt;/execution&gt;
                &lt;/executions&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;
&lt;/project&gt;


</code></pre>
<pre class=""lang-scala prettyprint-override""><code>import io.gatling.core.Predef._

import io.gatling.http.Predef._

class GetRequest extends Simulation {

    val httpProtocol = http
        .baseUrl(&quot;http://dummy.restapiexample.com/&quot;) // Here is the root for all relative URLs

    val scn = scenario(scenarioName = &quot;Axiom gate request&quot;)
        .exec(http(requestName = &quot;get request&quot;)
            .get(&quot;api/v1/employees&quot;)
        )
        .pause(duration = 5)

    setUp(
        scn.inject(atOnceUsers(users = 1))
    ).protocols(httpProtocol)
}
</code></pre>
",https://stackoverflow.com/questions/64086686/gatling-error-exception-in-thread-main-java-lang-noclassdeffounderror-io-gatl,"['scala', 'maven-plugin', 'scala-gatling']",895,True,0,1
How do I create one Java object for all threads in JMeter?,"<p>I'm attempting to do load testing for Azure, and in doing so, I need to create a an 'EH Client' Object. I want this object to be reusable by all threads, since otherwise, the load testing happens a lot slower. I'm running into the following issues:</p>

<p>From my knowledge of JMeter, I believe that the only way I can do this is through <strong>props</strong>, not variables. However, I have found limited documentation and support on passing normal Java Objects as props, and have even heard that it is <a href=""https://stackoverflow.com/questions/19243730/how-to-put-an-arrayliststring-object-to-the-props-variable-of-jmeter-and-use-i"">discouarged.</a></p>

<p>I'm not sure about where to put my JSR223 Sampler (which is using Java on Beanshell Engine) for this to happen. Ideally, I'd want this to be outside my main thread group, but doing so doesn't seem to work, as any attempts to access the object fail.</p>

<p>TL;DR: I want to create ONE Java Object using a JRS223 Sampler which can be used by all of my threads. </p>
",https://stackoverflow.com/questions/60638706/how-do-i-create-one-java-object-for-all-threads-in-jmeter,"['java', 'jmeter']",450,True,0,1
Powershell parallel processing : How to set value in a global varible,"<p>I am calling an API 500 times with 10 parallel threads as part of load testing. I want to capture the result of API call in a global variable (a counter outside script block scope) so, that I can process further for validation.</p>
<p>Example- In below code , I want to check if all 500 API call is success or not.</p>
<p>PFB code snippet-</p>
<pre><code>$invokeAPI =
{
  try {
    $bodyContent = Get-Content $Using:inputFilepath
    $Response = (Invoke-WebRequest -Method 'Post' -Uri $Using:headUri -Headers $Using:blobHeaders  -Body $bodyContent).StatusCode
    
    Write-Host -BackgroundColor Green &quot;status Code :&quot; $Response
  }
  catch [System.Exception] {
    Write-Host -ForegroundColor Red &quot;Exception caught while invoking API :&quot; $_.ErrorDetails.Message
    [int]$_.Exception.Response.StatusCode
  }
} 

1..500 | ForEach-Object -Parallel $invokeAPI -ThrottleLimit 10

&lt;# ToDo...Capture API invocation Result to validate results#&gt;
</code></pre>
",https://stackoverflow.com/questions/65240534/powershell-parallel-processing-how-to-set-value-in-a-global-varible,"['powershell', 'powershell-7.0']",500,True,2,1
How to get Locust worker ID?,"<p>I ran into one problem when tried to write some tests for load testing using Locust.</p>

<p>The idea: I have to link a specific locust worker (thread) to a specific account. For example:</p>

<pre><code>thread #1 will use only account1,password1

thread #2 will use only account2,password2
</code></pre>

<p>But I did not find any option how to do this. Could anyone help with this issue or give an advice with a workaround? Thanks in adcance!</p>
",https://stackoverflow.com/questions/59970281/how-to-get-locust-worker-id,"['python', 'locust']",1402,True,2,1
How can we divide different actions to be done by different loads in a thread group of a Jmeter,"<p>I have a requirement of load testing with 100 users, and a ramp-up period of 500.so that in every 5 sec, 1 user will login.i have some actions to be done in the application.lets say there are 50 scenarios. so out of 100 users, each of 2 should do one scenario.</p>
<pre><code>how can i set 2 users should do one scenario out of 50 scenarios in a thread group.
</code></pre>
<p>Can anyone help me..Thanks in advance..</p>
",https://stackoverflow.com/questions/63591458/how-can-we-divide-different-actions-to-be-done-by-different-loads-in-a-thread-gr,"['jmeter', 'jmeter-plugins']",75,False,1,1
K6 Load Testing - Can the result be output into the Continuous Integration Pipeline?,"<p>We are using K6 for our load testing.</p>
<p>We want to add the load tests into our Continuous Integration pipeline (Microsoft Azure).</p>
<p>We were hoping that we could set thresholds that pass or fail the test. If the test fails, the Azure build pipeline would continue, however if the test fails the build pipeline would stop.</p>
<p>Can this be done in K6?</p>
",https://stackoverflow.com/questions/63831729/k6-load-testing-can-the-result-be-output-into-the-continuous-integration-pipel,"['azure', 'k6']",854,True,1,2
Server name is showing as www.google.com while recording in JMeter,"<p>I am trying to do load testing on mobile app using JMeter. </p>

<p>While recording the request in JMeter, the server name is being recorded as www.google.com as shown below:</p>

<p><img src=""https://i.stack.imgur.com/bVsjv.png"" alt=""enter image description here""></p>

<p>I am not sure why this is happening; I am trying to test an android application, which I have downloaded from play store.</p>

<p>Is it correct behavior? Or am I missing something.</p>
",https://stackoverflow.com/questions/62150945/server-name-is-showing-as-www-google-com-while-recording-in-jmeter,"['testing', 'jmeter', 'load-testing', 'mobile-application']",74,False,0,0
Resolve error SSLHandshakeException: Remote host terminated the handshake using org.glassfish.jersey.client,"<p>I'm using Jersey-client-2.27 through which invoking https get call as shown below:</p>
<pre><code>Client client = ClientBuilder.newClient();

return client.target(url)
        .request(MediaType.APPLICATION_JSON)
        .header(&quot;authorization&quot;, token)
        .get(String.class);
</code></pre>
<p>Getting below exception once in every 10-15 call hits at client get() method:</p>
<pre><code>&quot;status&quot;:500,
&quot;reason&quot;:&quot;Internal Server Error&quot;,
&quot;code&quot;:0,
&quot;message&quot;:

javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
    at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:284)
    at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:278)
    at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:767)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:229)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414)
    at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:765)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:428)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:324)
</code></pre>
<p>What could be the reason for failing API call frequently especially during load testing and how can I resolve it? I already tried ignoring SSL certificate and adding x509 certificate while sending a request</p>
",https://stackoverflow.com/questions/63613239/resolve-error-sslhandshakeexception-remote-host-terminated-the-handshake-using,"['java', 'rest', 'ssl', 'jersey', 'jersey-client']",1753,False,0,0
Inputting Data into UI element using Locust,"<p>so i'm pretty new to locust and load testing, but i need to insert specific values into different fields on my website.  Trying to load test adding multiple items to an order using 50ish users.  Hopefully each user having a different order in the end.  Right now i have been able to log into my site and navigate between tabs, but thats it.</p>
",https://stackoverflow.com/questions/65128416/inputting-data-into-ui-element-using-locust,"['python', 'testing', 'https', 'load-testing', 'locust']",417,True,0,1
Got text/plain for mimetype when upload image by requests/locust,"<p>When I use dev tool like Postman to upload file, my <a href=""https://github.com/expressjs/express"" rel=""nofollow noreferrer"">Express.js</a> server using <a href=""https://github.com/expressjs/multer"" rel=""nofollow noreferrer"">multer</a></p>
<pre><code>import multer from 'multer';

const upload = multer();
app.post('/api/upload-file',  upload.single('file'), (req, res) =&gt; {
  console.log(req.file);
  res.sendStatus(200);
});
</code></pre>
<p>can parse the file correctly including <code>mimetype</code> field and prints</p>
<pre><code>{
  fieldname: 'file',
  originalname: 'my.png',
  encoding: '7bit',
  mimetype: 'image/png',
  buffer: &lt;Buffer ...&gt;,
  size: 9693
}
</code></pre>
<p>However, when I use <a href=""https://github.com/locustio/locust"" rel=""nofollow noreferrer"">locust</a> (for load testing, and it is <a href=""https://github.com/psf/requests"" rel=""nofollow noreferrer"">requests</a> backed) to upload same file by both of these two methods:</p>
<pre><code>from requests_toolbelt.multipart.encoder import MultipartEncoder

@task
def upload_img_1(self):
    file = open('path/to/my.png', 'rb')
    self.client.post(
        '/api/upload-file',
        files={'file': file})

@task
def upload_img_2(self):
    file = open('path/to/my.png', 'rb')
    m = MultipartEncoder(
        fields={'file': ('my.png', file, 'image/png')})
    self.client.post(
        '/api/upload-file',
        files={'file': m})
</code></pre>
<p>The <code>mimetype</code> I got in my Express.js server are <code>text/plain</code> which is wrong.</p>
<pre><code>{
  fieldname: 'file',
  originalname: 'my.png',
  encoding: '7bit',
  mimetype: 'text/plain',
  buffer: &lt;Buffer ...&gt;,
  size: 9693
}
</code></pre>
<p>How to get correct <code>mimetype</code>?</p>
",https://stackoverflow.com/questions/64884633/got-text-plain-for-mimetype-when-upload-image-by-requests-locust,"['python', 'express', 'python-requests', 'multer', 'locust']",638,True,0,1
How to load test asynchronous services (aws)?,"<p>I want to load test a StepFunction (aws) with load testing tools like Gatling or Artillery...<br />
The problem is when I want to load test this stepfunction I make a request to StartExecution to execute the stepfunction but the stepfunction returns immediately an http response even if the it is processing : because it's async.</p>
<p>Then how can I test my stepFunction ??</p>
<p>Thanks !</p>
",https://stackoverflow.com/questions/64276250/how-to-load-test-asynchronous-services-aws,"['amazon-web-services', 'testing', 'load-testing', 'gatling', 'artillery']",186,False,0,0
Asynchronous Delegates in .Net Core,"<p>I am trying to work on performance improvement on Azure functions APIs using async calls and delegates. I got the expected results now the response it taking just 2 sec to give me a response. But behind the scenes, when I look into application insights I observed some heavy process is going on which I haven't encountered earlier while doing the Jmeter load testing before implementing delegates.</p>
<pre><code>     public async Task Mainmethod()
    {
      Test1 test1=new Test1();
      test1.mymethod1();//trigger method. Don't wait for the output ,execute the next line and return 
                           response
     console.writeline(&quot;Request submitted successfully&quot;);
    }

public class Test1{

public Task Delgate MyDelegate();

public async Task mymethod1(){

MyDelegate myDelegate=mymethod2;

myDelegate=new myDelegate(mymethod2);
 Task.Run(() =&gt;myDelegate.Invoke());//.Net core we dont have method for begininvoke. So, placed inside a 
                                       task to execute

}

public async Task mymethod2(){

string x=await GetAccessToken();//external call for get token (1 request --- 1 sec ; 10 request 1 sec) 

string y= await DoWork(x);//external call for get info (1 request --- 2  sec ; 10 request 14sec)
2
  Dosomemorework(y);//external call for make transaction (1 request --- 3 sec ; 10 request 26 sec)

SendEmail();//send async email

}

public Task async GetAccessToken(){

//await call for get accessToken from service provider
}

public Task async DoWork(string x){

//await call for get response from service provider
}

public Task async Dosomemorework(string y){

//await call for post information from service provider
}

public Task async SendEmail(){

await smtp.SendMailAsync(mailMessage);
}

}

My problem is, infuture when there is more load on the API. The time may increase,and possibility of timeouts.I sense some queuing mechanism is happening , or running the code on a single thread.How to overcome this.


</code></pre>
",https://stackoverflow.com/questions/62719304/asynchronous-delegates-in-net-core,"['c#', '.net-core', 'async-await', 'delegates', 'azure-functions']",897,False,1,0
locust is not installing on my windows 10 for load testing,"<p>I tried installing this pip but getting some error, I want this package module for load testing
This is the output i am getting:</p>

<pre><code>Collecting locustio
Collecting geventhttpclient-wheels==1.3.1.dev2 (from locustio)
  Using cached https://files.pythonhosted.org/packages/bc/7f/42f8b4ac6c7ddf606fa69769cef2229a159d4af45a294053198f52586095/geventhttpclient-wheels-1.3.1.dev2.tar.gz

Requirement already satisfied: six in c:\users\saurabh\appdata\local\programs\python\python38\lib\site-packages (from geventhttpclient-wheels==1.3.1.dev2-&gt;locustio) (1.14.0)
Requirement already satisfied: pycparser in c:\users\saurabh\appdata\local\programs\python\python38\lib\site-packages (from cffi&gt;=1.12.2; platform_python_implementation == ""CPython"" and sys_platform == ""win32""-&gt;gevent==20.4.0-&gt;locustio) (2.20)

  Running setup.py install for geventhttpclient-wheels: started
    Running setup.py install for geventhttpclient-wheels: finished with status 'error'

    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '""'""'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'""'""'; __file__='""'""'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'""'""';f=getattr(tokenize, '""'""'open'""'""', open)(__file__);code=f.read().replace('""'""'\r\n'""'""', '""'""'\n'""'""');f.close();exec(compile(code, __file__, '""'""'exec'""'""'))' install --record 'C:\Users\SauraBh\AppData\Local\Temp\pip-record-ipuoqz4r\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\SauraBh\AppData\Local\Temp\pycharm-packaging\geventhttpclient-wheels\
    Complete output (45 lines):
    C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\dist.py:471: UserWarning: Normalizing '1.3.1dev2' to '1.3.1.dev2'
      warnings.warn(
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\client.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\connectionpool.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\header.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\httplib.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\response.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\url.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\useragent.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    copying src\geventhttpclient\__init__.py -&gt; build\lib.win-amd64-3.8\geventhttpclient
    running egg_info
    writing src\geventhttpclient_wheels.egg-info\PKG-INFO
    writing dependency_links to src\geventhttpclient_wheels.egg-info\dependency_links.txt
    writing requirements to src\geventhttpclient_wheels.egg-info\requires.txt
    writing top-level names to src\geventhttpclient_wheels.egg-info\top_level.txt
    reading manifest file 'src\geventhttpclient_wheels.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
    warning: no previously-included files matching '*.py[co]' found anywhere in distribution
    writing manifest file 'src\geventhttpclient_wheels.egg-info\SOURCES.txt'
    creating build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\oncert.pem -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\server.crt -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\server.key -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_client.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_headers.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_httplib.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_keep_alive.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_network_failures.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_no_module_ssl.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_parser.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_ssl.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_url.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    copying src\geventhttpclient\tests\test_useragent.py -&gt; build\lib.win-amd64-3.8\geventhttpclient\tests
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building 'geventhttpclient._parser' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with ""Microsoft Visual C++ Build Tools"": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '""'""'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'""'""'; __file__='""'""'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'""'""';f=getattr(tokenize, '""'""'open'""'""', open)(__file__);code=f.read().replace('""'""'\r\n'""'""', '""'""'\n'""'""');f.close();exec(compile(code, __file__, '""'""'exec'""'""'))' install --record 'C:\Users\SauraBh\AppData\Local\Temp\pip-record-ipuoqz4r\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
</code></pre>

<p>I have  Microsoft Visual C++ 14.0.25 is installed in my system.
If someone knows any better tool/framework/package for testing api using python please help me. I want to check the registration api with many users at a time.</p>
",https://stackoverflow.com/questions/61592069/locust-is-not-installing-on-my-windows-10-for-load-testing,"['python', 'load-testing', 'locust']",4181,True,0,2
How to send 36000 requests within 5 minutes at an RPS of 120 requests using Jmeter?,"<p>I am using Jmeter for load testing and I'm new to this. I have an API where I want to send around 36000 requests in a given time, which is- <strong>5 minutes</strong>. What should be the configuration of threads, ramp-up time, loop-count, and constant throughput timer for this scenario?</p>
<p>I am using the following configurations, but I am unable to reach the decided RPS-</p>
<pre><code>Thread- 1000
Ramp-up- 5 Minute
loop-count 36
constant throughput timer- 7200
</code></pre>
<p>Where is my configuration wrong?</p>
",https://stackoverflow.com/questions/64596290/how-to-send-36000-requests-within-5-minutes-at-an-rps-of-120-requests-using-jmet,"['jmeter', 'jmeter-5.0']",167,True,3,1
Performance Testing: Flag when a UI/API test&#39;s runtime increases by x% (Selenium C#),"<p>Our team currently use Selenium and C# (and NUnit) to run UI Automated tests. All tests have been manually programmed, meaning no recorders have been used.</p>
<p><strong>Issue</strong>: We now have a request that these tests track their own performance (and past performance) and raise a warning when its runtime increases by x% (5% or 10%, etc).</p>
<p><strong>Question</strong>: What would be the best way to accomplish this? Should we create to tool to analyze performance (performance history) of these UI and API tests from scratch or are there other tools out there we can leverage?</p>
<p>Blogs or stackExchange questions discussing load/performance testing usually reference three main tools for C# (NeoLoad, SilkPerformer, LoadRunnerProfessional). However, I'm not sure that what I'm being asked to do is considered performance testing (load testing) in the purest sense and therefore, not sure whether the tools mentioned above will help achieve the overall goal. They also usually separate performance/load testing from UI/API testing.</p>
<p><strong>Summary</strong>: looking for advice on what direction to take and/or what to read up on for this type of testing.</p>
",https://stackoverflow.com/questions/63046111/performance-testing-flag-when-a-ui-api-tests-runtime-increases-by-x-selenium,"['c#', 'selenium', 'automated-tests', 'performance-testing', 'neoload']",109,True,0,2
Mark task as successful in Locust (no HttpLocust),"<p>I am using Locust for load testing, my task is basically reading and publishing from/to PubSub. I noticed I don't get any statistics in the Locust UI, seems that it does it automatically if you use HttpLocust or can be forced using response.success() or response.failure(). Since I am not using HTTP calls in my task, is there a way I can signal the task as ""successful"" without the response object?</p>
",https://stackoverflow.com/questions/60105401/mark-task-as-successful-in-locust-no-httplocust,['locust'],607,True,2,1
Guidelines with Locust/Selenium and the number of browser sessions per/slave,"<p>I'm looking to build a test with 4000 browser sessions using a Locust/Selenium approach. I tried using the same approach using JMeter/Selenium using headless browsers and for many reasons I've come to the conclusion that it's not possible. I'm familiar with running Browser-based load testing tools and with TrueClient I can reach around 45 Browsers/users per/Slave/agent (loaded servers, 64RAM and 16CPU's). Silk Performer BDLT suggests around 15 or 20 sessions. I've looked at 'realbrowserlocusts' and it's really peaked my interest because I used locust as part of some Covid-19 application testing I ran back in February. Are there any metrics of how many browsers a slave can handle using selenium and any metrics of how many slaves Locust can handle?
Should I be looking at PhantomJS instead? My org is looking to do away with all commercial tools and going to opensource and need to add a browser-based load testing solution. JMeter/Gatling/Locust work great for the protocol level applications
Any suggestions would be great.</p>
",https://stackoverflow.com/questions/64852055/guidelines-with-locust-selenium-and-the-number-of-browser-sessions-per-slave,"['python', 'selenium-chromedriver', 'phantomjs', 'locust']",702,False,0,1
K6 InfluxDB + Grafana Docker : How to preload a dashboard,"<p>I am using K6 for Load Testing.</p>
<p>I have cloned the K6, Grafana, InfluxDB docker-compose set up from here:</p>
<p><a href=""https://github.com/loadimpact/k6"" rel=""nofollow noreferrer"">https://github.com/loadimpact/k6</a></p>
<p>Each time I start Grafana, I have to manually import the dashboard I want to use ('Import' - ID2587 - Load).</p>
<p>I am new to Docker (and Grafana!)....is there anyway to have this dashboard preloaded in the container so I don't have to manually add it each time?</p>
",https://stackoverflow.com/questions/63501972/k6-influxdb-grafana-docker-how-to-preload-a-dashboard,"['docker', 'grafana', 'k6']",1808,True,1,2
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 to load more requests per second in karate gatling,"<p>I am trying to reuse karate scripts and perform load testing using gatling. The scenario defined is to load constant 50 users per second for 10 seconds. (To load test 500 users) However the number of requests per second does not exceed 20 requests per second in the gatling report. Please let me know if i am doing anything wrong.
ExampleTest.java code which executes Karate scripts</p>
<pre><code>//package examples;

import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import net.masterthought.cucumber.Configuration;
import net.masterthought.cucumber.ReportBuilder;
import org.apache.commons.io.FileUtils;

class ExamplesTest {
    
    @Test
    void testParallel() {
        //System.setProperty(&quot;karate.env&quot;, &quot;demo&quot;); // ensure reset if other tests (e.g. mock) had set env in CI
        Results results = Runner.path(&quot;classpath:examples&quot;).tags(&quot;~@ignore&quot;).parallel(10);
        generateReport(results.getReportDir());
        assertEquals(0, results.getFailCount(), results.getErrorMessages());        
    }
    
    public static void generateReport(String karateOutputPath) {        
        Collection&lt;File&gt; jsonFiles = FileUtils.listFiles(new File(karateOutputPath), new String[] {&quot;json&quot;}, true);
        List&lt;String&gt; jsonPaths = new ArrayList&lt;String&gt;(jsonFiles.size());
        jsonFiles.forEach(file -&gt; jsonPaths.add(file.getAbsolutePath()));
        Configuration config = new Configuration(new File(&quot;target&quot;), &quot;demo&quot;);
        ReportBuilder reportBuilder = new ReportBuilder(jsonPaths, config);
        reportBuilder.generateReports();        
    }
    
}

</code></pre>
<p>Scala Code to define load test scenarios.</p>
<pre><code>package perf

import com.intuit.karate.gatling.PreDef._
import io.gatling.core.Predef._
import scala.concurrent.duration._

class KarateSimulate extends Simulation {
    

    val protocol = karateProtocol(
    &quot;/v2/&quot; -&gt; Nil,
    &quot;/v2/&quot; -&gt; pauseFor(&quot;get&quot; -&gt; 0, &quot;post&quot; -&gt; 25)
    )
    val userfeeder = csv(&quot;data/Token.csv&quot;).circular

    val getScores = scenario(&quot;Get Scores for Students&quot;).feed(userfeeder).exec(karateFeature(&quot;classpath:examples/scores/student.feature&quot;))

    setUp(
        getScores.inject(constantUsersPerSec(50) during (10 seconds)).protocols(protocol)
    )   
}
</code></pre>
<p><a href=""https://i.stack.imgur.com/nY285.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/nY285.jpg"" alt=""enter image description here"" /></a></p>
",https://stackoverflow.com/questions/63178702/how-to-load-more-requests-per-second-in-karate-gatling,['karate'],1744,True,4,1
Unauthorized error while performing load testing on HMAC API using Jmeter,"<p>I am performing load testing of HMAC API, I get an error message ""unauthorized"".
The API requests in POSTMAN uses HMAC authentication and generates a code.
I tried converting into jmx format from json via Loadimpact. The converted file doesn't hold the HMAC code. In Jmeter, file doesn't load the HMAC code.</p>

<p>Can anyone advice what alternative solutions are available? Does it really work with bean shell pre/post procedures.</p>
",https://stackoverflow.com/questions/60165477/unauthorized-error-while-performing-load-testing-on-hmac-api-using-jmeter,"['jmeter', 'load', 'hmac']",188,False,0,1
K6 InfluxDB + Grafana Docker : How many virtual users can I run from one container?,"<p>I am using K6 for Load Testing.</p>
<p>I have cloned the K6, Grafana, InfluxDB docker-compose set up from here:</p>
<p><a href=""https://github.com/loadimpact/k6"" rel=""nofollow noreferrer"">https://github.com/loadimpact/k6</a></p>
<p>Is there a maximum limit to the number of virtual users you can ramp up to from one Docker Container?</p>
<p>i.e. will I need to run lots of containers to reach the required number of virtual users or can it all be done from just one container?</p>
",https://stackoverflow.com/questions/63688603/k6-influxdb-grafana-docker-how-many-virtual-users-can-i-run-from-one-contain,"['docker', 'k6']",239,True,0,1
Restful GET endpoint - huge response data causing poor performance,"<p>I have a restful GET method implementation using spring-boot and postgresql as database, and it fetches huge amount of data for a single call(almost 7 mb). During load testing I found it is causing very poor throughput.</p>
<p>Pagination is not an option here as application is not UI based, and client service needs entire data in a single call.</p>
<p>What possible approaches I can have to improve the performance?</p>
",https://stackoverflow.com/questions/63591220/restful-get-endpoint-huge-response-data-causing-poor-performance,"['postgresql', 'spring-boot', 'rest']",46,False,0,0
How to execute multiple scenarios in Jmeter concurrently,"<p>I am trying to perform load testing for my Web Application. Have created a Test plan with 16 scenarios using a single thread group. I have <a href=""https://i.stack.imgur.com/j4gLu.png"" rel=""nofollow noreferrer"">added</a> multiple sampler requests under each scenario and used throughput controllers for each of these.
But when the test is run, I noticed that the scenarios are running sequentially whereas i Want the scenarios to run in parallel.
Can someone help me with this please.</p>
",https://stackoverflow.com/questions/61658611/how-to-execute-multiple-scenarios-in-jmeter-concurrently,"['parallel-processing', 'jmeter', 'load-testing', 'execution']",457,False,0,1
Strange characters issue while working with csv data and JMeter,"<p>I am using JMeter for load testing. I have requests placed in csv, like this:</p>
<pre><code>/api/empId/2f3a1e77-6577-43af-b9fe-258a082e7c81 0
</code></pre>
<p>There are multiple such requests.</p>
<p>What I observe is that for first request in the file, request generated by JMeter has some characters inserted in the url which cause requests to fail:</p>
<pre><code>localhost:8080/my-base-pathï»¿/api/empId/2f3a1e77-6577-43af-b9fe-258a082e7c81
</code></pre>
<p>As you can see, 'ï»¿' is inserted. It happens only for first record in the csv file.</p>
<p>Any input would be helpful?</p>
",https://stackoverflow.com/questions/63465341/strange-characters-issue-while-working-with-csv-data-and-jmeter,"['csv', 'jmeter']",227,True,0,1
Non HTTP response code: java.net.UnknownHostException in JMeter,"<p>I am trying to do load testing using JMeter for the first time.
I am trying to access URL : <a href=""http://ss12345.localhost:9001/testManagement/login"" rel=""nofollow noreferrer"">http://ss12345.localhost:9001/testManagement/login</a>.
The Sampler Result Printed as : </p>

<pre><code>Thread Name:Thread Group 1-1
Sample Start:2020-04-02 18:25:52 IST
Load time:21
Connect Time:21
Latency:0
Size in bytes:2490
Sent bytes:0
Headers size in bytes:0
Body size in bytes:2490
Sample Count:1
Error Count:1
Data type (""text""|""bin""|""""):text
Response code:Non HTTP response code: java.net.UnknownHostException
Response message:Non HTTP response message: ss12345.localhost


HTTPSampleResult fields:
ContentType: 
DataEncoding: null
</code></pre>

<p>I do not understand why it is not picking the <code>userSpecificSubDomain : ss12345</code>.
If I do not specify userSpecificSubDomain then it opens the Login Page otherwise it throws the Non HTTP response code: java.net.UnknownHostException.
<em>For more details, refer to the below images.</em></p>

<p><a href=""https://i.stack.imgur.com/QSZdE.png"" rel=""nofollow noreferrer"">Image 1 </a></p>

<p><a href=""https://i.stack.imgur.com/Tmqbv.png"" rel=""nofollow noreferrer"">Image 2</a></p>
",https://stackoverflow.com/questions/60993362/non-http-response-code-java-net-unknownhostexception-in-jmeter,['jmeter'],1878,True,2,1
Azure AppInsights - Http Result code Faulted,"<p>We have configured APIM, WebApp in Azure and then connected AppInsights Log to get the details in case of failure.</p>

<p>We are doing load testing on APIM.</p>

<p>At one point, we started getting 500 error code which means that there is issue at application level.</p>

<p>When we looked in details, at one point, we got http result code as ""Faulted"" &amp; we do not get any errors underneath API, servers.</p>

<p>So I would like to know what means by ""Faulted""?</p>

<p><a href=""https://i.stack.imgur.com/lthLD.png"" rel=""noreferrer""><img src=""https://i.stack.imgur.com/lthLD.png"" alt=""A""></a></p>
",https://stackoverflow.com/questions/60540667/azure-appinsights-http-result-code-faulted,"['azure', 'azure-web-app-service', 'load-testing', 'azure-application-insights', 'azure-api-management']",12816,True,7,1
"Errors with Locust load testing scripts - Connection aborted.&#39;, RemoteDisconnected","<p>I am new to Locust Load testing framework and in process of  migrating my existing Azure cloud based Performance testing C# scripts to Locust's Python based scripts. Our team almost completed migration of scripts. But during our load tests, we are getting errors as below, which fails to create new requests from the machine due to high CPU utilization or because of so many exception on Locust. We are running with Locust web based mode - details are indicated below. These scritps are working fine on smaller loads of 50 to 100 users</p>

<p>""<strong>Error 1 -('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',)</strong>)""</p>

<p>""<strong>Error 2 : Connection pool is full, discarding connection</strong>""</p>

<p>""** **Error 3 :urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 110] Connection timed out****""</p>

<p>Yes, we are using UrlLibs on the utility classes . But first 2 error does seems to be of Locust.</p>

<p>Our Load testing configurations  are : ""<strong>3500 users at a hatch rate of 5 users per second</strong>"". Running natively(no docker container) on a 8 Core , 16 Gb Linux Ubuntu Virtual machine on Azure. ulimit set as 50,000 on Linux machine.</p>

<p>Please help us with your thoughts</p>

<p><strong>Sample test is as below</strong></p>

<pre><code>import os 
import sys
sys.path.append(os.environ.get('WORKDIR', os.getcwd()))

from locust import HttpLocust, TaskSet, task
from locust.wait_time import between

class ContactUsBehavior(TaskSet):


    wait_time = AppUtil.get_wait_time_function(2)


    @task(1)
    def post_load_test_contact(self):
        data = { ""ContactName"" : ""Mane""
            , ""Email"" : ""someone@someone.com""
            , ""EmailVerifaction"" : ""someone@someone.com""
            , ""TelephoneContact"" : """"
            , ""PhoneNumber"" : """"
            , ""ContactReason"" : ""Other""            
            , ""OtherComment"" : ""TEST Comments 2019-12-30""
            , ""Agree"" : ""true""
             }
        self.client.post(""app/contactform"", self.client, 'Contact us submission', post_data = data)


class UnauthenticatedUser(HttpLocust):
    task_set = ContactUsBehavior
    # host is override-able
    host = 'https://app.devurl.com/'
</code></pre>
",https://stackoverflow.com/questions/60326472/errors-with-locust-load-testing-scripts-connection-aborted-remotedisconnect,"['python', 'performance-testing', 'locust']",2596,True,2,1
locust : hooks -&gt; run a custom code with locust performance testing environment,"<p>I am trying to run a code during the load testing is happening(eg push aggregated data to database).</p>
<p>I am using locust <em><strong>init event handler</strong></em> --&gt; <a href=""https://docs.locust.io/en/stable/api.html#locust.event.Events.init"" rel=""nofollow noreferrer"">https://docs.locust.io/en/stable/api.html#locust.event.Events.init</a></p>
<p>Here is my code:</p>
<p><a href=""https://i.stack.imgur.com/dYJAO.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/dYJAO.png"" alt=""enter image description here"" /></a></p>
<p><em><strong>process_exit_code</strong></em> value is always <em><strong>None</strong></em>, event locust has finish the load test.</p>
<p>Is there any way that we can run a custom code like this during the time locust is performing the performance testing ?</p>
<p>Please help.</p>
",https://stackoverflow.com/questions/62694640/locust-hooks-run-a-custom-code-with-locust-performance-testing-environment,"['python-3.x', 'locust']",390,True,1,1
Is it possible to purge an AWS queue using Ansible,"<p>I was just wondering if there is an ability to purge queues using ansible/ansible scripts. I was looking through the documentation and the only thing I can find is deleting queues. As we are using ansible to scale up/down systems before/after load testing I would prefer to purge queues using ansible also if possible.</p>
<p>Thanks in advance for all the help. I'm always suprised how helpful people are here.</p>
<p>Thanks all.</p>
",https://stackoverflow.com/questions/65093566/is-it-possible-to-purge-an-aws-queue-using-ansible,"['amazon-web-services', 'ansible', 'queue', 'amazon-sqs']",104,False,0,0
k6: WARpanic: runtime error: invalid memory address or nil pointer dereference,"<p>I'm trying to run a Performance TEst with a tool named K6 (free and open-source load testing tool), my test is about to test a Website Performance, and when I run the Test I got this:</p>

<pre><code>WARN[0029] Request Failed                     
error=""Get https://i.ytimg.com/vi/xtee7r5-ztY/hqdefault.jpg?
sqp=-oaymwEYCKgBEF5IVfKriqkDCwgBFQAAiEIYAXAB&amp;rs=AOn4CLBlViQFOGYBjH0iGMUyeyWwj0CRHQ: 
read tcp 10.61.19.91:27672-&gt;172.217.19.86:443: wsarecv: A connection attempt failed because 
the connected party did not properly respond after a period of time, or established 
connection failed because connected host has failed to respond.""
WARpanic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0xa48c2c]
</code></pre>

<p>The test can be run on the command line with command:</p>

<p>k6 run --out influxdb=<a href=""http://localhost:8086/VideoRecord_DB"" rel=""nofollow noreferrer"">http://localhost:8086/VideoRecord_DB</a> D:\Applications\K6-Scripts\VideoRecording.js`</p>

<p>this is the k6 version: </p>

<pre><code>C:\Users\diz&gt;k6 version
</code></pre>

<p>k6 v0.26.1 (dev build, go1.13, windows/amd64)</p>
",https://stackoverflow.com/questions/60804228/k6-warpanic-runtime-error-invalid-memory-address-or-nil-pointer-dereference,"['performance-testing', 'load-testing', 'k6']",337,True,0,1
Microservice liveness and readiness timeout handling,"<p>I have pods deployed in kubernetes cluster with serves some HTTPS requests. I am doing load testing for the apis with concurrent users per second. </p>

<p>While I am doing the load tests container is getting killed due to liveness and readiness failures and pods getting re-deployed.
Due to this, my APIs are facing failures.</p>

<pre><code>liveness:
  initialDelaySeconds: 60
  periodSeconds: 20
  timeoutSeconds: 60
  successThreshold: 1
  failureThreshold: 4

readiness:
  initialDelaySeconds: 60
  periodSeconds: 20
  timeoutSeconds: 60
  successThreshold: 1
  failureThreshold: 4

livenessProbe:
   httpGet:
    path: /health
    port: 8000
    scheme: HTTPS
readinessProbe            
   httpGet:
    path: /health
    port: 8000
    scheme: HTTPS
</code></pre>

<p>How can I avoid these failures? Is it due to my application couldn't serve the liveness requests?</p>
",https://stackoverflow.com/questions/61276747/microservice-liveness-and-readiness-timeout-handling,"['kubernetes', 'kubernetes-pod']",865,False,0,1
Does user network speed have an impact on web server performance?,"<p>The Slow Loris attack overwhelms an unpatched web server by simply extending the time it takes to finish making a request, then repeating that action - thus tying up all available resources to respond.</p>

<p>It follows then, that many users from geographic locations with bad internet connectivity, should be similarly detrimental to performance.</p>

<p>Is this really the case? What is the phenomenon called? What is a good way to simulate this with a load testing tool?</p>
",https://stackoverflow.com/questions/62046007/does-user-network-speed-have-an-impact-on-web-server-performance,['performance-testing'],22,True,0,1
Why would SQS ApproximateNumberOfMessagesVisible &amp; ApproximateAgeOfOldestMessage go up even when Received/Deleted metrics match Sent metrics?,"<p>In the CloudWatch Metrics graph below, the purple line is ApproximateNumberOfMessagesVisible and red line is ApproximateAgeOfOldestMessage. They are trending up even when NumberOfMessagesReceived (orange)/NumberOfMessagesDeleted (green) match NumberOfMessagesSent (blue).</p>
<p><a href=""https://i.stack.imgur.com/BuFR4.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/BuFR4.png"" alt=""enter image description here"" /></a></p>
<p>How is this possible?</p>
<p>In my code, I process the message in a new thread and therefore the message is almost immediately deleted from the queue. (This is not good practice in production but this is a load testing script so I don't expect or care about exceptions)</p>
<pre><code>sqsClient.receiveMessage(queueUrl).getMessages().forEach(msg -&gt; {
    pool.execute(() -&gt; handleSqsMessage(msg));
    sqsClient.deleteMessage(queueUrl, msg.getReceiptHandle());
});
</code></pre>
",https://stackoverflow.com/questions/63310222/why-would-sqs-approximatenumberofmessagesvisible-approximateageofoldestmessage,"['amazon-sqs', 'amazon-cloudwatch']",7312,True,2,1
Does load testing using Tsung on an xmpp ejabberd server create original data?,"<p>I am new to xmpp/ejabberd and also to testing. I have an ejabberd xmpp server setup for my chat application.
I am using Tsung to do load testing on the server.</p>
<p>For this I am creating multiple scenarios or sessions where the Tsung will create MUC and send messages to that MUC.</p>
<p>It works fine, until a question came to my mind.</p>
<p>The tsung does the load testing, and generates the reports too, but why isn't the rooms that are created by tsung and the messages that are sent to those MUC does not reflect on the Server.</p>
<p>I have checked it using ejabberd rest APIs. I don't see any rooms created by tsung. I can assure that the xmpp server works fine as I have created rooms and sent messages from my chat application.</p>
<p>Is it that the tsung only creates dummy data that it later delete once the test is complete?
Or like its said on their docs that it simulates traffic. Does that mean it does not create any of those data?
Or is it with my tsung configuration?</p>
<p>I am sorry if this sounds silly.</p>
<p>Thanks in advance!</p>
",https://stackoverflow.com/questions/63246775/does-load-testing-using-tsung-on-an-xmpp-ejabberd-server-create-original-data,"['xmpp', 'load-testing', 'ejabberd', 'tsung']",269,True,0,1
oracle apex with jmeter,"<p>i start to do a loading test with jmeter, i have a form where i can insert record, in the url of insert action there is a parameter called p_json, i do a very basic with table containing one column. the p_json is like this</p>
<pre><code>{

&quot;pageItems&quot;:{
&quot;itemsToSubmit&quot;:[

{

&quot;n&quot;:&quot;P13_ROWID&quot;,
&quot;v&quot;:&quot;&quot;,
&quot;ck&quot;:&quot;9P9SjzLAQLGkBy_q7phVqLeAJFI&quot;

},
{

&quot;n&quot;:&quot;P13_TEST&quot;,
&quot;v&quot;:&quot;fgjgghjhgjghjghjghjghjghjghj&quot;

}

],
&quot;protected&quot;:&quot;QnL4629OYon2MxvQzUtEag&quot;,
&quot;rowVersion&quot;:&quot;&quot;,
&quot;formRegionChecksums&quot;:{

}
},
&quot;salt&quot;:&quot;188736967333118203740478635219988206060&quot;
</code></pre>
<p>}</p>
<p>how can i generate ck value in the json, the protected value... in my jmeter request</p>
<p>any documentation of how to do load testing with apex? is there an oracle tool to do this?</p>
",https://stackoverflow.com/questions/64571768/oracle-apex-with-jmeter,"['jmeter', 'oracle-apex']",369,True,0,1
Why Jmeter can&#39;t record sites using the firebase as data connection,"<p>I tried to record a site using JMeter which uses Firebase for data storage but it fails to access the firebase and I can not log into the site while recording. Is there any way to access firebase during the recording of load testing in JMeter? I entered the JMeter certificate also but still, the problem is there. And also tried  using the chrome extension still it also didn't give the expected output <a href=""https://i.stack.imgur.com/5KZVq.jpg"" rel=""nofollow noreferrer"">Error Description Image</a></p>
",https://stackoverflow.com/questions/64572056/why-jmeter-cant-record-sites-using-the-firebase-as-data-connection,"['firebase', 'google-cloud-firestore', 'firebase-authentication', 'jmeter', 'load-testing']",401,True,0,1
K6 InfluxDB + Grafana Docker : Which folders and files are actually required and which can be removed?,"<p>I am using K6 for Load Testing, with Grafana and InfluxDB.</p>
<p>I have cloned the K6, Grafana, InfluxDB docker-compose set up from here:</p>
<p><a href=""https://github.com/loadimpact/k6"" rel=""nofollow noreferrer"">https://github.com/loadimpact/k6</a></p>
<p>There are a huge number of folders and files in the cloned repository. I am guessing most of them aren't actually needed.</p>
<p>Is there a definitive list showing just the folders/files that are required to run k6, grafana and influxdb so I can clean up my repository?</p>
",https://stackoverflow.com/questions/63688764/k6-influxdb-grafana-docker-which-folders-and-files-are-actually-required-and,"['docker', 'k6']",271,True,0,1
K8s even load balancing among pods not happening in load test,"<p>In my Kubernetes deployment of 3 replicas, I'm doing load testing. I notice that the 3 replicas/pods are not evenly balanced. One pod is regularly maxing out on its CPU limit and other pods are really low usage. I'm using K8s version 1.18.</p>
<p>Any tips and advice on how (if possible) to make it balanced?  Note: I am not concerned with any external load balancer nor any nginx controller. This is an internal K8s service call.</p>
",https://stackoverflow.com/questions/62996522/k8s-even-load-balancing-among-pods-not-happening-in-load-test,"['kubernetes', 'load-balancing']",36,False,0,0
How do I determine virtual user amount and pacing if the client cannot give me any real data about the website?,"<p>I've come across many clients who aren't really able to provide real production data about a website's peak usage. I often do not get peak pageviews per hour, etc.</p>
<p>In these circumstances, besides just guessing or going with what &quot;feels right&quot; (i.e. making it all up), how exactly does one come up with a realistic workload model with an appropriate # of virtual users and a good pacing value?</p>
<p>I use Loadrunner for my performance/load testing.</p>
",https://stackoverflow.com/questions/63635683/how-do-i-determine-virtual-user-amount-and-pacing-if-the-client-cannot-give-me-a,"['performance-testing', 'loadrunner', 'vugen']",136,True,0,1
How to manage static assets in a python module?,"<p>I am working on a python module to act as a testing library, I am thinking of exposing it as a web service for load testing the backend, and as a cli for running manual tests</p>
<p>I don't know how to manage static test files, for example the project looks like:</p>
<pre><code>web/
cmd/
src/
  test_data/
  library.py 
</code></pre>
<p>What is your advice for loading the test_data ? I thought of putting test_data outside of the module, but they would be duplicated a lot.</p>
<p>Should I use relative paths in library.py ?</p>
<pre><code>test_file = f'{os.path.dirname(__file__)}/test_data/file.txt'
</code></pre>
",https://stackoverflow.com/questions/62553179/how-to-manage-static-assets-in-a-python-module,"['python', 'python-3.x', 'module', 'python-module']",196,False,2,0
Azure Application insights - records in &quot;dependencies&quot; table causing confusion,"<p>While Performing load testing for a specific business scenario, Azure Application insights shows below records like &quot;create database&quot;, &quot;create collection&quot;. But in actual code path of execution such functionalities like &quot;create database&quot;, &quot;create collection&quot; doesn't exists it more about reading the existing cosmos db document from existing cosmos db collection.</p>
<p>Any idea when &amp; how such records/row will exists in &quot;dependencies&quot; table of Azure Application insights?</p>
<p>Moreover same cosmos db collection called &quot;dbs/YFVzwR==/colls&quot; getting recreated again and again</p>
<p><img src=""https://i.stack.imgur.com/UZ84Z.png"" alt=""enter image description here"" /></p>
",https://stackoverflow.com/questions/65447962/azure-application-insights-records-in-dependencies-table-causing-confusion,"['azure', 'azure-cosmosdb', 'azure-application-insights']",192,False,0,0
How to configure jmeter for load testing a secure application if I have .pem files with me,"<p>I am new to JMeter, just started. I have a secure application and I downloaded the .pem file. I am confused(steps converting .pem to .cer or pk12) about how to use this for accessing the application. When I tried to convert .pem to pfx it is giving error saying either private key does not match or format is different. Can anyone help with a clear list of steps to follow to use JMeter for load testing the application? 
Thanks in advance.</p>
",https://stackoverflow.com/questions/60369519/how-to-configure-jmeter-for-load-testing-a-secure-application-if-i-have-pem-fil,"['jmeter', 'keystore']",335,False,0,1
Akka streams Can i store state in external object?,"<p>I have publisher with stream of messages. And i should send for consumers only messages which are based on consumer subsribers.</p>

<p>In my local is working for 2 tread without load, but on load testing is not working, many messages goes in not right way.</p>

<p>I have 2 versions of problem:</p>

<ol>
<li>I new in akka stream and don't see in doc a little bit same case, joining 2 streams</li>
<li>I use not in right way scala tread safe options </li>
</ol>

<p>What it can be?</p>

<pre class=""lang-scala prettyprint-override""><code>import akka._
import akka.http.scaladsl.model.http2.PeerClosedStreamException
import akka.stream._
import akka.stream.scaladsl._

import scala.collection.mutable
import scala.concurrent.Future
import scala.util.matching.Regex

class RtkBrokerImpl(materializer: Materializer) extends MessageBroker {

  private implicit val mat: Materializer = materializer

  val mutableArray = mutable.Map[String, Source[ConsumeRequest, NotUsed]]()

  val (inboundHub: Sink[ProduceRequest, NotUsed], outboundHub: Source[ConsumeResponse, NotUsed]) =
    MergeHub.source[ProduceRequest]
      .async
      .mapAsyncUnordered(100)(x =&gt; Future.successful(ConsumeResponse(x.key, x.payload)))
      .toMat(BroadcastHub.sink)(Keep.both)
      .run()

  val all: RunnableGraph[Source[ProduceRequest, NotUsed]] =
    MergeHub.source[ProduceRequest]
      .toMat(BroadcastHub.sink)(Keep.right)

  val queue = Sink.queue[ProduceRequest](100)


  override def produce(in: Source[ProduceRequest, NotUsed]): Future[ProduceResponse] = {
    in.to(inboundHub).run()
    Future.never
  }

  override def consume(in: Source[ConsumeRequest, NotUsed]): Source[ConsumeResponse, NotUsed] = {
    val patternRepo = new PatternsRepository
    in.runForeach { req =&gt;
      req.action match {
        case ConsumeRequest.Action.SUBSCRIBE =&gt; patternRepo.putPatterns(req.keys)
        case ConsumeRequest.Action.UNSUBSCRIBE =&gt; patternRepo.dropPatterns(req.keys)
      }
    }

    outboundHub.async.filter(res =&gt; patternRepo.checkKey(res.key))
  }

}

class PatternsRepository {

  import RtkBrokerImpl._

  import scala.collection.JavaConverters._

  val concurrentSet: mutable.Set[String] = java.util.concurrent.ConcurrentHashMap.newKeySet[String]().asScala

  def getPatterns():  mutable.Set[String] = {
    concurrentSet
  }

  def checkKey(key: String): Boolean = {
    concurrentSet.contains(key) ||
      concurrentSet.exists(x =&gt; isInPattern(key, x))
  }

  def dropPatterns(string: Seq[String]) = {
    string.foreach(concurrentSet.remove)
  }

  def putPatterns(string: Seq[String]) = {
    concurrentSet.addAll(string)
  }
}

object RtkBrokerImpl {

  def isInPattern(key: String, pattern: String): Boolean = {
    if (pattern.exists(x =&gt; x == '#' || x == '*')) {
      val splittedPatten = pattern.split(""."")
      val splittedKey = key.split(""."")
      if (!splittedPatten.contains(""#"")) {
        if (splittedKey.size != splittedKey.size)
          return false
        splittedPatten.zip(splittedKey)
          .forall { case (key, pat) =&gt; if (pat == ""*"") true else key == pat }
      } else {
        val regExp = pattern.replaceAll(""."", ""\\."")
          .replaceAll(""\\*"", ""[A-Za-z0-9]+"")
          .replaceAll(""#"", ""\\S+"")
        new Regex(regExp).matches(key)
      }
    } else {
      key == pattern
    }
  }

}
</code></pre>
",https://stackoverflow.com/questions/62049078/akka-streams-can-i-store-state-in-external-object,"['scala', 'akka', 'akka-stream', 'concurrenthashmap']",124,False,0,0
Wildfly - Can&#39;t get Max Connections greater than 256,"<p>I am load testing an application deployed on Wildfly 20 using JMeter. The observation is that under load of <code>300 requests/sec</code> and more <strong>Wildfly server doesn't respond to few requests and those requests time out</strong>. On analyzing server logs (both system and application) and thread dumps nothing related to this is found and memory utilization is also normal.</p>
<p>On tuning some parameters such as <code>Open File Descriptors</code>, Wildfly <code>IO threads/Task Max Threads</code>, <code>Max Connections</code> and Apache configuration <em>[details below]</em> the number of requests getting timed out have significantly reduced but still a lot of requests time out.</p>
<p>Using Wildfly Runtime for monitoring during load testing one thing drew my attention that even on setting the Undertow's <code>Http Max Connections</code> parameter to a value lets say 1000 the <code>Connection Count</code> value (circled in screenshot below) never exceeds 256. On playing with this parameter a bit I saw that <code>Http Max Connections</code> parameter sets to any value less than 256 but never more. And it looks like once this limit is reached no new request is served as gets timed out until some connections are freed.</p>
<p>Is there is some other configuration (Apache or OS) which puts this limit or any other Wildfly configuration responsible for this? Am I missing anything?
<em><strong>[Used Wildfly Management Console for all configurations]</strong></em></p>
<p><em>[from standalone.xml]</em></p>
<pre><code>&lt;subsystem xmlns=&quot;urn:jboss:domain:io:3.0&quot;&gt;    
    &lt;worker name=&quot;default&quot; io-threads=&quot;300&quot; task-max-threads=&quot;300&quot;/&gt;    
    &lt;buffer-pool name=&quot;default&quot;/&gt;    
&lt;/subsystem&gt;
</code></pre>
<p>...</p>
<pre><code>&lt;subsystem xmlns=&quot;urn:jboss:domain:undertow:11.0&quot; default-server=&quot;default-server&quot; default-virtual-host=&quot;default-host&quot; default-servlet-container=&quot;default&quot; default-security-domain=&quot;other&quot; statistics-enabled=&quot;true&quot;&gt;
            &lt;buffer-cache name=&quot;default&quot;/&gt;
            &lt;server name=&quot;default-server&quot;&gt;
                &lt;http-listener name=&quot;default&quot; max-connections=&quot;500&quot; socket-binding=&quot;http&quot; max-cookies=&quot;100&quot; record-request-start-time=&quot;true&quot; redirect-socket=&quot;https&quot; enable-http2=&quot;true&quot;/&gt;
                &lt;https-listener name=&quot;https&quot; socket-binding=&quot;https&quot; max-cookies=&quot;100&quot; record-request-start-time=&quot;true&quot; security-realm=&quot;ApplicationRealm&quot; enable-http2=&quot;true&quot;/&gt;
                &lt;host name=&quot;default-host&quot;&gt;
                    &lt;location name=&quot;/&quot; handler=&quot;welcome-content&quot;/&gt;
                    &lt;filter-ref name=&quot;limit-connections&quot;/&gt;
                    &lt;http-invoker security-realm=&quot;ApplicationRealm&quot;/&gt;
                &lt;/host&gt;
            &lt;/server&gt;
            &lt;servlet-container name=&quot;default&quot;&gt;
                &lt;jsp-config/&gt;
                &lt;websockets/&gt;
            &lt;/servlet-container&gt;
            &lt;handlers&gt;
                &lt;file name=&quot;welcome-content&quot; path=&quot;${jboss.home.dir}/welcome-content&quot;/&gt;
            &lt;/handlers&gt;
            &lt;filters&gt;
                &lt;request-limit name=&quot;limit-connections&quot; max-concurrent-requests=&quot;10000&quot; queue-size=&quot;10000&quot;/&gt;
            &lt;/filters&gt;
        &lt;/subsystem&gt;
</code></pre>
<p><em>[Apache configuration]</em></p>
<pre><code>&lt;IfModule mpm_worker_module&gt;
    ServerLimit          40
    StartServers          2
    MaxClients          1000
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadsPerChild      25
    MaxRequestsPerChild   0
&lt;/IfModule&gt;
</code></pre>
<p><em>[Wildfly Runtime monitoring console during testing]</em>
<a href=""https://i.stack.imgur.com/epUDm.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/epUDm.png"" alt=""enter image description here"" /></a></p>
",https://stackoverflow.com/questions/64888343/wildfly-cant-get-max-connections-greater-than-256,"['java', 'concurrency', 'wildfly', 'http-proxy']",1800,False,1,1
Could not initialize class io.cucumber.core.options.PluginOption,"<p>I have a piece of Cucumber + JUNIT + Selenium WebDriver code to be used in JMeter for load testing.
Following is the piece of code:</p>
<pre><code>package runner;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.Test;
import cucumber.api.cli.Main;
import pageobjects.alinea.AssetsMetadataPage;

public class TestRunner{
private static Logger Log = LogManager.getLogger(AssetsMetadataPage.class);

public ClassLoader load;

public TestRunner(String str) {
    // TODO Auto-generated constructor stub
    
    this();
}
public TestRunner() {
    // TODO Auto-generated constructor stub
}
// Test method is defined with Cucumber Main run method. 
// &quot;-g&quot; signifies glue code (package where the code is), &quot;-t&quot; signifies the tag.  The location of the feature file which defines the test scripts 


@Test
public void runTest() throws Throwable {
try {

        Main.run(new String[]{&quot;-g&quot;, &quot;step_definitions&quot;,&quot;-t&quot;, &quot;@upload&quot;, &quot;src/test/resources/features/addcontent.feature&quot;}, ClassLoader.getSystemClassLoader());
        //log.info(&quot;Print&quot;);
        Log.info(&quot;Print&quot;);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
// Post Test what the JUNIT test needs to do
}
</code></pre>
<p>This is the feature file:</p>
<pre><code>@Upload
Scenario: User upload the image
Given navigate to folder and upload a picture
</code></pre>
<p>and imported these jar into the lib folder of jmeter:</p>
<pre><code>junit-4.13.jar
cobertura-1.8.jar
mockito-core-3.5.5.jar
cucumber-core-5.7.0.jar
cucumber-java-5.7.0.jar
cucumber-junit-5.7.0.jar
cucumber-jvm-deps-1.0.6.jar
gherkin-15.0.2.jar
selenium-server-standalone-2.53.0.jar
</code></pre>
<p>When I try to run from Eclipse, there's no issue, the execution is completed without any glitch.
But when i run this from jmeter getting below error:</p>
<pre><code>**Error -- runTest(org.apache.jmeter.protocol.java.sampler.JUnitSampler$AnnotatedTestCase): io/cucumber/plugin/SummaryPrinter
Trace -- java.lang.NoClassDefFoundError: io/cucumber/plugin/SummaryPrinter
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    at io.cucumber.core.options.PluginOption$1.&lt;init&gt;(PluginOption.java:37)
    at io.cucumber.core.options.PluginOption.&lt;clinit&gt;(PluginOption.java:36)
    at io.cucumber.core.options.RuntimeOptions.addDefaultFormatterIfAbsent(RuntimeOptions.java:60)
    at io.cucumber.core.options.RuntimeOptionsBuilder.build(RuntimeOptionsBuilder.java:132)
    at io.cucumber.core.cli.Main.run(Main.java:61)
    at runner.TestRunner.runTest(TestRunner.java:31)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.jmeter.protocol.java.sampler.JUnitSampler$AnnotatedTestCase.runTest(JUnitSampler.java:595)
    at junit.framework.TestResult.runProtected(TestResult.java:142)
    at org.apache.jmeter.protocol.java.sampler.JUnitSampler.sample(JUnitSampler.java:395)
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: io.cucumber.plugin.SummaryPrinter
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 28 more**
</code></pre>
<p>**</p>
<p>Am I missing something to add in jmeter for Cucumber options? Thanks in advance for your answers!</p>
",https://stackoverflow.com/questions/63584944/could-not-initialize-class-io-cucumber-core-options-pluginoption,"['java', 'selenium', 'selenium-webdriver', 'jmeter', 'cucumber']",327,False,0,1
Netty WebSocket Client Delays in channel.writeAndFlush,"<p>We have a WebSocket client application built using Netty 4.1.50. The application is running on a Linux VM/Container.</p>
<p>Here is the code snippet</p>
<pre><code>EventLoop = new EpollEventLoopGroup(0, new DefaultThreadFactory(&quot;websocket-client&quot;);
Bootstrap bootstrap = new Bootstrap();
bootstrap.group(eventLoopGroup)
                  .channel(EpollSocketChannel.class)
                  .handler(channelInitializer)
                  .option(ChannelOption.SO_KEEPALIVE, true);

ChannelFuture cf = bootstrap.connect(configuration.getHost(), configuration.getPort());
channel = cf.channel();

          /*
           * Wait for it to complete, or throw a fault.
           */
          try {
              cf.sync();
          } catch (Exception e) {
              logger.warn(&quot;Failed to connect: &quot;, e);
              return;
          }

          logger.debug(&quot;Socket channel {} got created&quot;, channel);
          cf.channel().closeFuture().sync();
          logger.info(&quot;Connection closed&quot;);

logger.debug(&quot;Writing data to socket channel {}&quot;, channel);
String messageText = JsonUtil.toJson(transportMessage);
ChannelFuture channelFuture = channel.writeAndFlush(new TextWebSocketFrame(messageText));
channelFuture.addListener((ChannelFutureListener) future -&gt; {
logger.debug(&quot;Data written to socket channel. Request id: {}&quot;, transportMessage.getRequestId());
              });
</code></pre>
<p>We are doing lot load testing by sending a lot of messages over the WebSocket channel from the Server and under the load, we are observing delays in writing the message to WebSocket channel on the client-side.</p>
<h1>Logs</h1>
<pre><code>DEBUG 06/22 09:12:13.246 com.test.client.websocket.WebSocketConnectionManagerImpl: ForkJoinPool.commonPool-worker-3 {X-REQUEST-ID=102953b0-772e-4187-947d-c129fa099291} Writing data to socket channel [id: 0xd63b3752]
DEBUG 06/22 09:12:13.378 com.test.client.websocket.WebSocketConnectionManagerImpl: websocket-client-1-1 {} Data written to socket channel. Request id: 102953b0-772e-4187-947d-c129fa099291

DEBUG 06/22 09:12:36.966 com.test.client.websocket.WebSocketConnectionManagerImpl: ForkJoinPool.commonPool-worker-3 {X-REQUEST-ID=34568e89-95ff-4be3-abcf-ac2edd315f31} Writing data to socket channel [id: 0xd63b3752]
DEBUG 06/22 09:13:07.392 com.test.client.websocket.WebSocketConnectionManagerImpl: websocket-client-1-1 {} Data written to socket channel. Request id: 34568e89-95ff-4be3-abcf-ac2edd315f31

DEBUG 06/22 09:15:06.449 com.test.client.websocket.WebSocketConnectionManagerImpl: I/O dispatcher 2 {X-REQUEST-ID=0e28fbae-4c06-4551-9a73-8c171cc09911} Writing data to socket channel [id: 0xd63b3752]
DEBUG 06/22 09:15:06.449 com.vmware.hcs.broker.connector.client.websocket.WebSocketConnectionManagerImpl: websocket-client-1-1 {} Data written to socket channel. Request id: 0e28fbae-4c06-4551-9a73-8c171cc09911
</code></pre>
<p>for request-id '34568e89-95ff-4be3-abcf-ac2edd315f31', it took ~30 sec to write into SOCKET channel.</p>
",https://stackoverflow.com/questions/62514059/netty-websocket-client-delays-in-channel-writeandflush,"['websocket', 'netty']",198,False,0,0
What to do with Azure error &quot;Premium V2 is not supported for this scale unit. Please consider redeploying or cloning your app.&quot;,"<p>I need to change an app service pricing tier from S1 to P2V2, in order to match our production settings for load testing.</p>

<p>When I go to do this P2V2 is not possible I see:</p>

<p>""Premium V2 is not supported for this scale unit. Please consider redeploying or cloning your app""</p>

<p>What does this mean and what do I do to fix? Should I create a new plan and redeploy all the resources in the plan, or should I clone each app and then delete the old one?</p>

<p><a href=""https://i.stack.imgur.com/fDzwF.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/fDzwF.png"" alt=""enter image description here""></a></p>
",https://stackoverflow.com/questions/61368057/what-to-do-with-azure-error-premium-v2-is-not-supported-for-this-scale-unit-pl,"['azure', 'azure-app-service-plans']",1642,False,4,0
Does gatling reported response times include the response time from a hosted redis feeder?,"<p>For particular gatling load testing simulation, we have some data that we normalize and temporarily store in redis in order to feed our simulation scenario for each request that is made. This data is retrieved using the redis data feeder API in our simulation, gatling/scala code. We have redis running on a separate server. I am curious if the reported response times in the gatling results report includes the response time for each record that gets popped out of redis for each request that is built and executed during the simulation.</p>
",https://stackoverflow.com/questions/59718106/does-gatling-reported-response-times-include-the-response-time-from-a-hosted-red,"['scala', 'redis', 'gatling']",534,True,3,1
How to test client side performance testing of single page application with JMeter,"<p>JMeter does not support the client side performance testing (verifying the content rendering time / page loading time) out of the box.</p>
<p>In single page applications requests are sent to the server as API calls. I am interested in verifying the client side page loading time for concurrent users with JMeter.</p>
<ol>
<li><p>What is the best way to test the SPA with JMeter ?</p>
</li>
<li><p>Do you recommend <a href=""https://github.com/undera/jmeter-plugins-webdriver"" rel=""nofollow noreferrer"">Selenium WebDriver plugin</a>?</p>
</li>
<li><p>Is there any other tools that can be used to verify the client side
load testing for concurrent users?</p>
</li>
</ol>
",https://stackoverflow.com/questions/65351656/how-to-test-client-side-performance-testing-of-single-page-application-with-jmet,"['jmeter', 'jmeter-5.0']",1286,True,0,1
How can one execute Java code using Gatling load testing framework?,"<p>I am evaluating different load testing tools. After trying JMeter and having two exceptions when running and viewing the test result, I would like to give Gatling a spin. Reading to various resources I fail to find an idea how to execute once own Java Code.</p>
<p>I understand that Gatling is written in Scala but it runs on a JDK and Scala is able to incooperate/call Java code. So the question is, what does it take to combine both and if there are any resources available.</p>
",https://stackoverflow.com/questions/64593941/how-can-one-execute-java-code-using-gatling-load-testing-framework,"['java', 'scala', 'gatling']",2563,False,0,1
Error: Script execution timed out after 30000ms,"<p>I am trying to do some load testing. I am using newman in nodejs.
In my script I have async.parallel to execute several collections in parallel. Then repeat set of parallel excution every 5 sec. In each run I have the following options:</p>
<pre><code>collection: require('./collection.json'),
environment: require('./environment.json'),
timeoutRequest : 0, // infinite timeout
delayRequest: 1000, // ms
iterationCount: 5
</code></pre>
<p>Tha main loop looks like:</p>
<pre><code>async function sleep(ms) {
  return new Promise(done =&gt; setTimeout(() =&gt; done(), ms));
}

async function orchestrator() {

  for (let j = 0; j &lt; cycles; j++)

  {
    async.parallel(runItems,
      function(err, results) {
        if (err) {
          throw err;
        }
      }
    );
    await sleep(5000);
  }
</code></pre>
<p>The last 3 lines of output are:</p>
<pre class=""lang-none prettyprint-override""><code>code: ‘ERR_SCRIPT_EXECUTION_TIMEOUT’
}
Process exited with code 1
</code></pre>
<p>I set cycles to 500. All goes well for 70+ cycles but then I get the error mentioned.</p>
<p>Have you a solution or some work around I can do?</p>
",https://stackoverflow.com/questions/65022477/error-script-execution-timed-out-after-30000ms,"['javascript', 'postman', 'postman-collection-runner', 'newman']",2620,True,0,1
Automatic distributed reading of csv file in Jmeter distributed load testing?,"<p>My scenario is while doing distributed load testing through jmeter i want csv file should read in auto distributed manner . <em>example</em>
if i have 100 users entry in <strong>csv data set config</strong> file and number of slave server is 10. so in normal scenario i have to keep csv file entry in arranged manner like </p>

<pre><code>user1- to 10 at slave-1
user-11to20 at slave-2
.
.
.
user-91 to 100 at slave 3
</code></pre>

<p>so i want same csv file have entry of all 100 users should be placed at all slave and jmeter automatically read entry from these files and distribute it .</p>
",https://stackoverflow.com/questions/61723831/automatic-distributed-reading-of-csv-file-in-jmeter-distributed-load-testing,"['csv', 'jmeter']",1250,True,0,2
JMeter HTTP Request Slow Response,"<p>I am using JMeter to perform load testing on HTTPS site. I created script using Blazemeter Script Recorder Manually, I am able to launch and login to website very efficiently. when I play script HTTP Request is working very slow. It take long time to initiate and complete each request as shown below in image.</p>
<p><strong>1st Request:</strong></p>
<p><a href=""https://i.stack.imgur.com/lFNqV.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/lFNqV.png"" alt=""enter image description here"" /></a></p>
<p>Second Request:</p>
<p><a href=""https://i.stack.imgur.com/EcTE0.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/EcTE0.png"" alt=""enter image description here"" /></a></p>
<p>I have created <strong>only one thread</strong> as mentioned below in the image</p>
<p><a href=""https://i.stack.imgur.com/nPrpF.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/nPrpF.png"" alt=""enter image description here"" /></a></p>
<p>I will be thankful to you for your help in this regard as i am facing too much delay in each Http Request</p>
<p>Thanks</p>
",https://stackoverflow.com/questions/64647568/jmeter-http-request-slow-response,"['jmeter', 'jmeter-plugins', 'blazemeter']",688,False,2,1
JMeter 5.3 - java.net.SocketException: Connection reset error messages,"<p>I use JMeter 5.3 for load testing of a web application and SAML authentication. I execute JMeter with use of <code>jmeter.bat</code> file. Application backend is configured properly, but I get following error message:</p>
<blockquote>
<p>Response code:Non HTTP response code: java.net.SocketException
Response message:Non HTTP response message: Connection reset</p>
</blockquote>
<p>I use <code>http.connection.stalecheck$Boolean=true</code> parameter in user.properties file.</p>
<p>I set connection timeout to <code>4000 ms</code> in each HTTP requests. First error message appears in less than 4 seconds, when test is started.
SSL certificates are not self-signed.</p>
<p><strong>UPDATE:</strong>
I increased pool size for TCP connections, but problem still persists.</p>
<pre><code>Get-Item 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters' | New-ItemProperty -Name MaxUserPort -Value 65534 -Force | Out-Null
Get-Item 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters' | New-ItemProperty -Name TcpTimedWaitDelay -Value 30 -Force | Out-Null
Get-Item 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters' | New-ItemProperty -Name TcpNumConnections -Value 16777214 -Force | Out-Null
Get-Item 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters' | New-ItemProperty -Name TcpMaxDataRetransmissions -Value 5 -Force | Out-Null
</code></pre>
",https://stackoverflow.com/questions/64042100/jmeter-5-3-java-net-socketexception-connection-reset-error-messages,"['sockets', 'exception', 'jmeter', 'socketexception']",348,False,1,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
how to auto generate the gatling simulation for rest api,"<p>i have an akka http scala project currently its UI is not ready yet but i have to do load testing using (<a href=""https://gatling.io/)[gatling]"" rel=""nofollow noreferrer"">https://gatling.io/)[gatling]</a> for the routes after some researching i think i have to write the gatling simulation scala code manually, because we have the <a href=""https://gatling.io/docs/current/http/recorder/"" rel=""nofollow noreferrer"">recorder</a> feature that records the simulation and generates test scala simulation code automatically so i want to know if there is some tool or plugin which auto generate the simulation for my routes right now i use postman for hitting my routes <code>(GET, POST, DELETE)</code></p>
",https://stackoverflow.com/questions/60948467/how-to-auto-generate-the-gatling-simulation-for-rest-api,"['scala', 'gatling', 'scala-gatling']",1155,True,-1,1
"Locust, on_start method doesn&#39;t work with tasks","<p>I am trying to add some variables (e.g. self.boolean_flag) to HttpUser.
Which represents the user state. This variable is used in scenario load testing.</p>
<p>According to the documentation, I should use <em>on_start</em> to initialise variables.
However, when I use tasks = [TaskSet] like below, The on_start doesn't seem to work.</p>
<p>AttributeError: 'ExampleTask' object has no attribute 'boolean_flag':</p>
<pre><code>class ExampleTask(TaskSet):
    @task
    def example_one(self):
        print(self.boolean_flag)   # AttributeError: 'ExampleTask' object has no attribute 'boolean_flag'
        make_api_request(self, &quot;example_one&quot;)


class CustomUser(HttpUser):
    wait_time = between(
        int(os.getenv(&quot;LOCUST_MIN_WAIT&quot;, 200)), int(os.getenv(&quot;LOCUST_MAX_WAIT&quot;, 1000))
    )

    def on_start(self):
        self.boolean_flag = False

    tasks = {ExampleTask1 : 10, ExampleTask2: 5 ... }

</code></pre>
<p>The bottom works though:</p>
<pre><code>class CustomUser(HttpUser):
    wait_time = between(
        int(os.getenv(&quot;LOCUST_MIN_WAIT&quot;, 200)), int(os.getenv(&quot;LOCUST_MAX_WAIT&quot;, 1000))
    )

    def on_start(self):
        self.boolean_flag = False

    @task
    def example_one(self):
        print(self.boolean_flag)
        make_api_request(self, &quot;example_one&quot;)

</code></pre>
<p>Since I have many different scenarios that reuse many Tasksets, I need to use Tasks = {}..</p>
<p>I also tried subclassing HttpUser and add those variables in <strong>init</strong>().
But that doesn't work well with tasks={} either.</p>
<pre><code>class CustomUser(HttpUser):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.boolean_flag = False


class AllOfApisCallForLoadAtOneGo(CustomUser):
    wait_time = between(
    int(os.getenv(&quot;LOCUST_MIN_WAIT&quot;, 200)), int(os.getenv(&quot;LOCUST_MAX_WAIT&quot;, 1000))
)
    tasks = {ExampleTask1 : 10, ExampleTask2: 5 ... }
</code></pre>
<pre><code>(loadtest-GvbsrA_X-py3.8) ➜  loadtest git:(abcd) ✗ locust -f locustfile_scenario.py first -H https://www.somehost.com
[2020-09-02 06:24:27,276] MacBook-Pro.local/INFO/locust.main: Starting web interface at http://0.0.0.0:8089 (accepting connections from all network interfaces)
[2020-09-02 06:24:27,286] MacBook-Pro.local/INFO/locust.main: Starting Locust 1.2.3
[2020-09-02 06:24:35,881] MacBook-Pro.local/INFO/locust.runners: Spawning 10 users at the rate 3 users/s (0 users already running)...
[2020-09-02 06:24:35,883] MacBook-Pro.local/ERROR/locust.user.task: You must specify the base host. Either in the host attribute in the User class, or on the command line using the --host option.
Traceback (most recent call last):
  File &quot;/Users/poetry/virtualenvs/loadtest-GvbsrA_X-py3.8/lib/python3.8/site-packages/locust/user/task.py&quot;, line 284, in run
    self.execute_next_task()
  File &quot;/Users/poetry/virtualenvs/loadtest-GvbsrA_X-py3.8/lib/python3.8/site-packages/locust/user/task.py&quot;, line 309, in execute_next_task
    self.execute_task(self._task_queue.pop(0))
  File &quot;/Users/poetry/virtualenvs/loadtest-GvbsrA_X-py3.8/lib/python3.8/site-packages/locust/user/task.py&quot;, line 422, in execute_task
    task(self.user)
  File &quot;/Users/poetry/virtualenvs/loadtest-GvbsrA_X-py3.8/lib/python3.8/site-packages/locust/user/users.py&quot;, line 224, in __init__
    raise LocustError(
locust.exception.LocustError: You must specify the base host. Either in the host attribute in the User class, or on the command line using the --host option.
</code></pre>
",https://stackoverflow.com/questions/63696055/locust-on-start-method-doesnt-work-with-tasks,"['python-3.x', 'locust']",3930,True,0,1
Merge mysql queries,"<p>I have a number of queries with slightly different requirements and will be used with load testing so lowering the number of query calls the better. I thought there must be a way to rearrange the queries into one big one.</p>
<p>The following are very simplified versions of the kind of data features I'm utilising</p>
<p>Query 1 (Limit scenario):</p>
<pre><code>    SELECT SUM(f_total_ftg&gt;=2) as ftg_2_plus FROM 
    (SELECT * FROM results WHERE (f_player1='arcos' OR f_player2='arcos') 
    AND (f_player1='skromnuy' OR f_player2='skromnuy') 
    AND f_total_ftg IS NOT NULL AND f_datetime &lt; '2020-07-26 00:54:00' 
    ORDER BY f_datetime DESC LIMIT 10) as x
</code></pre>
<p>Query 2 (No limit scenario):</p>
<pre><code>SELECT SUM(f_total_ftg&gt;=2) as ftg_2_plus FROM 
(SELECT * FROM results WHERE (f_player1='arcos' OR f_player2='arcos') 
AND (f_player1='skromnuy' OR f_player2='skromnuy') 
AND f_total_ftg IS NOT NULL AND f_datetime &lt; '2020-07-26 00:54:00' 
ORDER BY f_datetime DESC) as x
</code></pre>
<p>Query 3 (Date range scenario):</p>
<pre><code>SELECT SUM(f_total_ftg&gt;=2) as ftg_2_plus FROM 
(SELECT * FROM results WHERE (f_player1='arcos' OR f_player2='arcos') 
AND (f_player1='skromnuy' OR f_player2='skromnuy') 
AND f_total_ftg IS NOT NULL AND f_datetime BETWEEN '2020-07-26 00:54:00' - INTERVAL 1 DAY AND '2020-07-26 00:54:00' 
ORDER BY f_datetime DESC) as x
</code></pre>
<p>I'm not sure how i'd order my sub queries to accommodate these scenarios.</p>
<p>I'd want 3 columns from this:</p>
<pre><code>ftg_2_plus_no_limit
ftg_2_plus_no_limit
ftg_2_plus_date_range
</code></pre>
",https://stackoverflow.com/questions/63454496/merge-mysql-queries,"['mysql', 'sql', 'subquery']",46,False,-1,2
Generate authentication token for each request in jmeter,"<p>I have a rather unique situation in jmeter where I need to do load-testing on our authentication federation. This means I need to generate a unique authentication token from a federated token server for each request and because the tokens expire after 5 minutes, I can't use <code>__StringFromFile</code>. I need to consume the token as soon as it is produced.</p>

<p>I can prepare an executable that outputs the token to its STDOUT. Is there a way for jmeter to execute a program and consume its output for each request - something like <code>__ExecuteAndReadStdOut(C:\path\to\program.exe)</code>?</p>
",https://stackoverflow.com/questions/60670305/generate-authentication-token-for-each-request-in-jmeter,['jmeter'],203,True,0,1
Can&#39;t write Array of Map to kafka in jmeter,"<p>I would like to produce messages to kafka using jmeter. I did find below recommendation to integrate with jmeter: <a href=""https://stackoverflow.com/questions/29345392/develop-apache-kafka-producer-and-load-testing-using-jmeter"">Develop Apache Kafka producer and load testing using JMeter</a></p>
<p>I also found <a href=""https://github.com/corunet/kloadgen"" rel=""nofollow noreferrer"">https://github.com/corunet/kloadgen</a> which integrates with confluent schema and let you write avro messages to kafka topic.</p>
<p>I am trying to write below schema message to kafka using jmeter:</p>
<pre><code>{&quot;type&quot;:&quot;record&quot;,&quot;name&quot;:&quot;TestAvro&quot;,&quot;namespace&quot;:&quot;com.test.abcd&quot;,&quot;fields&quot;:[{&quot;name&quot;:&quot;name&quot;,&quot;type&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;avro.java.string&quot;:&quot;String&quot;}},{&quot;name&quot;:&quot;value&quot;,&quot;type&quot;:{&quot;type&quot;:&quot;array&quot;,&quot;items&quot;:{&quot;type&quot;:&quot;map&quot;,&quot;values&quot;:{&quot;type&quot;:&quot;string&quot;,&quot;avro.java.string&quot;:&quot;String&quot;},&quot;avro.java.string&quot;:&quot;String&quot;}}}]}
</code></pre>
<p>Its an array of map. I have not found libraries that can write this to kafka in jmeter.</p>
<p>Is there any other way to write above message out to kafka topic?</p>
",https://stackoverflow.com/questions/62521144/cant-write-array-of-map-to-kafka-in-jmeter,"['apache-kafka', 'jmeter']",467,False,0,2
Question about building custom RequestAction in Gatling,"<p>I followed this tutorial(<a href=""https://blog.codecentric.de/en/2017/07/gatling-load-testing-part-2-extending-gatling/"" rel=""nofollow noreferrer"">https://blog.codecentric.de/en/2017/07/gatling-load-testing-part-2-extending-gatling/</a>)  which teaches you to extend Gatling and essentially led to building this plugin(<a href=""https://github.com/rbraeunlich/gatling-jdbc"" rel=""nofollow noreferrer"">https://github.com/rbraeunlich/gatling-jdbc</a>) . I'm looking to build my own custom actions and have a small issue. Here's a simplified version of the code in my action (extends RequestAction):</p>
<pre><code>override def sendRequest(requestName: String, session: Session): Validation[Unit] = {
  val start = clock.nowMillis
  if (requestName.toString().equals(&quot;abc&quot;)) {
    statsEngine.logResponse(session.scenario, session.groups, requestName.toString(), start, clock.nowMillis, OK, None, None)
    Success(&quot;success&quot;)
  } else {
    statsEngine.logResponse(session.scenario, session.groups, requestName.toString(), start, clock.nowMillis, KO, None, None)
    Failure(&quot;fail&quot;)
  }
}
</code></pre>
<p>For some reason when this action is invoked from exec the test remains active if result is OK. Any suggestions? (Apologies in advance if this is not the right forum)</p>
",https://stackoverflow.com/questions/65082258/question-about-building-custom-requestaction-in-gatling,"['scala', 'gatling']",596,True,0,1
Multple connection simulation to a MQTT Server using same machine,"<p>I have a custom designed Embedded MQTT Server that is running on port 1883. I wanted to do its load testing. I wanted to make at least 200 simultaneous connection to this MQTT Server. As per normal networking concepts, if I make a connection to the MQTT Server from my laptop using 1883 port, I cannot make another connection using same port. I have 5 laptops but using these 5 laptops I can only create 5 connection, How can I solve this issue of making multiple connection to the same MQTT Server using single laptop?</p>
",https://stackoverflow.com/questions/64084964/multple-connection-simulation-to-a-mqtt-server-using-same-machine,"['networking', 'server', 'network-programming', 'mqtt', 'admin']",217,True,-2,1
Parse string in sh file,"<p>For a gitlab ci/cd project, I need to find the url of a knative service (used to deploy a webservice) so that I can utilize it as my base url for load testing</p>

<p>I have found that I can find the url (and other information) with the command: kubectl get ksvc helloworld-go, which outputs:</p>

<pre><code>NAME            URL                                                LATESTCREATED         LATESTREADY           READY   REASON
helloworld-go   http://helloworld-go.default.34.83.80.117.xip.io   helloworld-go-96dtk   helloworld-go-96dtk   True
</code></pre>

<p>Can someone please provide me an easy way to extract only the url in a sh script? I believe the easiest way might be to find the text between the first and second space on the second line.</p>
",https://stackoverflow.com/questions/60123815/parse-string-in-sh-file,"['bash', 'shell', 'sh', 'ksh']",93,True,-1,1
Where to write the setup and teardown code for Locust tests?,"<p>I've exploring locust for our load testing requirements for Spark but stuck on some very basic tasks; documentation also seems very limited.</p>
<p>Stuck on how/where to write my setup &amp; tear-down code that needs to run only once regardless of the number of users. Tried with below sample given in docs; but the code written under events.test_start doesn't run it seems as I'm unable to use attribute 'sc' anywhere under SparkJob class. Any idea how to access the spark instances created under on_test_start method in my SparkJob class?</p>
<pre><code>from locust import User, TaskSet, task, between
from locust import events
from pyspark import SparkConf, SparkContext
from pyspark.sql import SparkSession

class SparkJob(TaskSet):

    @task
    def submit_jobs(self):
    # sample spark job

class SparkUser(User):

    host = xxx
    wait_time = xxx
    tasks = [SparkJob]


@events.test_start.add_listener
def on_test_start(**kw):
    conf = SparkConf().setAppName(conn_st['app'])
    sc = SparkContext(master=conn_st['master'], conf=conf)
    #spark = SparkSession(sc)
    return sc

@events.test_stop.add_listener
def on_test_stop(**kw):
    #spark.stop()
    sc.stop()
</code></pre>
",https://stackoverflow.com/questions/65144031/where-to-write-the-setup-and-teardown-code-for-locust-tests,"['python-3.x', 'load', 'locust']",457,True,0,1
Not able to solve throttlingException in DynamoDB,"<p>I have a lambda function which does a transaction in DynamoDB similar to this. </p>

<pre><code>try {
        const reservationId = genId();
        await transactionFn();
        return {
            statusCode: 200,
            body: JSON.stringify({id: reservationId})
        };

        async function transactionFn() {
            try {
                await docClient.transactWrite({
                    TransactItems: [
                        {
                            Put: {
                                TableName: ReservationTable,
                                Item: {
                                    reservationId,
                                    userId,
                                    retryCount: Number(retryCount),
                                }
                            }
                        },
                        {
                            Update: {
                                TableName: EventDetailsTable,
                                Key: {eventId},
                                ConditionExpression: 'available &gt;= :minValue',
                                UpdateExpression: `set available = available - :val, attendees= attendees + :val, lastUpdatedDate = :updatedAt`,
                                ExpressionAttributeValues: {
                                    "":val"": 1,
                                    "":updatedAt"": currentTime,
                                    "":minValue"": 1
                                }
                            }
                        }
                    ]

                }).promise();
                return true
            } catch (e) {
                const transactionConflictError = e.message.search(""TransactionConflict"") !== -1;
                // const throttlingException = e.code === 'ThrottlingException';
                console.log(""transactionFn:transactionConflictError:"", transactionConflictError);
                if (transactionConflictError) {
                    retryCount += 1;
                    await transactionFn();
                    return;
                }
                // if(throttlingException){
                //
                // }
                console.log(""transactionFn:e.code:"", JSON.stringify(e));
                throw e
            }
        }
</code></pre>

<p>It just updating 2 tables on api call. If it encounter a transaction conflict error, it simply retry the transaction by recursively calling the function. </p>

<p>The <strong>eventDetails</strong> table is getting too much db updates. ( checked it with aws Contributor Insights) so, made provisioned unit to a higher value than earlier. </p>

<p><a href=""https://i.stack.imgur.com/REGje.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/REGje.png"" alt=""enter image description here""></a></p>

<p>For <strong>reservationTable</strong> Provisioned capacity is on Demand.</p>

<p>When I do load test over this api with 400 (or more)  users using JMeter (master slave configuration) I am getting Throttled error for some api calls and some api took more than 20 sec to respond. 
When I checked X-Ray for this api found that, DynamoDB is taking too much time for this transasction for the slower api calls. </p>

<p><a href=""https://i.stack.imgur.com/yBZET.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/yBZET.png"" alt=""enter image description here""></a></p>

<p><a href=""https://i.stack.imgur.com/YHbdK.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/YHbdK.png"" alt=""enter image description here""></a></p>

<p>Even with much fixed provisioning ( I tried on demand scaling too ) , I am getting throttled exception for api calls. </p>

<pre><code>ProvisionedThroughputExceededException: The level of configured provisioned throughput for the table was exceeded.
Consider increasing your provisioning level with the UpdateTable API.
</code></pre>

<p><strong>UPDATE</strong> </p>

<p>And one more thing. When I do the load testing, I am always uses the same eventId. It means, I am always updating the same row for all the api requests. I have found <a href=""https://www.bluematador.com/docs/troubleshooting/aws-dynamo-throttling"" rel=""nofollow noreferrer"">this</a> article, which says that, a single partition can only have upto 1000 WCU. Since I am always updating the same row in the eventDetails table during load testing, is that causing this issue ?</p>
",https://stackoverflow.com/questions/59929823/not-able-to-solve-throttlingexception-in-dynamodb,"['amazon-web-services', 'aws-lambda', 'amazon-dynamodb', 'serverless', 'aws-xray']",946,False,0,2
k6 Load Testing - How extract value from HTML response,"<p>I am using the <em>k6 Load Testing Tool</em> for the first time.</p>
<p>I send a GET request and html is sent in the response. I then need to extract some values from this html.</p>
<p>What is the best way of doing this in HTML? I have seen in the documentation that there are the following 3 commands that could possibly be of help:</p>
<pre><code>Response.body
Selection.find(selector)
Response.json([selector])
</code></pre>
<p>The HTML is shown below. I want to extract the values of csrf and transId</p>
<pre><code>&lt;html lang=&quot;en&quot;&gt;

&lt;head&gt;
    &lt;link rel=&quot;icon&quot; href=&quot;data:;base64,iVBORw0KGgo=&quot;&gt;
    &lt;script data-container=&quot;true&quot; nonce=&quot;ekqlmSlKlpMlCSDxgP6erg==&quot;&gt;
        
        var SETTINGS = {

         &quot;csrf&quot;: &quot;I NEED THIS VALUE&quot;,
         &quot;transId&quot;: &quot;I ALSO NEED THIS VALUE&quot;,
        };

    &lt;/script&gt;
    
&lt;/head&gt;

&lt;body&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>
<p>I think I could do it using Response.body and then searching for a substring. Is this the best way of doing it?</p>
",https://stackoverflow.com/questions/63098923/k6-load-testing-how-extract-value-from-html-response,"['javascript', 'load-testing', 'k6']",3155,True,4,2
Autoscale rule for max connection and response time out in azure app service,"<p>When we do a load testing for a Rest API which is developed using dotnetcore with 10000 users and 100 ramp up finally ended up with 502 bad gateway error. </p>

<p>There are many outbound api calls are happening inside our application which uses singletone httpclient instance.</p>

<p>The connections crosses more than 1920 limit and also the response time crosses 2 min default time. Here is appservice metrics.
<img src=""https://i.stack.imgur.com/rsB4F.png"" alt=""1""></p>

<p>We wanted to set autoscale rule in appservice to balance the load and avoid 502 bad gateway error. But I don't find any options related to connections and response time. </p>
",https://stackoverflow.com/questions/61772271/autoscale-rule-for-max-connection-and-response-time-out-in-azure-app-service,"['azure', 'connection', 'response', 'scale', 'auto']",506,True,3,1
Load test kubernetes cluster with Jmeter and Prometheus,"<p>I have a kubernetes cluster and I want to do load testing on it using Jmeter and Prometheus. I have setup Jmeter on separate EC2 instance and I am getting response from cluster when I run jmx script. Prometheus is running inside cluster and I want to push Jmeter metrics to Prometheus but I am not able to do this. My question is, if Jmeter is running outside kubernetes cluster and Prometheus is running inside kubernetes cluster, can Prometheus scrape Jmeter to collect metrics or I need to run Jmeter within kubernetes cluster to do this.</p>
",https://stackoverflow.com/questions/63184599/load-test-kubernetes-cluster-with-jmeter-and-prometheus,"['kubernetes', 'jmeter', 'prometheus', 'load-testing', 'jmeter-plugins']",606,False,1,0
How can i generate a coulmn value as a random value in a csv file while doing load test with Jmeter,"<p>I am using Jmeter for load testing. I am passing parameters of the body from a csv file for an api. But our application will not receive the duplicate value. So when i load test by multiple users, the request get failed.because i am passing same parameter value for all users.So i need to make some of the columns with an instant value(random). so that different users will get different values.</p>
<pre><code>{
&quot;clinic_name&quot;:&quot;clicnic&quot;,
&quot;first_name&quot;:&quot;provider1&quot;,
&quot;initial&quot;:&quot;v&quot;,
&quot;last_name&quot;:&quot;doc&quot;,
&quot;salutation&quot;:&quot;salu&quot;,
&quot;address_1&quot;:&quot;testttadd1&quot;,
&quot;address_2&quot;:&quot;testtttadd2&quot;,
&quot;city&quot;:&quot;ckdy&quot;,
&quot;state&quot;:&quot;Arizona&quot;,
&quot;zip&quot;:&quot;12365&quot;,
&quot;fax&quot;:&quot;&quot;,
&quot;email&quot;:[{&quot;email_id&quot;:&quot;dfdf@dzcz.in&quot;,&quot;type&quot;:&quot;Work&quot;,&quot;note&quot;:null}],
&quot;phone&quot;:[{&quot;number&quot;:&quot;1235974444&quot;,&quot;note&quot;:&quot;&quot;,&quot;type&quot;:&quot;Mobile&quot;,&quot;extension&quot;:&quot;&quot;}]
}
</code></pre>
<p>here i have given the request body and i need different email for different users. How can i do this?Can anyone help me..Thanks in advance.</p>
",https://stackoverflow.com/questions/63528058/how-can-i-generate-a-coulmn-value-as-a-random-value-in-a-csv-file-while-doing-lo,['jmeter'],33,False,1,2
What happens to incoming server requests during garbage collection?,"<p>I'm doing load testing with my Web service (let's just say I'm using Spring MVC with Tomcat). What I'm noticing is that my error rate (# of requests that return 200 status code/total # of requests) highly correlates with when GC happens. Therefore,</p>
<ol>
<li>I wonder if all incoming requests get lost when GC happens because all other threads that are in motion got paused. True?</li>
<li>My second guess is that the reason GC happens is because I'm running out memory, which is why those requests return with a non-200 code.</li>
<li>What would be the best approach to address this problem?</li>
</ol>
",https://stackoverflow.com/questions/63498853/what-happens-to-incoming-server-requests-during-garbage-collection,"['java', 'garbage-collection', 'jvm']",94,False,0,0
Load testing azure app service yields terrible results for simple requests (asp.net Core WebAPI),"<p>The application is a asp.net Core WebAPI. We are using jmeter with taurus to run the tests on an agent in azure devops. When load testing the API we see spikes in response time even if the endpoint returns OK immediately on the first line of code.</p>
<p>The spikes start happening at ~20 hits per second.</p>
<p>What we have tried:</p>
<ul>
<li>Scaling up the app service (higher tier plan) and adding multiple instances.</li>
<li>Configuring the thread pool according to <a href=""https://learn.microsoft.com/en-us/troubleshoot/aspnet/performance-call-web-service"" rel=""nofollow noreferrer"">recommendations</a>.</li>
</ul>
<p>Test result:
<a href=""https://i.stack.imgur.com/zovdY.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/zovdY.png"" alt=""enter image description here"" /></a>
When we reach ~20 hit/s the response time jumps from 50ms to almost 20 seconds.</p>
",https://stackoverflow.com/questions/64427888/load-testing-azure-app-service-yields-terrible-results-for-simple-requests-asp,"['asp.net-core', 'jmeter', 'azure-web-app-service', 'load-testing', 'taurus']",328,True,0,1
AWS Aurora timeouts due to 100% cpu utilization,"<p>I am trying to do load testing on AWS aurora, i am hitting 20k request in 2mins.
When database endpoints are pointing to mysql server(non-aws) everything is running smooth, but when I change database endpoint to point to AWS aurora , connections are timing out after about 20-30secs and in dashes I can see 100% cpu utilization during the run.</p>

<p>AWS support people are saying to optimize your query and use select on specific fields rather than select *.
But my question is, If in mysql server everything is running good. Then Why aurora cant perform similar way?</p>
",https://stackoverflow.com/questions/62014693/aws-aurora-timeouts-due-to-100-cpu-utilization,"['amazon-web-services', 'amazon-aurora']",1960,True,0,1
Jmeter : IIS server stops responding,"<p>I am learning jmeter to check perform of the web application.  This web application is hosted on IIS server and built in php. For testing we use windows 10 PC with 4GB RAM.</p>

<p>I am checking load testing with jmeter where I am sending 10 login request to IIS server with ramp-up periods 3 sec , IIS server stops responding and I have to restart IIS service. If I set ramp-up period 4 SEC then it is working fine. </p>

<p>I m expecting IIS should handle 10 request in 2 sec. For this what configuration should I change in IIS ?</p>
",https://stackoverflow.com/questions/59981787/jmeter-iis-server-stops-responding,"['iis', 'jmeter']",242,True,0,1
How can we use existing selenium scripts (java) to get some end to end performance metrics (low load),"<p>I am trying to leverage existing selenium automation scripts in java developed by Automation team to get some end to end performance metrics (total page load time etc) - very minimal load, in parallel to api load testing.</p>

<p>Please let me know what will be the most efficient way to do that. Also i am looking for making minimum changes to the selenium scripts because this will be an ongoing activity with each release and i am looking for to use functional scripts as it is with performance wrapper around it.</p>

<p>Your suggestions will be appreciated.</p>

<p>thank you!</p>
",https://stackoverflow.com/questions/60083042/how-can-we-use-existing-selenium-scripts-java-to-get-some-end-to-end-performan,"['performance', 'selenium', 'testing', 'client', 'client-side']",92,False,-1,1
Selenium Webdriver + Jmeter + StormRunner for Performance test,"<p>I wanted to try out integration of Selenium Jmeter and StormRunner. My end goal is to do Load testing with 'n' number of users on StormRunner
What ? - For e.g. I have Selenium Script, convert it in to Jmeter (I can get this information from many sources)
Then my Jmeter script should get ready
Then upload Jmeter script in to StormRunner and pass the necessary parameter through Jenkins and run the load test.</p>
<p>I really want the opinion here about feasibility and whether it is in right direction or not.
Idea here is that Automated Load/Performance test</p>
",https://stackoverflow.com/questions/62851293/selenium-webdriver-jmeter-stormrunner-for-performance-test,"['selenium-webdriver', 'jmeter', 'performance-testing', 'loadrunner', 'stormrunner-load']",250,True,0,2
Enable custom kubernetes scheduler for a namespace,"<p>I have a k8 job that brings up multiple pods. This job is used for load testing so all the pods need to come up at the same time. Job shouldn't be started until nodes are available for all pods to be scheduled.
I came across kube-batch <a href=""https://github.com/kubernetes-sigs/kube-batch"" rel=""nofollow noreferrer"">https://github.com/kubernetes-sigs/kube-batch</a> to do this scheduling. I have couple of questions:</p>
<p><strong>1.</strong> How to enable kube-batch for only one namespace in a cluster?</p>
<p><strong>2.</strong> Installed kube-batch by following the tutorial. But pods are failing on startup with below error. How to resolve this error?</p>
<pre><code>I1204 20:07:55.911393       1 allocate.go:96] Queue &lt;default&gt; is overused, ignore it.

I1204 20:07:55.911399       1 allocate.go:194] Leaving Allocate ...

I1204 20:07:55.911407       1 backfill.go:41] Enter Backfill ...

I1204 20:07:55.911413       1 backfill.go:71] Leaving Backfill ...

E1204 20:07:55.911521       1 runtime.go:69] Observed a panic: &quot;invalid memory address or nil pointer dereference&quot; (runtime error: invalid memory address or nil pointer dereference)

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:76

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51

/usr/local/go/src/runtime/asm_amd64.s:522

/usr/local/go/src/runtime/panic.go:513

/usr/local/go/src/runtime/panic.go:82

/usr/local/go/src/runtime/signal_unix.go:390

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/pkg/scheduler/framework/session.go:368

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/pkg/scheduler/plugins/gang/gang.go:154

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/pkg/scheduler/framework/framework.go:58

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/pkg/scheduler/scheduler.go:102

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/pkg/scheduler/scheduler.go:85

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134

/home/root1/servicecomb/go/src/github.com/kubernetes-sigs/kube-batch/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88

/usr/local/go/src/runtime/asm_amd64.s:1333

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x148 pc=0x10ab979]
</code></pre>
",https://stackoverflow.com/questions/65150516/enable-custom-kubernetes-scheduler-for-a-namespace,"['kubernetes', 'kubernetes-jobs', 'kube-scheduler']",192,False,0,1
LocustIO: How to do batch request,"<p>I started to use LocustIO for load testing a 3rd party API which provides a way to do batch requests (<a href=""http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_BatchRequests"" rel=""nofollow noreferrer"">http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_BatchRequests</a>).</p>

<p>How can this be done using LocustIO?</p>

<p>I tried with the following:</p>

<pre><code>def batch(self):
  response = self.client.request(method=""POST"", url=""/$batch"", auth=(""ABC"", ""DEF""), headers={""ContentType"": ""multipart/mixed; boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b""}, data=""Content-Type: application/http\nContent-Transfer-Encoding: binary\n\nGET putyoururlhere HTTP/1.1\nAccept: application/json\n\n\n"")
</code></pre>

<p>Auth is something I need to have authentication to the API, but that's not the point of the question and ""putyoururlhere"" should be replaced with the actual url. Either way, it gives errors when executing the test, so I must be doing something wrong.</p>

<p>People with experience how to do this?</p>

<p>Kind regards!</p>
",https://stackoverflow.com/questions/62322962/locustio-how-to-do-batch-request,"['python-requests', 'locust']",329,False,0,1
How can I use pythons request module with locust to load test bunch of apis,"<p>I have an existing api testing framework which uses <a href=""https://pypi.org/project/requests/"" rel=""nofollow noreferrer"">requests</a> module of python3. I decided to use <a href=""https://docs.locust.io/en/stable/"" rel=""nofollow noreferrer"">locust</a> module to load test my apis using the same framework. From what I understand <a href=""https://docs.locust.io/en/stable/"" rel=""nofollow noreferrer"">locust</a> uses its own client to make api calls.</p>
<p>Is there a way where I can use pythons requests module with locust? So that I don't have to write same code again for locust ( using its own client )</p>
<p>Please see that using requests module with locust does make the api calls but does not capture the response times  ( main thing when doing a load testing ) in both gui and non gui mode.</p>
",https://stackoverflow.com/questions/62511494/how-can-i-use-pythons-request-module-with-locust-to-load-test-bunch-of-apis,"['python-3.x', 'locust']",1066,True,3,2
Django channels &quot;ERROR Y of N channels over capacity in group subscriptions&quot;,"<p>I'm doing load testing with my Django app providing GraphQL Subscriptions using Django channels and a redis Channels layer (<code>django</code>, <code>graphene-django</code>, <code>channels</code>, <code>graphene-subscriptions</code>, <code>channels-redis</code>). As ASGI server I'm using <code>daphne</code> right now. I use <code>nginx</code> as proxy. The periodicity with which the backend publishes messages via GraphQL Subscriptions depends on the periodicity of messages the backend receives via MQTT. I'm increasing the periodicity with which an external data provider publishes messages to the MQTT broker, means the periodicity with which the backend has to process these messages and publish messages via GraphQL Subscriptions. I'm facing the following error:</p>

<pre><code>2020-03-11 08:33:58,464 ERROR    2 of 12 channels over capacity in group subscriptions
</code></pre>

<p>It seems like this issue is caused by <a href=""https://github.com/django/channels_redis/issues/181"" rel=""nofollow noreferrer"">channels_redis</a>. Can I scale the infrastructure to workaround this issue?</p>
",https://stackoverflow.com/questions/60632227/django-channels-error-y-of-n-channels-over-capacity-in-group-subscriptions,"['django', 'nginx', 'django-channels', 'daphne']",3502,True,3,1
Keycloak load testing using jmeter,"<p>I have deployed keycloak as a standalone server and wanted to load test on it. I have very less knowledge about how to load test using jmeter. Gone through <a href=""https://www.blazemeter.com/blog/openid-connect-how-to-load-test-with-jmeter"" rel=""nofollow noreferrer"">this resource</a> but it is hard for me to understand it.</p>
<p>Can anybody explain on how can i actually do it ?</p>
<p>EDIT: I made a simple api that will authenticate using keycloak. So what i did is deploy the api in another server and used jmeter to get the auth token from keycloak and use that token to authenticate to the api. I did as much threads as possible as a way of load testing.</p>
",https://stackoverflow.com/questions/63943907/keycloak-load-testing-using-jmeter,"['jmeter', 'keycloak']",404,False,2,0
Can anybody confirm that ExpressJS is slower than Spring Boot?,"<p>we are currently investigating whether ExpressJS (Nodejs) or SpringBoot (Java) is better suited for backend operation. We wrote some ""equivalent"" code with Rest interfaces, some accessing databases (eg MongoDB) and making some transforms. Both applications run on the same server instance.</p>

<p>When it comes to load testing, we observe that avg response time is longer for ExpressJS even in small-load operation and becomes even worse when scaling up to 40 parallel requests.... </p>

<p>Can you guys confirm that observation - do we have to say in general that expressjs/nodejs web application backends are not as fast as using springboot/java? Or is that a result of missing multithreading in expressjs?</p>

<p>Thanks!</p>
",https://stackoverflow.com/questions/59826877/can-anybody-confirm-that-expressjs-is-slower-than-spring-boot,"['java', 'performance', 'spring-boot', 'express']",2278,False,1,1
"Azure Function : When Function AutoScale, function called multiple times","<p>In Azure Queue add single entry for queueitem but function called multiple times for same queueitem, not able to understand what is wrong, We have used Async/Await in function and code is also Async, below is Azure function settings,
<a href=""https://i.stack.imgur.com/zYdHW.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/zYdHW.png"" alt=""enter image description here"" /></a>
<a href=""https://i.stack.imgur.com/KfVY3.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/KfVY3.png"" alt=""enter image description here"" /></a></p>
<p>below is function code,</p>
<pre><code>public class CreateTempVMTempTablesFunction
{
    private static Container container;
    private static IProcessingFunctionService _processingFunctionService; 
    private static IAzureFunctionFailuresRepository _azureFunctionFailuresRepository;
    private static ITrackLogEventsService _trackLogEventsService;

    [FunctionName(&quot;CreateTempVMTempTablesFunction&quot;)]
    public static async Task Run([QueueTrigger(&quot;%environment-plan%&quot; + AzureFunctionConstants.CreateTempTableQueue, Connection = &quot;AzureWebJobsStorage&quot;)]string myQueueItem, ILogger log)
    {
        string ErrorMessage = string.Empty;
        var start = DateTime.Now;
        FunctionStatusEnum IsSuccess = FunctionStatusEnum.Success;
        log.LogInformation($&quot;C# Queue trigger function processed: {myQueueItem} - {start}&quot;);

        Guid tempid = new Guid(myQueueItem);
        TempVM tempVM = new TempVM();
        try
        {
            container = BusinessLogic.Helpers.SimpleInjectorWebApiInitializer.InitializeSingleton();;
           
            _processingFunctionService = container.GetInstance&lt;IProcessingFunctionService&gt;();
            _azureFunctionFailuresRepository = container.GetInstance&lt;IAzureFunctionFailuresRepository&gt;();
            _trackLogEventsService = container.GetInstance&lt;ITrackLogEventsService&gt;();

            tempVM = await _processingFunctionService.GetById(tempid);
            if (tempVM != null)
            {
                FunctionStatusEnum IsAlreadyPerformed = await _azureFunctionFailuresRepository.GetAzureFunctionFailureStatus(AzureFunctionConstants.CreateTempVMTempTablesFunction, tempVM.Id);

                if (IsAlreadyPerformed != FunctionStatusEnum.Success)
                {
                        ResponseData response = await _processingFunctionService.CreateTempVMTempTables(tempid);
                }
                else
                {
                    ErrorMessage = AzureFunctionConstants.FunctionAlreadyProcessed;
                }
            }
            else
            {
                ErrorMessage = AzureFunctionConstants.TempVMNotFound;
            }
        }
        catch (Exception ex)
        {
            IsSuccess = FunctionStatusEnum.Failed;
            ErrorMessage = ex.ToString();
        }
        finally
        {
            AzureFunctionFailures azureFunctionFailures = new AzureFunctionFailures()
            {
                Id = Guid.NewGuid(),
                FunctionName = AzureFunctionConstants.CreateTempVMTempTablesFunction,
                QueueItem = myQueueItem,
                ErrorMessage = ErrorMessage,
                StartTime = start,
                EndTime = DateTime.Now,
                FailureTypeId = tempid,
                FunctionStatus = IsSuccess,
                ProcessTime = (DateTime.Now - start).TotalMilliseconds,
            };
            await _azureFunctionFailuresRepository.Add(azureFunctionFailures);
        }
        log.LogInformation($&quot;End Time : {DateTime.Now} - QueueItem {myQueueItem}&quot;);
        log.LogInformation($&quot;Total Time : {DateTime.Now - start} - QueueItem {myQueueItem}&quot;);
    }
}
</code></pre>
<p>I have check the code where added entry in queue, but only one entry is added for one queueitem.
This issue happened when added multiple entry in same queue (i.e. load testing where I have added 24 request only) for different queue item, when single queue is run then this is not happened, our functions are in App Service Plan with autoscaling</p>
",https://stackoverflow.com/questions/64248007/azure-function-when-function-autoscale-function-called-multiple-times,"['azure', '.net-core', 'async-await', 'azure-functions']",288,True,1,1
write all users input data on csv file in jmeter beanshell PostProcessor with non repeated users?,"<p>When i use CSV Data Set for the input data during load testing with thread group as 10 users for creating account scenario, I want to save all users data who has created there accounts again on a different CSV file.
but, the each thread group always overwrite the file and i end up with a file that contains the same data repeated 10 times line by line.</p>
<p>this is my code in BeanShell PostProcessor script:</p>
<pre><code>import java.io.*;
import java.util.Arrays;
import java.io.Writer;
import java.util.List;
File f=new File(&quot;C:\\apache-jmeter-5.3\\apache-jmeter-5.3\\bin\\CSVfiles\\test1.csv&quot;);
FileWriter fw=new FileWriter(f);
BufferedWriter bw=new BufferedWriter(fw);


int threadnum=ctx.getThreadNum();

 for (int i =-1; i &lt; threadnum; i++)
   {
    
String searchAddr = vars.get(&quot;firstname&quot;);

    
String searchAddr2 = vars.get(&quot;lastname&quot;);


bw.write(searchAddr);
bw.write(&quot;,&quot;);
bw.write(searchAddr2);
bw.write(&quot;\n&quot;);

   }
bw.close();
fw.close();

</code></pre>
<p>this is the content of the csv file after the test:</p>
<pre><code>firstname3, lastname3
firstname3, lastname3
firstname3, lastname3
</code></pre>
<p>what i want is :</p>
<pre><code>firstname1, lastname1
firstname2, lastname2
firstname3, lastname3

</code></pre>
<p>can you guys help me with the code so i can get non repeated data?</p>
",https://stackoverflow.com/questions/62849126/write-all-users-input-data-on-csv-file-in-jmeter-beanshell-postprocessor-with-no,"['java', 'load-testing', 'jmeter-5.0']",894,False,1,1
Selenium C# integration With Neoload performance testing tool,"<p>Could anyone help me to elaborate procedure for integrating selenium C# script with neoload tool.i wanted to integrate selenium C# and Appium C# coding with neoload .So I went though some steps in documentation and unable to run the example code and didn't get the point how we can integrated with selenium/appium C# script with neoload for chrome or any browser and perform load testing for web or mobile application with same tool .Could you please have a look on shared screen shot and help me to share valuable document with any simple example for understanding the concept/getting some confidence.Thanks for giving valuable time<a href=""https://i.stack.imgur.com/99L0l.jpg"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/99L0l.jpg"" alt=""enter image description here""></a></p>
",https://stackoverflow.com/questions/59835313/selenium-c-integration-with-neoload-performance-testing-tool,"['c#', 'performance', 'selenium', 'devops', 'neoload']",337,False,1,1
Jmeter: Run HTTP sampler n times using the variable value from SetUp thread group variable,"<p>We are using <code>Jmeter 5.1.1</code> v to perform load testing, Our scenario is get 25 tokens from <code>Setup thread group</code> (Threads set to 25 with rampup 25 secs under <code>SetUp Thread group</code>), then having a normal <code>Thread group</code> which contains <code>HTTP Sampler</code> and in this Sampler need to pass those 25 tokens for each 1 thread hence this Thread Group contains configuration of 25 Threads with 25 Secs.</p>
<p>However when Run the test, 25 tokens been generated but <strong>only the last 25th token used for all threads</strong> (using the 25th token). Trying to get for each Thread should get one token value, if 2nd thread then 2nd token should be used.</p>
<p>Below is the Structure:</p>
<pre><code>TestPlan 
--SetUp Thread Group - 25 Threads, 25 Secs
---HTTP Sampler - Gets the Token here using RegEx and Set the value as Property using Beanshell Assertion
O/P: Got 25 tokens generated, and set in the property value

--Thread Group - 25 Threads, 25 Secs
---HTTP Sampler - Get Token value as property
O/P: Only the 25th token been used for all 25 threads
</code></pre>
<p><strong>EDIT</strong></p>
<p>Tried answer and got error:</p>
<p><a href=""https://i.stack.imgur.com/NMHIh.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/NMHIh.png"" alt=""enter image description here"" /></a></p>
<p><a href=""https://i.stack.imgur.com/EO1wY.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/EO1wY.png"" alt=""Error"" /></a></p>
",https://stackoverflow.com/questions/62637260/jmeter-run-http-sampler-n-times-using-the-variable-value-from-setup-thread-grou,['jmeter'],206,True,1,2
Jmeter: org.apache.jmeter.report.core.SampleException: Could not locate input sample files,"<p>I'm trying to run jmeter load testing scripts using CLI using the following command:</p>

<p><strong>jmeter -n -t {PATH TO JMETER SCRIPT(JMX)} -l {PATH TO JTL FILE} -e -o {PATH OF FOLDER WHERE YOU WISH TO SAVE REPORT DASHBOARD}</strong></p>

<p><strong>Example:</strong></p>

<p><strong>H:\Apache Jmeter 5.0\bin>jmeter -n -t C:\stressTest\Master-Script.jmx -l C:\stressTest\Results\Result-${currentTime}.csv -e -o C:\stressTest\Html\${currentTime}</strong></p>

<p>and the scripts runs and generates the csv file as expected, but while generating the html report (web reports dashboard), I get the following output: </p>

<pre><code>Starting the test @ Tue Mar 03 13:01:30 EST 2020 (1583258490364)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary =      0 in 00:00:00 = ******/s Avg:     0 Min: 9223372036854775807 Max: -9223372036854775808 Err:     0 (0.00%)
Tidying up ...    @ Tue Mar 03 13:01:36 EST 2020 (1583258496832)
Error generating the report: org.apache.jmeter.report.core.SampleException: Could not locate input sample files !
... end of run 
</code></pre>

<p>I'm fairly new and I might be missing something here. Any help is appreciated.</p>

<p>Thanks in advance.</p>
",https://stackoverflow.com/questions/60513499/jmeter-org-apache-jmeter-report-core-sampleexception-could-not-locate-input-sa,"['jmeter', 'load-testing', 'stress-testing', 'jmeter-5.0']",595,False,1,1
How to change way to calculate request time in JMetter?,"<p>So, we use JMetter for load testing our application. 
If I correctly understand, JMetter use trivial logic to calculate time of request executing. 
It get difference between time of request started and request ended.</p>

<p>So, if my processor is very busy this time is increases. 
But the server is placed on other machine.</p>

<p>For test I wrote the program that generate a lot of threads and do some calculations in it. Then I start JMetter tests on empty system and system with. my program running.</p>

<p>Time in aggregate graph is very different. </p>

<p>Is there are some solutions for it?  Or we should rewrite our tests on other tools (like Gatling)?</p>
",https://stackoverflow.com/questions/62467332/how-to-change-way-to-calculate-request-time-in-jmetter,"['jmeter', 'high-load']",48,False,0,1
how to read dynamic values passed from jmeter from a text file in java?,"<p>I'm performing load testing on my APIs using Jmeter. I'm making an Http Request and the response of that Http Request is passed as part of request body to my 2nd Http Request. There, I'm passing the dynamic values from a text file as follows :-
Obj.txt</p>

<pre><code>""Details"": {
    ""Start"": ""2019-08-28T11:39:57.153"",
    ""Expiry"": ""2020-08-28T11:39:57.153"",
    ""Accounts"": [
      {
        ""accType"": ""SAVINGS"",
        ""ReferenceNumber"": ""${RefNumber}"",
        ""AccNumber"": ""${AccNumber}""
      }
    ]
}
</code></pre>

<p>This json object is read in my java program. I'm calculating a signature for that json object as follows :-</p>

<pre><code>  public static String signConsent() throws Exception{

        String objDetail = loadDetailsObject();

        String keysJson = ""Random String"";

        JsonWebKeySet jsonWebKeySet = new JsonWebKeySet(keysJson);

        String signature = sign(objDetail, jsonWebKeySet);

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

<p>How do I read dynamic values from a text file. I'm loading the textfile using <code>loadDetailsObject</code> function as follows :- </p>

<pre><code>public static String loadDetailsObject()  {
        String details = """";
        try {
            consentDetails =  FileUtils.readFileToString(new File(""Obj.txt""), Charset.defaultCharset());
        } catch (IOException e) {
            log.error(""Erorr\n"", e);
        }
        return details;
    }
</code></pre>

<p>The <code>RefNumber</code> and <code>AccNumber</code> will change each time and the signature accordingly will change. How do I read these dynamic values in java from a .txt file?</p>
",https://stackoverflow.com/questions/59782276/how-to-read-dynamic-values-passed-from-jmeter-from-a-text-file-in-java,"['java', 'spring-boot', 'http', 'jmeter']",579,False,0,1
Node Express Handlebars and high CPU usage,"<p>We've developed a Node.js Express app which uses Handlebars as a templating engine. <br/>
The problem is that it uses a lot of CPU and we can't understand why. <br/>
For example, it uses 25% CPU on single thread for a single user request. <br/>
The process is ran on a 8 core/16 thread CPU i9 9900K, and with pm2 with maximum instances (so, 16 instances). 2 GBs of RAM are allocated, out of 64.</p>

<p>We use Redis, but not so intensively on the page which is loaded; we use MariaDB with Sequelize but in the requested page there are no queries, everything is in cache. <br/> We also serve our static files from Nginx (pre-minified and bundled).</p>

<p>The only problem I think it could be, is the continuous JSON parsing from Redis results (we parse each Redis result), but I can't disable it to test, because it's needed to get data for the loading of the page.</p>

<p><strong>Node version:</strong> <code>v12.16.1</code> <br/>
<strong>npm:</strong> <code>v6.14.5</code> (with only few issues in audit, not regarding performance) <br/></p>

<p>We also tried load testing using Loader.io and ab command. <br/>
<strong>Command used for load testing:</strong> <code>$ ab -t 50 -n 1000 -c 1000 [link]</code> in external server <br/>
CPU with this command goes up to 100% in almost all threads. <br/></p>

<p>From profiling I just can't understand what's the matter of the problem, everything seems to be only ""LazyCompiling"".
I tried everything, and Node V8 profiling isn't helping.</p>

<p>Can someone help us read this V8 profile log and maybe help finding the bottleneck? <br/>
Or does someone have alternative profiling techniques?</p>

<p><strong>V8 logs</strong> (tested in single thread, but in 16 threads it's the same):
<a href=""https://pastebin.com/9NhyUDZB"" rel=""nofollow noreferrer"">https://pastebin.com/9NhyUDZB</a></p>
",https://stackoverflow.com/questions/61963922/node-express-handlebars-and-high-cpu-usage,"['node.js', 'express', 'cpu-usage', 'v8', 'express-handlebars']",738,False,1,0
Mass email inbox creation API,"<p>I am reaching out to the community for a help. One of the public facing website we are developing,  will take an anticipated load of 2 million emails per peak hour. In order to perform load testing, I was looking to utilize API calls to create email inboxes.</p>
<p>I have came across some email providers like MailSlurp or Mailinator where we can use email inboxes but do you know if there are any additional providers where we can create that volume of email inboxes? Our company has security concerns on both MailSlurp and Mailinator. Preferably free of cost but with cost will also work.</p>
",https://stackoverflow.com/questions/63420598/mass-email-inbox-creation-api,"['email', 'nodemailer', 'mass-emails']",116,False,0,0
AKS API Load testing error: Premature end of Content-Length delimited message body,"<p>While load testing, after some successful responses from the API, JMeter records errors:
'Premature end of Content-Length delimited message body'.</p>

<p>From logs inside the code the response seems to complete normally.</p>

<p>The APP is deployed on AKS with ingress nginx/1.15.10 controllers. The APP consists of 4 separate APIs (one master calling the 3 others). The APIs are created in FLASK with CONNEXION and run in a WSGIContainer on a Tornado HTTPServer.</p>

<p>Another confusing factor is that the APP is deployed on two AKS instances on the same cluster. The one deployment does not return errors and the other does.</p>

<p>What could be causing the error?</p>
",https://stackoverflow.com/questions/61172941/aks-api-load-testing-error-premature-end-of-content-length-delimited-message-bo,"['api', 'flask', 'kubernetes', 'tornado', 'azure-aks']",237,False,0,1
Sylius order update concurrency issue,"<p>when under high load (doing load testing to test the checkout process) it seems our Custom Order Controller is throwing an exception when payment is being made. This happens on around 1 in 9 orders:</p>

<pre><code>RaceConditionException: ""Operated entity was previously modified.""
</code></pre>

<p>We have overridden the sylius_shop_checkout_complete route as follows</p>

<pre><code>sylius_shop_checkout_complete:
path: /complete
methods: [GET, PUT]
defaults:
    _controller: sylius.controller.order:completeSectionAction
    _sylius:
        event: complete
        flash: false
        template: ""@SyliusShop/Checkout/complete.html.twig""
        repository:
            method: findCartForSummary
            arguments:
                - ""expr:service('sylius.context.cart').getCart().getId()""
        state_machine:
            graph: sylius_order_checkout
            transition: complete
        redirect:
            route: sylius_shop_order_pay
            parameters:
                tokenValue: resource.tokenValue
        form:
            type: Sylius\Bundle\CoreBundle\Form\Type\Checkout\CompleteType
            options:
                validation_groups: 'sylius_checkout_complete'
</code></pre>

<p>and also our own check payment status route which the PaymentGateway redirects to after payment, as follows:</p>

<pre><code>sylius_shop_checkout_status:
path: /check-status
methods: [GET, PUT]
defaults:
    _controller: sylius.controller.order:checkStatusAction
    _sylius:
        event: complete
        flash: false
        template: ""@SyliusShop/Checkout/complete.html.twig""
        repository:
            method: findCartForSummary
            arguments:
                - ""expr:service('sylius.context.cart').getCart().getId()""
        state_machine:
            graph: sylius_order_checkout
            transition: complete
        redirect:
            route: sylius_shop_order_pay
            parameters:
                tokenValue: resource.tokenValue
        form:
            type: Sylius\Bundle\CoreBundle\Form\Type\Checkout\CompleteType
            options:
                validation_groups: 'sylius_checkout_complete'
</code></pre>

<p>At the checkStatusAction function we get the following exception</p>

<pre><code>request.CRITICAL: Uncaught PHP Exception Sylius\Component\Resource\Exception\RaceConditionException: ""Operated entity was previously modified."" at /srv/sylius/vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php line 46 {""exception"":""[object] (Sylius\\Component\\Resource\\Exception\\RaceConditionException(code: 0): Operated entity was previously modified. at /srv/sylius/vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php:46, Doctrine\\ORM\\OptimisticLockException(code: 0): The optimistic lock on an entity failed. at /srv/sylius/vendor/doctrine/orm/lib/Doctrine/ORM/OptimisticLockException.php:64)""} []
</code></pre>

<p>Here is our checkStatus function:</p>

<pre><code>public function checkStatusAction(Request $request, LoggerInterface $logger): Response
{
    $configuration = $this-&gt;requestConfigurationFactory-&gt;create($this-&gt;metadata, $request);

    $this-&gt;isGrantedOr403($configuration, ResourceActions::UPDATE);
    $resource = $this-&gt;findOr404($configuration);

    $form = $this-&gt;resourceFormFactory-&gt;create($configuration, $resource);

    $payment = $resource-&gt;getLastPayment();
    $paymentMethod = $payment-&gt;getMethod();
    $paymentConfig = $paymentMethod-&gt;getGatewayConfig()-&gt;getConfig();
    $paymentFactoryName = $paymentMethod-&gt;getGatewayConfig()-&gt;getFactoryName();

    $response = $this-&gt;checkPaymentStatus($request-&gt;get('resourcePath'), $resource, $paymentConfig);
    $decodedResponse = json_decode($response, true);

    if(substr($decodedResponse['result']['code'], 0, 4 ) === '000.') {

        // If need to run scheduler
        $tcResponse = null;
        if ($paymentFactoryName === 'tp_payment_subscription' || $paymentFactoryName === 'tp_bank_transfer') {

            $amount = $paymentFactoryName === 'tp_bank_transfer' ?  0.00 : number_format($resource-&gt;getTotal() / 100, 2, '.', '');
            $tcResponse = $this-&gt;createSubscription($resource, $response, $amount, $paymentConfig);
        }

        // Store payment details
        $paymentDetails = [
            'PayOn' =&gt; $response,
            'TotalControl' =&gt; $tcResponse
        ];
        $payment-&gt;setDetails($paymentDetails);
        $payment-&gt;setState(Payment::STATE_COMPLETED);

        try {
            $this-&gt;resourceUpdateHandler-&gt;handle($resource, $configuration, $this-&gt;manager);
        } catch (UpdateHandlingException $exception) {

            if (!$configuration-&gt;isHtmlRequest()) {
                return $this-&gt;viewHandler-&gt;handle(
                    $configuration,
                    View::create($form, $exception-&gt;getApiResponseCode())
                );
            }

            $this-&gt;flashHelper-&gt;addErrorFlash($configuration, $exception-&gt;getFlash());

            return $this-&gt;redirectHandler-&gt;redirectToReferer($configuration);
        }

        // if ($configuration-&gt;isHtmlRequest()) {
        //     $this-&gt;flashHelper-&gt;addSuccessFlash($configuration, ResourceActions::UPDATE, $resource);
        // }

        $postEvent = $this-&gt;eventDispatcher-&gt;dispatchPostEvent(ResourceActions::UPDATE, $configuration, $resource);

        return $this-&gt;redirectHandler-&gt;redirectToResource($configuration, $resource);
    }

    $this-&gt;flashHelper-&gt;addErrorFlash($configuration, 'something_went_wrong_error');

    $flashes = $request-&gt;getSession()-&gt;getBag('flashes');
    $flashes-&gt;add('error', [
        'message' =&gt; 'sylius.totalp.payment_failure',
        'parameters' =&gt; ['hello' =&gt; 'hi']
    ]);

    return $this-&gt;redirectHandler-&gt;redirectToReferer($configuration, $resource);
}
</code></pre>

<p>The error is specifically happening at the following line:</p>

<pre><code>$this-&gt;resourceUpdateHandler-&gt;handle($resource, $configuration, $this-&gt;manager);
</code></pre>

<p>This issue only happens when the website has many orders happening at the same time, does anyone know how to fix this issue? </p>
",https://stackoverflow.com/questions/62116027/sylius-order-update-concurrency-issue,"['symfony', 'sylius']",617,True,0,1
Kubernetes : Cluster-Autoscaler: How to verify autoscaling is working,"<p>I am working on our EKS platform, where I have installed Cluster Autoscaler. I can see it running in Kube Dashboard. Yesterday for Load Testing, I triggered 20 replicas of a heavy app we have. The cpu usage per node climbed to 100%, but cluster auto-scaler didn't trigger any additional nodes. I was watching the logs and the logs kept on rotating in main loop, but no changes.</p>

<p>Here are the tags I have added to ASG, worker nodes : </p>

<pre><code> k8s.io/cluster-autoscaler/enabled : true
  kubernetes.io/cluster/CLUSTER_NAME : owned
</code></pre>

<p>I can see the pod running in Dashboard : </p>

<pre><code>./cluster-autoscaler
--v=4
--stderrthreshold=info
--cloud-provider=aws
--skip-nodes-with-local-storage=false
--expander=least-waste
--node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/cluster_name
</code></pre>

<p>Also, There are no scaling policies added in ASG. Are they required for Cluster Autoscaler? How to verify cluster autoscaler is working properly? What am I missing?</p>
",https://stackoverflow.com/questions/62146263/kubernetes-cluster-autoscaler-how-to-verify-autoscaling-is-working,"['kubernetes', 'scaling', 'amazon-eks']",3185,True,4,2
Kubernetes Replicas | Not distributing resource load equally,"<p>I have a Python Application in Pod <code>Foo</code>. This has 5 replicas foo_1, foo_2, foo_3, foo_4, foo_5.</p>
<p>Each Replica has been assigned resources (in Kubernetes)</p>
<pre><code>resources:
  limits:
    cpu: 1500m
    memory: 1600Mi
  requests:
    cpu: 500m
    memory: 1200Mi
</code></pre>
<p>After the application is successfully deployed, I am using a Load Testing Library to simulate load, which again works fine BUT the load is not distributed equally.</p>
<pre><code>kubectl top pods
foo-1   1273m         489Mi           
foo-2    279m         373Mi           
foo-3    283m         365Mi           
foo-4    268m         363Mi           
foo-5    280m         374Mi        
</code></pre>
<p>Is there any configuration to make sure CPU load is divided equally amoung all Pods-replicas?</p>
<hr />
<p>How are the requests sent:</p>
<ul>
<li>Step 1. Ingress LoadBalancer (with external IP). Ingress if from <a href=""https://github.com/kubernetes/ingress-nginx/releases/download/ingress-nginx-2.5.0/ingress-nginx-2.5.0.tgz"" rel=""nofollow noreferrer"">https://github.com/kubernetes/ingress-nginx/releases/download/ingress-nginx-2.5.0/ingress-nginx-2.5.0.tgz</a></li>
<li>Step 2. NGINX Server (djnago-uwsgi-nginx stack)</li>
<li>Step 3. Djnago Server is hit where the processing is done</li>
</ul>
",https://stackoverflow.com/questions/63687610/kubernetes-replicas-not-distributing-resource-load-equally,['kubernetes'],219,False,1,0
How to auto scale Locust in Kubernetes,"<p>I couldn't find any information on autoscaling for Locust worker pods in kubernetes, and I've tried to deploy a horizontal pod autoscaler for the workers but noticed that the newly spun up pods were not assigned any workload. </p>

<p>I've read these on the autoscaling for Locust but failed to find the actual implementation of it:</p>

<p><a href=""https://github.com/locustio/locust/issues/1066"" rel=""nofollow noreferrer"">https://github.com/locustio/locust/issues/1066</a></p>

<p><a href=""https://github.com/locustio/locust/issues/1143"" rel=""nofollow noreferrer"">https://github.com/locustio/locust/issues/1143</a></p>

<p><a href=""https://github.com/locustio/locust/issues/1168"" rel=""nofollow noreferrer"">https://github.com/locustio/locust/issues/1168</a></p>

<p>Current the only workaround I found is to scale up the number of pods prior to the loadtest based on GCP's documentation which is not the most ideal solution. (<a href=""https://cloud.google.com/solutions/distributed-load-testing-using-gke"" rel=""nofollow noreferrer"">https://cloud.google.com/solutions/distributed-load-testing-using-gke</a>)</p>

<p>Any insight is much appreciated! </p>
",https://stackoverflow.com/questions/61331408/how-to-auto-scale-locust-in-kubernetes,"['kubernetes', 'autoscaling', 'locust']",462,False,1,0
Locust load testing gives me ChunkedEncodingError,"<p>I'm load testing my django gunicorn nginx and postgresql application.
After about 1500 concurrent users I get the following error in my locust failed tab:</p>

<pre><code>1   GET /   ChunkedEncodingError(ProtocolError('Connection broken: IncompleteRead(2773 bytes read, 7467 more expected)', IncompleteRead(2773 bytes read, 7467 more expected)))
</code></pre>

<p><strong>I have checked all my access and error logs (nginx access and error logs, gunicorn log, syslog, postgresql log), But I can't find anything related to the error above.</strong></p>

<p>Is it a Locust error? Is it a timeout error? I can't seem to find what is going wrong. </p>

<p>here is my locust file:</p>

<pre><code>from locust import HttpLocust, TaskSet, task, between
from requests.auth import HTTPBasicAuth


class UserBehavior(TaskSet):

    @task(4)
    def index(self):
        self.client.get("""", auth=(""user"", ""pass""))

    @task(4)
    def program(self):
        self.client.get(""page1/"", auth=(""user"", ""pass""))

    @task(1)
    def artist(self):
        self.client.get(""page1/sub-page/"", auth=(""user"", ""pass""))

    @task(2)
    def tickets(self):
        self.client.get(""page2/"", auth=(""user"", ""pass""))


class WebsiteUser(HttpLocust):
    task_set = UserBehavior
    wait_time = between(7, 30)
</code></pre>

<p>As you can see I am using Basic Auth to get through to the page. I don't know if that actually causes the error after a lot of requests.</p>

<p>What could be causing this error? Thanks in advance!</p>
",https://stackoverflow.com/questions/60005615/locust-load-testing-gives-me-chunkedencodingerror,"['python', 'postgresql', 'nginx', 'gunicorn', 'locust']",225,True,1,1
remove ids generated during the tests,"<p>For load testing in the <code>vu</code> stage I generate a lot of objects with unique ids that I put them in the database. I want to delete them during <code>teardown</code> stage in order not to pollute the database.</p>

<p>When keeping the state like this </p>

<pre><code>let ids = [];
export function setup() {
    ids.push('put in setup id');
}

export default function () {
    ids.push('put in vu id');
}

export function teardown() {
    ids.push('put in teardown id');
    console.log('Resources: ' + ids);
}
</code></pre>

<p>it doesn't work as the array always contains the data I put in <code>teardown</code> stage. </p>

<p>Passing data between stages also doesn't work due to well-know <code>Cannot extend Go slice</code> issue, but even with that, you cannot pass the data from <code>vu</code> stage to <code>teardown</code> as it always gets the data from <code>setup</code> stage.</p>

<p>The only remaining solution is either playing around with <code>console log</code> or just use a plain preset of ids and use them in tests. Is there another way? </p>
",https://stackoverflow.com/questions/60570067/remove-ids-generated-during-the-tests,"['javascript', 'k6']",1169,True,1,2
InputStream causing memory leaks,"<p>I'm using Restlet Framework but my question is more general Java question  on Streams. I have this code that returns a &quot;blob&quot; data / file on GET HTTP request:</p>
<pre><code>@Override
public Representation getBlob() {
   InputStream is = entityRepository.getEntityBlob(appId, namespace, entityType, entityId, blobName);
   Representation representation = new InputRepresentation(is);
   representation.setMediaType(MediaType.APPLICATION_OCTET_STREAM);
   representation.setSize(count);
   return representation;
}
</code></pre>
<p>I am also using k6.io load testing to test this resource, tested this for 1000 active connections for 10 mins and it did not have any issue, but this same machine and resource when tested for more time, hours for example, it then turns it starts eating all the memory of the machine causing it to halt eventually.</p>
<p>There seems to be a &quot;leak&quot; here but I cannot pinpoint as there is really no error at all.</p>
<p><strong>Update:</strong></p>
<p>This is how it looks:</p>
<pre><code>public class BlobHashServerResource extends BaseServerResource implements BlobHashResource {
   @Override
   public Representation getBlob() { 
      //... 
   }
}
</code></pre>
<p>This <code>BlobHashServerResource</code> maps to</p>
<pre><code>public class BackendApplication extends Application {
  @Override
  public Restlet createInboundRoot() {
     router.attach(&quot;blobs/{blobHash}&quot;, BlobHashServerResource.class);
     return router; 
  }
}
</code></pre>
<p><strong>web.xml</strong></p>
<pre><code>  &lt;servlet&gt;
    &lt;servlet-name&gt;RestletServlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;org.restlet.ext.servlet.ServerServlet&lt;/servlet-class&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;org.restlet.application&lt;/param-name&gt;
      &lt;param-value&gt;com.mycompany.BackendApplication &lt;/param-value&gt;
    &lt;/init-param&gt;
  &lt;/servlet&gt;
</code></pre>
",https://stackoverflow.com/questions/64194215/inputstream-causing-memory-leaks,"['java', 'entity', 'inputstream', 'restlet']",194,True,1,1
Way to distinguish dynamodb TransactionCanceledException,"<p>I have an api with transaction which uses DynamoDB as the database. I will be getting two kind of exceptions. One is due to <strong>ConditionalCheckFailed</strong> exception when the condition is not met. The error object looks like this: </p>

<pre><code>{
    ""message"": ""Transaction cancelled, please refer cancellation reasons for specific reasons [None, ConditionalCheckFailed]"",
    ""code"": ""TransactionCanceledException"",
    ""time"": ""2020-01-22T05:46:32.756Z"",
    ""requestId"": ""UG14A08TDB6Q5CADF0NH9JQAB3VV4KQNSO5AEMVJF66Q9ASUAAJG"",
    ""statusCode"": 400,
    ""retryable"": false,
    ""retryDelay"": 32.837614849025734
}
</code></pre>

<p>Another scenario is when I do the load testing on the same api, I will be getting <strong>TransactionConflict</strong> exception. </p>

<pre><code>{
    ""message"": ""Transaction cancelled, please refer cancellation reasons for specific reasons [None, TransactionConflict]"",
    ""code"": ""TransactionCanceledException"",
    ""time"": ""2020-01-22T05:54:40.940Z"",
    ""requestId"": ""87MHRV37F3G3EUUF629AKICARBVV4KQNSO5AEMVJF66Q9ASUAAJG"",
    ""statusCode"": 400,
    ""retryable"": false,
    ""retryDelay"": 31.786748424710908
}
</code></pre>

<p>I want to retry the transaction  on error due to  <strong>TransactionConflict</strong> exception.But I am not sure how to conditionally retry the transaction with this error information. Since the message part is the only key which tells me the exact reason of the error and not the error code itself. </p>

<p>I don't think comparing the message is a good way to conditionally handle error. </p>
",https://stackoverflow.com/questions/59853610/way-to-distinguish-dynamodb-transactioncanceledexception,"['node.js', 'error-handling', 'amazon-dynamodb']",7356,True,5,2
java.net.URISyntaxException: Illegal character in query at index on JMETER,"<p>I have an application for which I have recorded Jmeter scripts to conduct load testing. Authorization happens via Azure AD.</p>
<p>I have co-related the auth-related such as access tokens, refresh tokens and id tokens that are generated dynamically and also parameterized them in a request that is responsible for calling the API and which would probably require those tokens to authorize the call to the API.</p>
<p>However, I get an error:-</p>
<pre><code>java.net.URISyntaxException: Illegal character in query at index 98:
    at java.base/java.net.URI$Parser.fail(URI.java:2938)
    at java.base/java.net.URI$Parser.checkChars(URI.java:3109)
    at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3197)
    at java.base/java.net.URI$Parser.parse(URI.java:3139)
    at java.base/java.net.URI.&lt;init&gt;(URI.java:623)
    at java.base/java.net.URL.toURI(URL.java:1063)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:615)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1281)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1270)
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.base/java.lang.Thread.run(Thread.java:832)
</code></pre>
<p>I am not sure where I am going wrong. I have co-related 3 dynamic tokens which are generated as part of the auth token request.</p>
<p>Screenshots in the below link:-</p>
<p><a href=""https://i.stack.imgur.com/Ga35r.png"" rel=""nofollow noreferrer"">Regular Expression Extractor</a></p>
<p><a href=""https://i.stack.imgur.com/gLs6y.png"" rel=""nofollow noreferrer"">Setting parameters</a></p>
<p><a href=""https://i.stack.imgur.com/xQhtm.png"" rel=""nofollow noreferrer"">Error on Jmeter</a></p>
",https://stackoverflow.com/questions/65316369/java-net-urisyntaxexception-illegal-character-in-query-at-index-on-jmeter,"['java', 'jmeter', 'performance-testing', 'jmeter-5.0', 'jmeter-3.2']",3006,True,0,2
Trying to update a ListView in a WinForm App from Task C#,"<p>I am having problems updating a ListView on C# WinForm. The application is a test harness which connects to a TCP Server and receives a data stream. The test harness will then be used to create multiple connections to the server to do load testing. Each task is started using the following command where the number of task is entered on the form:</p>
<pre><code>for (int i = 0; i &lt; noTasks; i++)
{
    bool saveAudio = noTasksCheckedListBox.GetItemCheckState(i) == CheckState.Checked; // true : false;
    taskArray[i] = Task.Run(() =&gt; SendMessage((initId + i).ToString(), saveAudio, audioServerIP));
}
</code></pre>
<p>The SendMessage function creates the TCP client connection and creates a AsyncCallBack to process the incoming stream.</p>
<pre><code>void SendMessage(string id, bool saveWav, string serverIP)
{
    TcpClient tcpclientAudio = new TcpClient();
    string message = &quot;GET /msg?id=&quot; + id + &quot;&amp;type=0 HTTP/1.1\r\n&quot;;

    NetworkObject audioObj = new NetworkObject
    {
        tcp = tcpclientAudio,
        ConnectionType = FileType.Audio,
        URL = message
    };

    if (saveWav)
    {
        tcpclientAudio.BeginConnect(IPAddress.Parse(serverIP), 8008, new AsyncCallback(CallBackConnectMethod01), audioObj);
    }
    else
    {
        tcpclientAudio.BeginConnect(IPAddress.Parse(serverIP), 8008, new AsyncCallback(CallBackConnectMethod02), audioObj);
    }
}
</code></pre>
<p>The only difference between the CallBackConnctMethod is that 02 save the data to a file.</p>
<pre><code>void CallBackConnectMethod02(IAsyncResult result)
{
    NetworkObject obj = (NetworkObject)result.AsyncState;
    TcpClient tcp = obj.tcp;
    NetworkStream ns = tcp.GetStream();

    startedProcessCount++;
    int thisTask = startedProcessCount;
    byte[] buffer = new byte[2048];
    string message = obj.URL;
    byte[] request = Encoding.ASCII.GetBytes(message);
    ns.Write(request, 0, request.Length);
    ns.Read(buffer, 0, 1000);
    RefreshTable(thisTask, &quot;Incoming&quot;, null);
    ......
}
</code></pre>
<p>When debugging the app goes to the RefreshTable function a disappears when it goes in to the delegate section.</p>
<pre><code>private void RefreshTable(int taskNo, string status, string misc)
{
    if (this.tasksListView.InvokeRequired)
    {
        this.Invoke((MethodInvoker) delegate { 
            DateTime nowDateTime = DateTime.Now;
            string now = nowDateTime.Year.ToString(&quot;D4&quot;) + nowDateTime.Month.ToString(&quot;D2&quot;) + nowDateTime.Day.ToString(&quot;D2&quot;) + &quot;-&quot; + nowDateTime.Hour.ToString(&quot;D2&quot;) + nowDateTime.Minute.ToString(&quot;D2&quot;) + nowDateTime.Second.ToString(&quot;D2&quot;);
            string taskId = &quot;Task-&quot; + taskNo.ToString(&quot;D3&quot;);

            if (status == &quot;Incoming&quot;)
            {
                ListViewItem taskLVI = tasksListView.Items.Add(taskId);
                taskLVI.SubItems.Add(now);
                taskLVI.SubItems.Add(&quot; &quot;);
                taskLVI.SubItems.Add(&quot; &quot;);
                if (string.IsNullOrEmpty(misc))
                    taskLVI.SubItems.Add(&quot; &quot;);
                else
                    taskLVI.SubItems.Add(misc);
                taskLVI.SubItems.Add(&quot; &quot;);
            }
            else
            {
                switch (status)
                {
                    case &quot;Lost&quot;:
                    case &quot;Completed&quot;:
                    case &quot;Exception&quot;:
                        ListViewItem listViewItem = null;
                        for (int i = 0; i &lt; tasksListView.Items.Count; i++)
                        {
                            if (tasksListView.Items[i].SubItems[0].Text == taskId)
                            {
                                listViewItem = tasksListView.Items[i];
                                break;
                            }
                        }

                        if (listViewItem != null)
                            ToListViewItem(listViewItem, status, misc, now);
                        break;
                    default:
                        break;
                }
            }
            tasksListView.Refresh();
        });
    }
}
</code></pre>
",https://stackoverflow.com/questions/65254140/trying-to-update-a-listview-in-a-winform-app-from-task-c,['c#'],141,False,0,0
Performance testing environment,"<p>How do you begin with setting a Load environment for an Enterprise application (traditional MVC application with connectivity to some dependent enterprise systems)? For example, it would be ideal to have similar amount of Servers with same configuration as Production environment, also the Database should have similar size and capacity as Production to make Load environment similar to Production.</p>

<p>This does not happen in many organization, and I have seen organization using a trimmed down version of Production infra for the Load testing. Does that seems to be correct approach? Can we run a load test on the trimmed down version of Prod infra? Will this approach produce the result that can be used to predict Production application performance?</p>
",https://stackoverflow.com/questions/60689107/performance-testing-environment,"['performance', 'web-applications', 'jmeter', 'load-testing']",73,True,0,1
Monitoring Kafka Topic by Jmeter,"<p>I am trying to monitor a Kafka topic through jmeter. I am sending 100 messages to the kafka topic though an external tool and the messages are passing perfectly as I have checked in the consumer window. Now I want to monitor the kafka topic using jmeter. I have looked into using kafkameter and seen some tutorials on load testing using kafkameter. But in all the resources I found online it was shown how to send messages to Kafka topic and then monitor it which I don't want to do. I want to monitor the topic while I send messages to that topic from external tool. Can anyone help me with this?</p>
",https://stackoverflow.com/questions/60738727/monitoring-kafka-topic-by-jmeter,"['jmeter', 'kafka-topic']",915,True,0,1
"In my Spring Boot app, how can I debug/tell why I am getting 302 errors?","<p>I am running Jmeter to do some load testing on my app.  When I run it with a single thread, I get all 200 codes in my test. Great.  But when I run 2 threads, I start getting 302 redirect errors on my second thread.  BUT that's not what I'm asking about.</p>
<p>How can I enable debug in my Spring Boot app in order to tell WHY I am getting these 302s?  In my application.properties I have tried:
<code>debug=true</code>
<code>logging.level.org.apache.tomcat.* = debug</code>
<code>logging.level.org.springframework.web.*=debug</code>
.. but those don't get me the info I'm looking for.  What else can I try to get more debug?</p>
<p>I can see the 302s in the Tomcat localhost_accersss_log.txt file, but no other info is there (as expected)</p>
",https://stackoverflow.com/questions/63728954/in-my-spring-boot-app-how-can-i-debug-tell-why-i-am-getting-302-errors,"['spring-boot', 'tomcat']",71,False,0,0
how to unlock inbound thruput to elasticsearch (7.8),"<p>I am running load testing for elasticsearch. ( I am using rally framework ).
Tests are run on gcloud.
Single node elastic:
64 vCore CPU
3TB SSD drive
64 RAM</p>
<p>Client: 64 processes generated data
bulk update use case - bulk size is 50k jsons each bulk</p>
<p>test runs 24 - 48 hours</p>
<p>I did many different scenarios but inbound thruput is around 120 MB/s at a peak.
I tried multiple clients but overall thruput is not changing.
Client cpu is very low ( max 10%), elastic CPU is around 70%.</p>
<p><a href=""https://i.stack.imgur.com/3jSwa.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/3jSwa.png"" alt=""enter image description here"" /></a></p>
<p>I tested the network and it is around 3GB/s - the network is not a bottleneck too.</p>
<p>Question:</p>
<ol>
<li><p>What could block inbound traffic?</p>
</li>
<li><p>is there an elastic configuration to prevent the throttling and it's limit the traffic?</p>
</li>
</ol>
",https://stackoverflow.com/questions/65033959/how-to-unlock-inbound-thruput-to-elasticsearch-7-8,"['performance', 'elasticsearch', 'networking', 'load-testing']",28,False,1,0
What does log flush rate in kafka means exactly?,"<p><a href=""https://i.stack.imgur.com/mTq6Y.png"" rel=""nofollow noreferrer""><img src=""https://i.stack.imgur.com/mTq6Y.png"" alt=""enter image description here"" /></a>Kafka write the logs to page cache and relies on os to flush it periodically to disk. Log flush rate metric in kafka measures the rate of that. The value is in time. So what does a 10 sec log flush rate means?</p>
<p>I was load testing our kafka servers and seeing that log flush rates shoots up to seconds from milliseconds. And it stays there for some hours even before coming back to millisecond level.
While this happens we are not seeing any loss of message or latency. During this load test diskutil is also hitting 100% sometime and comes back to normal immediately. Could someone please help me understand this behaviour? What is the outcome of these high metrics?</p>
",https://stackoverflow.com/questions/64286273/what-does-log-flush-rate-in-kafka-means-exactly,"['linux', 'apache-kafka', 'disk', 'page-caching']",392,False,1,0
Iterating through an array in Scala,"<p>I'm new to Scala, and trying to write few scripts for Load testing using Gatling.
I'm trying to define a re-usable method to send the load, hence I created below method:</p>
<pre><code>def startLoad(scenario: Array[ScenarioBuilder]) = {
        setUp(
            scnGetAuthorizationToken.inject(
              atOnceUsers(1)
              ),
            
        for (i &lt;- 0 until scenario.length) {
            scenario(i).inject(
               nothingFor(5 seconds),
               atOnceUsers(atOnceUserCount)
               ).throttle(
                   reachRps(maxRps/2) in (testDuration/4 seconds),
                   reachRps(maxRps/2) in (testDuration/4 seconds),
                   reachRps(maxRps) in (testDuration/2 seconds)),
             }
            ).protocols(httpConf.inferHtmlResources())
             .maxDuration(testDuration seconds)
             .assertions(
                 global.responseTime.max.lt(maxResponseTime),
                 global.successfulRequests.percent.gt(successfulRequests)
                 )
        }
</code></pre>
<p>But, compiler is throwing below error for the <code>for</code> statement. I got same error when I used &quot;foreach&quot; also:</p>
<pre><code>type mismatch; found : Unit required: io.gatling.core.structure.PopulationBuilder
</code></pre>
<p>Can someone please help me how to get rid off this error?</p>
<p>In general, I would like to have this code in the following format (few lines of code is called on different variables of ScenarioBuilder type), and hence trying to come up with a re-usable method as defined above:</p>
<pre><code>def startLoad(scenario: Array[ScenarioBuilder]) = {
        setUp(
            scnGetAuthorizationToken.inject(
              atOnceUsers(1)
              ),
            
            scenario1.inject(
               nothingFor(5 seconds),
               atOnceUsers(atOnceUserCount)
               ).throttle(
                   reachRps(maxRps/2) in (testDuration/4 seconds),
                   reachRps(maxRps/2) in (testDuration/4 seconds),
                   reachRps(maxRps) in (testDuration/2 seconds)),
             
            scenario2.inject(
               nothingFor(5 seconds),
               atOnceUsers(atOnceUserCount)
               ).throttle(
                   reachRps(maxRps/2) in (testDuration/4 seconds),
                   reachRps(maxRps/2) in (testDuration/4 seconds),
                   reachRps(maxRps) in (testDuration/2 seconds)),
                   
            scenario3.inject(
               nothingFor(5 seconds),
               atOnceUsers(atOnceUserCount)
               ).throttle(
                   reachRps(maxRps/2) in (testDuration/4 seconds),
                   reachRps(maxRps/2) in (testDuration/4 seconds),
                   reachRps(maxRps) in (testDuration/2 seconds)),
           ------        

            ).protocols(httpConf.inferHtmlResources())
             .maxDuration(testDuration seconds)
             .assertions(
                 global.responseTime.max.lt(maxResponseTime),
                 global.successfulRequests.percent.gt(successfulRequests)
                 )
        }
</code></pre>
<p>So, basically, I would like to repeat below lines of code for every element of the array that is passed as an argument to the method.</p>
<pre><code>             inject(
                   nothingFor(5 seconds),
                   atOnceUsers(atOnceUserCount)
                   ).throttle(
                       reachRps(maxRps/2) in (testDuration/4 seconds),
                       reachRps(maxRps/2) in (testDuration/4 seconds),
                       reachRps(maxRps) in (testDuration/2 seconds)),
</code></pre>
",https://stackoverflow.com/questions/63256467/iterating-through-an-array-in-scala,"['scala', 'gatling', 'scala-gatling']",231,True,1,1
PHP closing connections when too many,"<p>recently, I decided to load test my website on some page that require server sent events (event streams) which means that PHP needs to handle many opened connections (with scripts on loop). When approaching the ~140 opened connection, the connections started closing after 1 or 2 seconds. While doing the load testing I monitored my server and the CPU load was very low, RAM usage was low, Network was not the bottleneck so I know think that it may not be an hardware deficiency. Apache log showed no PHP warnings (neither fatal errors). Is there a parameter in the php ini file that may be responsable for closing connections?</p>
<p>If you need some logs or other I will try my best to provide them.</p>
<p>Thanks.</p>
",https://stackoverflow.com/questions/62895318/php-closing-connections-when-too-many,"['php', 'apache', 'server-sent-events', 'event-stream', 'event-stream-processing']",130,False,0,0
How to use Elasticbeanstalk without ngnix (just with application load balancer),"<p>I have my server application deployed in AWS with Beanstalk.
I'm using Beanstalk with Application Loadbalancer.
Beanstalk is very handy in autoconfiguring all for me and I like to use it, but,
for now, every Beanstalk instance contains NGNIX for proxy requests, but because I already have LoadBalancer that redirects requests to my server and responsible for SSL certificates, I don't see why I need NGNIX and I want to remove it from configuration (or at least not to use it between LoadBalancer and Application server).
Moreover, during my load testing and hight load, NGNIX causing me troubles (it takes a lot of CPU time, and crying about worker_connections)
But I can't find any option to use my beanstalk with load balancer without NGNIX</p>
",https://stackoverflow.com/questions/60297102/how-to-use-elasticbeanstalk-without-ngnix-just-with-application-load-balancer,"['amazon-web-services', 'amazon-elastic-beanstalk', 'amazon-elb']",51,True,0,1
Does anyone know why I get a file not found error in Jenkins when opening a JSON file with Python (Locust)?,"<p>I'm using Locust for load testing - creating a lot of post requests to a server.
Because I need to generate different fields for every request, The best way to do it in my opinion is to read the body from a file, change the relevant fields and send the request.</p>

<p>The problem occurs when I open the file</p>

<p>I see in the Jenkins log that there is a FileNotFound exception - even though I see the file in the git repo from where the Jenkins runs the code.</p>

<p>I tried putting the full path in the <code>with</code> statement but still got the same exception.</p>

<pre><code>    ...
    with open('postRequest.json', 'r') as jsonFile:
        data = json.load(jsonFile)

    data[""a""] = b
    data[""x""] = y
    data[[""something""] = something_else
    return json.dumps(data)
</code></pre>

<p>Jenkins fails opening the file.</p>

<p><strong>Note : The code works when I don't read the file, but just create a very long JSON string.</strong></p>

<p>Thanks all !! ;)</p>
",https://stackoverflow.com/questions/60476494/does-anyone-know-why-i-get-a-file-not-found-error-in-jenkins-when-opening-a-json,"['python', 'rest', 'jenkins', 'filenotfoundexception', 'locust']",683,True,0,1
How to setup distributed JMeter load testing using one local machine as a client and aws VM instances as servers?,"<p>I want to set up load testing environment using JMeter and my local machine as a client and some AWS Ubuntu instances as servers. I followed almost every article and answers like this <a href=""https://stackoverflow.com/questions/16618915/setting-up-jmeter-for-distributed-testing-in-aws-with-connectivity-issues"">Setting up JMeter for Distributed testing in AWS with connectivity issues</a> and youtube tutorial but I get different exceptions every time. Can someone describe clearly step by step how to do that?</p>

<p>also, I can't find a clear answer to these questions:</p>

<ul>
<li><p>Which changes needed only in the jmeter.properties on the server-side or
only on the client-side and which changes needed on both sides?  </p></li>
<li><p>Do I need to change firewall config to allow some ports?</p></li>
<li><p>Will the client machine run part of the tests or not?</p></li>
</ul>
",https://stackoverflow.com/questions/61864021/how-to-setup-distributed-jmeter-load-testing-using-one-local-machine-as-a-client,"['amazon-web-services', 'jmeter', 'load-testing']",133,False,0,1
Querying Dynamics CRM using Simple.Odata.Client query (Microservice - Web Api net core 2.2),"<p>I am doing CRUD operations to Dynamics CRM with the help of Simple.OData.Client in Microservice which is built on asp net core. </p>

<p>Problem is when I run couple of Batch or POST/Patch operations it takes time from 50ms to 17 secs in load testing (50 users, 5 mins, approx. request count is 1000, step pattern, warm up duration 1 min).</p>

<p>I have tried everything like making it InsertEntryAsync(false), UpdateEntryAsync(false), using Key instead if Filter (wherever applicable), adding couple of individual calls to ODataBatch.</p>

<p>Can anyone suggest me what else I can try to bring down the time from 17 secs to couple of mili seconds?</p>

<p>Please let me know if further information is required.</p>

<p>Thanks in Advance.</p>
",https://stackoverflow.com/questions/60108969/querying-dynamics-crm-using-simple-odata-client-query-microservice-web-api-ne,"['asp.net-core-webapi', 'dynamics-crm-2016', 'simple.odata.client']",222,False,0,0
Locust load testing For API calls,"<p>I have written a code for locust load testing for my case, where i can do a token call and then will make feature calls as per below code.</p>
<p>This is working fine with single token and 'n' number of users mentioned in master</p>
<p>I made a token call outside class and sending it as parameter to ENV. The userclass is reading the single token and using the same for all users.</p>
<p>I do not want to make token call inside the class, as it generates new token in every execution.</p>
<p>I'm looking if there is anyway like making token calls based on number of users mentioned on master -u and using only those tokens in User class.</p>
<p>Please suggest me if there is any documentation pointer which i can refer for this usecase</p>
<pre><code>#! /usr/bin/python3.6


import json
from locust import HttpUser, task, constant, tag, events
from locust.log import setup_logging
import os
from datetime import datetime

import requests

setup_logging(&quot;INFO&quot;, None)


@events.init_command_line_parser.add_listener
def init_parser(parser):
    parser.add_argument(&quot;--resp-delay&quot;, type=str, env_var=&quot;LOCUST_RESP_DELAY&quot;, default=&quot;&quot;, help=&quot;It's working&quot;)
    parser.add_argument(&quot;--resp-size&quot;, type=str, env_var=&quot;LOCUST_RESP_SIZE&quot;, default=&quot;&quot;, help=&quot;It's working&quot;)
    parser.add_argument(&quot;--env-endpoint&quot;, type=str, env_var=&quot;LOCUST_ENV_ENDPOINT&quot;, default=&quot;&quot;, help=&quot;It's working&quot;)


@events.init.add_listener
def _(environment, **kw):

    os.environ['resp-delay'] = environment.parsed_options.resp_delay
    os.environ['resp-size'] = environment.parsed_options.resp_size
    os.environ['env-endpoint'] = environment.parsed_options.env_endpoint

    with open(&quot;resources/data/&quot; + environment.parsed_options.env_endpoint + '/data.json') as f:
        data = json.load(f)

    cal_transaction_id = datetime.now().strftime('%Y%m%dT%H%M%S')

    #retrive cliend id and client secret from bitbucket repo
    dict_car_app_all = data[&quot;data&quot;]

    print(&quot;env-endpoint:&quot; + os.environ.get(&quot;env-endpoint&quot;))

    token_url = &quot;https://ENDPOINT/auth/token&quot;

    #retrive cliend id and client secret from bitbucket repo
    token_payload = &quot;client_id=&quot; + dict_car_app_all[0][&quot;client_id&quot;] + &quot;&amp;client_secret=&quot; + dict_car_app_all[0][&quot;client_secret&quot;]

    token_headers = {
             'Content-Type': 'application/x-www-form-urlencoded'
    }

    response = requests.request(&quot;POST&quot;, token_url, data=token_payload, headers=token_headers,
                                    cert=( 'resources/certs/' + environment.parsed_options.env_endpoint + '/MyCERT.pem',
                                          'resources/certs/' + environment.parsed_options.env_endpoint + '/MYCERT.key'))

    result = json.loads(response.text)
    token = result[&quot;access_token&quot;]

    os.environ['access_token'] = token
    os.environ['cal_transaction_id'] = cal_transaction_id


#class User_1(User):
class User_0(HttpUser):
    wait_time = constant(1)
    host = &quot;host.com&quot;

    @tag('tag1')
    @task
    def load_test_api_tag1(self):
        token_0 = os.environ.get('access_token')
        cal_transaction_id = os.environ.get('cal_transaction_id')
        env_endpoint = os.environ.get('env-endpoint')


        resp_delay = os.environ.get(&quot;resp-delay&quot;)
        resp_size = os.environ.get(&quot;resp-size&quot;)

        feature_headers = {
            'Authorization': &quot;Bearer &quot; + str(token_0),
            'sm_transactionID': cal_transaction_id
        }

        url = &quot;https://ENDPOINT/SERVICE/mytestservice/first_test&quot;

        querystring = {&quot;response_delay&quot;: resp_delay, &quot;data_size&quot;: resp_size}

        self.client.request(&quot;GET&quot;, url, headers=feature_headers, params=querystring,
                        cert = ('resources/certs/' + env_endpoint + '/MyCERT.pem',
                                 'resources/certs/' + env_endpoint + '/MyCERT.key'))
</code></pre>
",https://stackoverflow.com/questions/65175509/locust-load-testing-for-api-calls,"['python-3.x', 'locust']",915,True,2,1
Importing the pem certificate into jmeter test plan,"<p>Currently I am doing the API load test using the LoadRunner, where the mTLS is implemented on the server side. Also I am able to include the certficates(2 pem files) using the web_set_certificate_ex function by passing the cerificate paths(clientA-crt.pem and clientA-key.pem) - the calls works perfectly fine.</p>

<p>Now we are planning to use jmeter for load testing. As first step, I converted pem into p12 format using the following command
<code>openssl pkcs12 -export -out Cert.p12 -in clientA-crt.pem -inkey clientA-key.pem -passin pass:root -passout pass:root</code></p>

<p><a href=""https://www.ibm.com/support/knowledgecenter/en/SSPH29_9.0.3/com.ibm.help.common.infocenter.aps/t_ConvertthepfxCertificatetopemFormat068.html"" rel=""nofollow noreferrer"">https://www.ibm.com/support/knowledgecenter/en/SSPH29_9.0.3/com.ibm.help.common.infocenter.aps/t_ConvertthepfxCertificatetopemFormat068.html</a></p>

<p>Then next step I am converting the cert.p12 into java keystore using the following command 
<code>keytool -importkeystore -srckeystore Cert.p12 -srcstoretype PKCS12  -srcstorepass root123 -keystore dex.jks  -storepass root111</code></p>

<p><a href=""https://www.blazemeter.com/blog/how-set-your-jmeter-load-test-use-client-side-certificates/"" rel=""nofollow noreferrer"">https://www.blazemeter.com/blog/how-set-your-jmeter-load-test-use-client-side-certificates/</a></p>

<p>The below error is encountered:
<code>Importing keystore Cert.p12 to dex.jks...</code>
<code>keytool error: java.io.IOException: keystore password was incorrect</code></p>

<p>Can someone let me know where I am going wrong.</p>

<p>Contents of clientA-crt.pem</p>

<p><code>-----BEGIN CERTIFICATE-----</code>
<code>some alphanumeric values</code>
<code>-----END CERTIFICATE-----</code></p>

<p>Contents of clientA-key.pem</p>

<p><code>-----BEGIN RSA PRIVATE KEY-----</code>
<code>some alphanumeric values</code>
<code>-----END RSA PRIVATE KEY-----</code></p>
",https://stackoverflow.com/questions/59926309/importing-the-pem-certificate-into-jmeter-test-plan,"['ssl', 'jmeter', 'client-certificates']",2887,True,1,1
K6 script failing in azure devops,"<p><strong>Setup</strong></p>
<p>We are using <a href=""https://k6.io/"" rel=""nofollow noreferrer"">K6</a> tool for Load testing our API.
Locally scripts work perfectly fine with virtual users up to 50</p>
<p><strong>problem statement</strong></p>
<p>While running the same script in Azure devops using <a href=""https://marketplace.visualstudio.com/items?itemName=k6.k6-load-test"" rel=""nofollow noreferrer"">K6</a> task  and virtual user 15 for duration 60s most of the request (almost 90%) is failing because of timeout and following is the error :</p>
<p><strong>level=warning msg=&quot;Request Failed&quot; error=&quot;Get &quot;https://xxxxx&quot;: dial tcp xxxx: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.&quot;</strong></p>
<p>Not sure</p>
<p><strong>a) What is causing the timeout?</strong></p>
<p><strong>b) What are the other options?</strong></p>
<p>PS: Api is behind Api Management Service in Azure and load test works locally fine even on 10 times higher load</p>
",https://stackoverflow.com/questions/64893067/k6-script-failing-in-azure-devops,"['performance', 'azure-devops', 'load-testing', 'k6']",420,False,1,0
Load Testing couchbase server - Unable to capture calls triggered from couchbase lite to sync_gateway,"<p>Our mobile app uses couchbase lite (version 2.7) and it replicates the data to couchbase server through sync_gateway. Now we want to capture the calls being triggered from couchbaseLite to the sync_gateway. we need to capture these calls because we want to simulate these calls in our load testing tool and load test the sync_gateway directly from our load test tool.</p>
<p>we tried using charles proxy to capture these requests, but however we are not able to capture the replication requests. Only request i could capture is _blipsync call (and that too in websocket format).</p>
<p>I understand that couchbaseLite 2.7 talks to sync gateway in websocket layer. But is there a way i can capture the requests triggered from couchbase lite to the sync_gateway for push/pull replications?</p>
",https://stackoverflow.com/questions/63258067/load-testing-couchbase-server-unable-to-capture-calls-triggered-from-couchbase,"['websocket', 'couchbase', 'couchbase-lite', 'couchbase-sync-gateway']",166,False,1,1
RabbitListener using same thread over and over in Spring Boot Application,"<p>I want to test how a RabbitListener behaves when multiple requests are sent to it, kind of load testing. So here's what I have done - I created a rabbit listener: </p>

<pre><code>@RabbitListener(queues = ""one.two.three.queue"")
public void queueConsumer1(Message message) throws JsonProcessingException, InterruptedException {
    Country country = objectMapper.readValue(new String(message.getBody(), StandardCharsets.UTF_8), Country.class);

    System.out.println(Thread.currentThread().getName()+"" - ""+country.getName());

    Thread.sleep(10000); //  assuming the whole process after this takes 10 seconds
}
</code></pre>

<p>This listener is inside a spring boot application. In spring boot, default thread pool size is 200. Before starting this application, I have queued 20 messages of type country in RabbitMQ server. </p>

<p>When I started the application, I was hoping it would print country names with different thread names all at once. But it is printing country names with same thread name and it takes ten second gap between each country.</p>

<pre><code>org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#0-1 - DRC
org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#0-1 - South Africa
</code></pre>

<p>I am not able to understand this behavior, As so many threads (up to 200) are available in thread pool, it should use them instead of using the same thread.</p>
",https://stackoverflow.com/questions/62275551/rabbitlistener-using-same-thread-over-and-over-in-spring-boot-application,"['java', 'spring-boot', 'rabbitmq', 'amqp']",1651,False,1,1
Setup and Teardown actions in Blazemeter,"<p>Does anyone know how to add steps to a Blazemeter test that are executed before the actual load testing component (i.e. Setup and Teardown steps). Is this possible? Currently we're having to add these steps in JMeter script, but we want to try and do as much as possible in Blazemeter. What we're trying to do is the following:</p>
<ol>
<li>Do a POST API call to our logging server to state that testing has started.</li>
<li>Execute the load test script.</li>
<li>Do another POST API call to our logging server to state testing has finished.</li>
</ol>
<p>I've had a look online and on other posts, but haven't seen anything like this mentioned, so I'm wondering if it's even possible or not. I'm pretty new to Blazemeter, so any help would be greatly appreciated!</p>
",https://stackoverflow.com/questions/64850939/setup-and-teardown-actions-in-blazemeter,"['logging', 'performance-testing', 'blazemeter']",123,True,0,1
Flask thread pool exhausted,"<p>I have a Flask-based app that is used as a front (HTTP API only) for an image processing task (face detection along with some clustering). The app is deployed to Kubernetes clusters and, unfortunately during load testing it dies.</p>
<p>The problem is that all Flask threads are reserved for request processing and the application can't reply to Kubernetes liveness probe (<code>/health</code> endpoint) via HTTP - so the whole pod gets restarted.</p>
<p>How can I resolve it? I thought about a grep-based liveness problem however it doesn't solve the problem. Another idea is to use celery, however, if Flask doesn't support async-processing I'll need to call <code>wait()</code> on a celery task which gives me exactly to the same place.</p>
<p>For now I don't consider returning <code>202</code> response along with URL for process monitoring.</p>
<p>Any other ideas?</p>
",https://stackoverflow.com/questions/64967504/flask-thread-pool-exhausted,"['python', 'flask', 'kubernetes']",377,True,0,1
"Redis not caching, going to MongoDB every time instead","<p>I'm trying to get Redis up and running and I have the server working. When I run a load test, however, I see that every query is still going to my mongoDB instead of looking at Redis first. My Redis server terminal is this:</p>
<pre><code>41136:M 22 Sep 2020 14:00:00.641 * Background saving terminated with success
41136:M 22 Sep 2020 14:01:01.074 * 10000 changes in 60 seconds. Saving...
41136:M 22 Sep 2020 14:01:01.076 * Background saving started by pid 42406
42406:C 22 Sep 2020 14:01:05.256 * DB saved on disk
41136:M 22 Sep 2020 14:01:05.305 * Background saving terminated with success
41136:M 22 Sep 2020 14:02:06.043 * 10000 changes in 60 seconds. Saving...
41136:M 22 Sep 2020 14:02:06.052 * Background saving started by pid 42439
42439:C 22 Sep 2020 14:02:10.719 * DB saved on disk
41136:M 22 Sep 2020 14:02:10.784 * Background saving terminated with success
41136:M 22 Sep 2020 14:03:11.030 * 10000 changes in 60 seconds. Saving...
41136:M 22 Sep 2020 14:03:11.033 * Background saving started by pid 42480
42480:C 22 Sep 2020 14:03:17.592 * DB saved on disk
41136:M 22 Sep 2020 14:03:17.690 * Background saving terminated with success
</code></pre>
<p>When I look on my New Relic dashboard, however, I see that the response time is very slow (10,000 ms at least) and that's all from MongoDB. Redis only takes up about 15-16ms, the other 10,000 ms is MongoDB.</p>
<p>My MongoDB is indexed correctly, however, as queries there only take 1 millisecond. I also used the .lean() method in my database.js file.</p>
<p>I'm using Artillery for my load testing.</p>
<p>For reference, here is my index.js file for my server:</p>
<pre><code>require('newrelic');
const express = require('express');
const bodyParser = require('body-parser');
const Images = require('../database-mongo/index.js');
const cors = require('cors');
const redis = require('redis');
const client = redis.createClient();
const RedisServer = require('redis-server');

const server = new RedisServer(6379);
const PORT = 3003;

const app = express();
app.use(cors());

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.use(express.static(__dirname + '/../react-client/dist'));

server.open((err) =&gt; {
  if (err === null) {
    console.log('redis server working')
  }
})

let redisMiddleware = (req, res, next) =&gt; {
  let key = &quot;__expIress__&quot; + req.originalUrl || req.url;
  client.get(key, function (err, reply) {
    if (reply) {
      res.send(reply);
    } else {
      res.sendResponse = res.send;
      res.send = (body) =&gt; {
        client.set(key, JSON.stringify(body));
        res.sendResponse(body);
      }
      next();
    }
  });
};


app.get('/images/urls/:itemId', redisMiddleware, (req, res) =&gt; {
  Images.fetchItemImages(Number(req.params.itemId))
    .then((data) =&gt; {
      if (data) {
        res.status(200).send({ data });
      } else {
        res.sendStatus(404);
      }
    })
    .catch((err) =&gt; {
      console.log('error with app.get: ', err);
      res.status(500).send(err);
    })
})

app.listen(PORT, () =&gt; {
  console.log(`listening on port ${PORT}`);
});

module.exports = app
</code></pre>
<p>Here is my index.js file for my database:</p>
<pre><code>var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/images', { useNewUrlParser: true, useUnifiedTopology: true });

var db = mongoose.connection;

db.on('error', function (err) {
  console.log('mongoose connection error: ', err);
});

db.once('open', function () {
  console.log('mongoose connected successfully');
});

const imageSchema = new mongoose.Schema({
  itemId: Number,
  pic1Small: String,
  pic1Med: String,
  pic1Large: String,
  pic2Small: String,
  pic2Med: String,
  pic2Large: String
});

const Image = mongoose.model('url', imageSchema);


function fetchItemImages(itemId) {
  // console.log('fetchImages invoked')
  return Image.find({ 'itemId': Number(itemId) }).lean()
}

module.exports = Image;
module.exports.fetchItemImages = fetchItemImages;
</code></pre>
",https://stackoverflow.com/questions/64015928/redis-not-caching-going-to-mongodb-every-time-instead,"['node.js', 'mongodb', 'mongoose', 'redis']",370,True,0,1
K6 InfluxDB + Grafana Docker : What does &quot;git submodule update --init&quot; mean,"<p>I am using K6 for Load Testing.</p>
<p>I have cloned the K6, Grafana, InfluxDB docker-compose set up from here:</p>
<p><a href=""https://github.com/loadimpact/k6"" rel=""nofollow noreferrer"">https://github.com/loadimpact/k6</a></p>
<p>The instructions for using the Docker are at the bottom of this page (<a href=""https://k6.io/docs/results-visualization/influxdb-+-grafana"" rel=""nofollow noreferrer"">https://k6.io/docs/results-visualization/influxdb-+-grafana</a>) as shown here:</p>
<pre><code>git clone 'https://github.com/loadimpact/k6'
cd k6
git submodule update --init
</code></pre>
<p>What does the last line mean? (git submodule update --init). I can't see it doing anything.</p>
<p>Also is this a one off action that is only required the first time you clone this solution?</p>
<p>I am going to add my own tests to the cloned solution, delete the existing .git folder,run git init and then check it into my own new repository.</p>
<p>When other people clone my new repository will they have to run the 'git submodule update --init' command after cloning?</p>
",https://stackoverflow.com/questions/63471925/k6-influxdb-grafana-docker-what-does-git-submodule-update-init-mean,"['git', 'k6']",69,True,0,1
AWS APIGateway WebSockets API returns 429,"<p>I am load-testing a WebSocket Service which I deployed today on AWS APIGateway using a tool called <a href=""https://github.com/observable/thor"" rel=""nofollow noreferrer"">Thor</a>. The service uses Lambda based message handlers and is packed and deployed through Serverless framework in Python3.8. The connection ids are stored in DynamoDB.</p>

<p>My AWS account level throttle is currently at 10000 requests/second and bursts are at 5000. </p>

<p>I'm getting the below results for 2000 concurrent connections with 1 message per connection:</p>

<pre><code>Online               4353 milliseconds
Time taken           4353 milliseconds
Connected            1826
Disconnected         0
Failed               174
Total transferred    549.23kB
Total received       420.84kB

Durations (ms):

                     min     mean     stddev  median max
Handshaking          840     1629        666    1448 3383
Latency              103     198         150     155 859

Percentile (ms):

                      50%     66%     75%     80%     90%     95%     98%     98%    100%
Handshaking          1448    1930    2178    2297    2497    2641    3311    3336    3383
Latency              155     163     167     172     194     665     785     798     859

Received errors:

174x                 unexpected server response (429)
</code></pre>

<p>It's clear that the requests are being throttled at this point. I want to know what should be my account level throttle limit for supporting 20,000 concurrent WebSocket connections. Sometimes, I also see <code>500</code> errors in the results which I'm unable to debug from the logs.</p>

<p>Let me know if more information is needed to answer this.</p>
",https://stackoverflow.com/questions/61159703/aws-apigateway-websockets-api-returns-429,"['websocket', 'aws-lambda', 'aws-api-gateway']",620,True,0,1
Not able to use regular expression extractor variable from one test plan to other test plan in jmeter,"<ol>
<li>I am performing load testing using <code>jmeter</code>. I created a test plan with <strong>https request and used regular expression extractor to extract variable returned from first https request</strong>. </li>
</ol>

<blockquote>
  <p>Variable: csrftoken<br>
  Regular Expression: value=""(.*)""<br>
  Template: $1$<br>
  Match Number: 1<br>
  Default Value: EMPTY</p>
</blockquote>

<p>2.Used <code>JSR223 Postprocessor</code> and  <strong>verified</strong> that the extracted variable are correct. </p>

<pre><code>log.info(""***************************""+vars.get(""csrftoken""));
</code></pre>

<ol start=""3"">
<li>I Created  new test plan for signin request were I'm using the variable which was extracted in first test plan and defining the variable in parameters as </li>
</ol>

<blockquote>
  <p>csrfmiddlewaretoken    :  ${csrftoken}<br>
  email :                  xxxxxxxx@gmail.com<br>
  password :           Password          </p>
</blockquote>

<p>But <code>${csrftoken}</code> variable are not getting picked up when I run the request.</p>

<p>Is there any other possible way to make use of variable from one test plan to other test plan and run the request with the same variable.<br>
Help would be really appreciated!!<br>
Thanks in advance.</p>
",https://stackoverflow.com/questions/61976150/not-able-to-use-regular-expression-extractor-variable-from-one-test-plan-to-othe,"['regex', 'variables', 'jmeter', 'token', 'test-plan']",126,False,0,1
.net web.config how to use &lt;rewrite&gt; &lt;rules&gt; with request headers as input?,"<p>We have some logic in the web.config which requires ip whitelisting to access our websites.</p>
<p>We want to allow load testing without having to whitelist IP, as the load test will come from dynamic IPs.  In the load test tool we can set a request header, such as</p>
<pre><code>  loadtester: true
</code></pre>
<p>In the rewrite rules are &quot;input&quot; variables, which, from looking at examples, include:</p>
<ol>
<li>REMOTE_ADDR</li>
<li>HTTP_X_Forwarded_For</li>
<li>HTTP_HOST</li>
<li>REQUEST_FILENAME</li>
<li>SERVER_PORT</li>
<li>URL</li>
<li>REQUEST_URI</li>
</ol>
<p>But I cant find one for reqeuest headers.  Are these documented anywhere?</p>
<p>Any idea how I would parse the headers and check the one i am looking for?  We would like to allow traffic with a specific header, even if the IP is not whitelisted.</p>
<p>example extract from web.config:</p>
<pre><code>    &lt;rule name=&quot;Whitelist sites&quot; stopProcessing=&quot;true&quot;&gt;
      &lt;match url=&quot;.*&quot; /&gt;
      &lt;conditions&gt;
        &lt;add input=&quot;{REMOTE_ADDR}&quot; pattern=&quot;82\.7\.151\.45&quot; negate=&quot;true&quot;/&gt;
        &lt;add input=&quot;{HTTP_X_Forwarded_For}&quot; pattern=&quot;82\.7\.151\.45&quot; negate=&quot;true&quot;/&gt;
      &lt;/conditions&gt;
      &lt;action type=&quot;CustomResponse&quot; statusCode=&quot;403&quot; statusReason=&quot;Forbidden&quot; statusDescription=&quot;The requested site is not accessible&quot; /&gt;
    &lt;/rule&gt;
  &lt;/rules&gt;
&lt;/rewrite&gt;
&lt;/system.webServer&gt;
</code></pre>
<p>Update: I found this resource: <a href=""https://www.w3schools.com/ASP/coll_servervariables.asp"" rel=""nofollow noreferrer"">https://www.w3schools.com/ASP/coll_servervariables.asp</a></p>
<p>In it there is a variable called <code>&quot;HTTP_&lt;HeaderName&gt;&quot;</code> I'll try!</p>
",https://stackoverflow.com/questions/62810913/net-web-config-how-to-use-rewrite-rules-with-request-headers-as-input,"['.net', 'iis', 'url-rewriting', 'request-headers']",310,True,0,1
Response code:Non HTTP response code: org.apache.http.conn.HttpHostConnectException,"<p>I'm trying to learn load testing with JMeter(Very new). Using the tutorial to Build a Web Test Plan on the JMeter website and another youtube tutorial. When I try to run JMeter this is error i get. Please help</p>
<p>Thread Name:USERS 1-1
Sample Start:2020-07-23 08:54:33 SAST
Load time:3151
Connect Time:3151
Latency:0
Size in bytes:2739
Sent bytes:0
Headers size in bytes:0
Body size in bytes:2739
Sample Count:1
Error Count:1
Data type (&quot;text&quot;|&quot;bin&quot;|&quot;&quot;):text
Response code:Non HTTP response code: org.apache.http.conn.HttpHostConnectException
Response message:Non HTTP response message: Connect to 5z42l0gtij.execute-api.eu-west-1.amazonaws.com:80 [5z42l0gtij.execute-api.eu-west-1.amazonaws.com/54.171.7.7, 5z42l0gtij.execute-api.eu-west-1.amazonaws.com/34.252.147.236] failed: Connection refused: connect</p>
<p>HTTPSampleResult fields:
ContentType:
DataEncoding: null</p>
",https://stackoverflow.com/questions/63048893/response-codenon-http-response-code-org-apache-http-conn-httphostconnectexcept,['jmeter'],814,True,0,1
"Load-test Spock spec, running it concurrently multiple times","<p>I have written integration tests in Spock that I would like to reuse for load testing. I haven't had any luck with programmatically executing Spock tests. I need to run an entire spec as a single unit which will be executed concurrently to create load.</p>
<p>Previous posts on stack overflow on this topic are obsolete (I tried a bunch of them with no luck).</p>
<p>Example Spec:</p>
<pre><code>class MySpec extends Specification { 
   def 'test'() {
      expect: 1+1 == 2
   }
}
</code></pre>
<p>I want to be able to run this in something like (executed, succeeded and failed are AtomicInteger):</p>
<pre class=""lang-java prettyprint-override""><code>executor.submit(() -&gt; {
    try {
        executed.addAndGet(1);
        Result result = mySpecInstance.run() // &lt;-- what should this be.
        if (result.wasSuccessful()) {
            succeeded.addAndGet(1);
        } else {
            failed.addAndGet(1);
            log.error(&quot;Failures encountered: {}&quot;, result.getFailures());
        }

    } catch (RuntimeException e) {
        log.error(&quot;Exception when running runner!&quot;, e);
        failed.addAndGet(1);
    }});
</code></pre>
<ul>
<li>I've tried the answer in this <a href=""https://stackoverflow.com/questions/26790006/programmatically-executing-spock-tests-to-create-service-health-test"">post</a> which throws</li>
</ul>
<pre class=""lang-sh prettyprint-override""><code>Invalid test class 'my.package.MySpec':
  1. No runnable methods]
</code></pre>
<ul>
<li>I tried using the <code>new EmbeddedSpecRunner().run(MySpec.class)</code> which throws</li>
</ul>
<pre><code>groovy.lang.MissingMethodException: No signature of method: spock.util.EmbeddedSpecRunner.runClass() is applicable for argument types: (Class) values: [class my.package.MySpec]
Possible solutions: getClass(), metaClass(groovy.lang.Closure)
</code></pre>
<p>I am using JDK8 with Groovy 3.0.4 and spock-2.0-M3-groovy-3.0 (spock-junit4).</p>
<p><strong>Update:</strong></p>
<p>The answer from <a href=""https://stackoverflow.com/questions/26790006/programmatically-executing-spock-tests-to-create-service-health-test"">post</a> works with Groovy-2.4, Spock-1.3 but not with Groovy-3.0 and Spock-2.0.</p>
<p>Thanks.</p>
",https://stackoverflow.com/questions/62827352/load-test-spock-spec-running-it-concurrently-multiple-times,['spock'],649,True,0,1
Disruptor behavior - Drain full buffer before consuming new data,"<p>I have the following scenario.</p>
<p>We were load testing our application in Cloud on K8s. Our inbound messages are coming over Kafka and we are writing back to Kafka. Our architecture is such that where Kafka threads push the message onto disruptor(blocking wait strategy, 512 size) and business thread takes the message out of the disruptor to process. To simulate load we primed our Kafka topic(4 partitions) with close 500K messages when the application was not running. We then started our application to gauge the load.</p>
<p>What we saw was disruptor fills up completely with 0 capacity remaining and then start draining and this continues over and over.</p>
<p>Is this the right behavior or are we using disruptors in the wrong way? Please share your thoughts?</p>
",https://stackoverflow.com/questions/63014910/disruptor-behavior-drain-full-buffer-before-consuming-new-data,"['java', 'asynchronous', 'apache-kafka', 'disruptor-pattern', 'lmax']",228,False,0,1
how to load test async python requests in celery using jmeter?,"<p>I have an API, which performs the task likes this:</p>

<ol>
<li>Client sends the request.</li>
<li>The task is received by the celery worker and put in the message queue.</li>
<li>The response is sent as soon as the request is received and the task is executed.</li>
</ol>

<p>Now, I am load testing my application on JMeter. In my server logs, whenever I send a request to the server, the response is received asap and the task is executed. But, JMeter is executing the whole query and sending me the response after the entire query is executed. Now, I want JMeter to send me the response as soon as the request is received, not when the whole query is executed.I want to record the response times of the server, when mulitple queries are sent.</p>

<p>How can I achieve this? Can anybody help me with this?
Thanks</p>
",https://stackoverflow.com/questions/62376820/how-to-load-test-async-python-requests-in-celery-using-jmeter,"['python', 'api', 'asynchronous', 'jmeter', 'celery']",260,False,1,0
NGINX/uWSGI reverse proxy 502 Bad Gateway under load,"<p>I'm using NGINX as a reverse proxy for a uWSGI server running a Flask app. Most requests are handled successfully but after about under load testing at 500 concurrent connections, some requests (but not all!) are dropped with a 502 Bad Gateway error.</p>
<p>According to the error log, it seems as though NGINX has trouble sending the connection through to uWSGI. I don't know why this fails, however, as I am easily running 100 uWSGI processes, each of which have a listen backlog of 300.</p>
<p>I've adjusted my net.core.somaxconn to 4096. My nginx.conf looks like this:</p>
<pre><code>    user www-data;
    worker_processes auto;
    pid /run/nginx.pid;
    include /etc/nginx/modules-enabled/*.conf;
    worker_rlimit_nofile 65535;

    events {
        worker_connections 65535;
        multi_accept on;
    }

    http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

    } 
</code></pre>
<p>My sites-available config looks like this (with the real url replaced with myservice.com):</p>
<pre><code>server {
server_name myservice.com www.myservice.com;
client_header_buffer_size 64k;
large_client_header_buffers 8 64k;

location / {
    include uwsgi_params;
    uwsgi_pass unix:/home/ubuntu/api_master/api.sock;
    client_max_body_size 500M;
}

listen 443 ssl backlog=65535; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/myservice.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/myservice.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot




}
server {
if ($host = www.myservice.com) {
    return 301 https://$host$request_uri;
} # managed by Certbot


if ($host = myservice.com) {
    return 301 https://$host$request_uri;
} # managed by Certbot


listen 80;
server_name myservice.com www.myservice.com;
return 404; # managed by Certbot




}
</code></pre>
<p>Help would be greatly appreciated! It would be great if I could get to 4,096+ concurrent connections on this server; I'm sure the hardware can handle it.</p>
",https://stackoverflow.com/questions/62725687/nginx-uwsgi-reverse-proxy-502-bad-gateway-under-load,"['nginx', 'flask', 'uwsgi', 'nginx-reverse-proxy', 'nginx-config']",946,True,0,2
"Jmeter - Auth token over time, troubles with evaluation of __time() function","<p>I have two Threads running in parallel, one responsible for the load testing, the other for generating Authentication token.</p>

<p>The problems I have are in this section:</p>

<p><a href=""https://i.stack.imgur.com/skIBf.png"" rel=""nofollow noreferrer"">enter image description here</a></p>

<p>Two if controllers checking basically the current time with the jmeter function ${__time(/1000,)}.
If the time + {delay time for next request} &lt; current time = > time =current time and make request for the auth token.</p>

<p>The other controller's purpose is making the thread ""sleep"" for 30 seconds.</p>

<p>My problem is that it seems the if statement is executed only once and can not enter this if() and update my time property, hence only 1 token is requested and after time it will expire.</p>

<p>Do you have any idea why this if() statement is executed only once /Thread is infinite/ and how can I check for the current time ?</p>
",https://stackoverflow.com/questions/59790413/jmeter-auth-token-over-time-troubles-with-evaluation-of-time-function,"['authentication', 'jmeter']",98,True,0,1
Downloading whole websites with k6,"<p>I'm currently evaluating whether k6 fits our load testing needs. We have a fairly traditional website architecture that uses Apache webservers with PHP und a MySQL database. Sending simple HTTP requests with k6 looks simple enough and I think we will be able to test all major functionality with it, as we don't rely on JavaScript that much and most pages are static.</p>

<p>However, I'm unsure how to deal with resources (stylesheets, images, etc.) that are referenced in the HTML that is returned in the requests. We need to load them as well, as this sometimes leads to database requests, which must be part of the load test.</p>

<p>Is there some out-of-the-box functionality in k6 that allows you to load all the resources like a browser would? I'm aware that k6 does <strong>NOT</strong> render the page and I don't need it to. I only need to request all the resources inside the HTML.</p>
",https://stackoverflow.com/questions/60927653/downloading-whole-websites-with-k6,"['load-testing', 'k6']",9165,True,6,2
.Net Core Web API Slowness With Redis Queue on K8S,"<p>I developed a .net core web API in which all requests are first inserted into database and then generated request Id is inserted into redis queue.</p>
<p>With Load testing application work flawless with IIS hosting on VM server with any number of load. When application is deployed on K8S with 3 PODS(each POD configuration 1 CPU and 4 GB RAM) application performance degrades when requests are greater than 750. With load of 1000 requests sometimes all requests executed successfully but takes 2 to 3 mins to complete all the requests and sometimes few requests got failed.
When Load is greater than 1000 to 2000 number of failed request increase. Below are the errors I got randomly.</p>
<p><strong>Error 1</strong></p>
<pre><code>No connection is available to service this operation: LPUSH GENEVAREQ; IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=12,Free=32755,Min=4,Max=32767), Local-CPU: n/a \n   at StackExchange.Redis.ConnectionMultiplexer.
</code></pre>
<p><strong>Error 2</strong></p>
<pre><code>at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at XYZ.Demo.RedisService.RedisConnectionFactory.Connection() in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\XYZ.Demo.RedisService\RedisConnectionFactory.cs:line 26
at XYZ.Demo.RedisService.RedisQueueService`1..ctor(IRedisConnectionFactory connectionFactory) in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\XYZ.Demo.RedisService\RedisQueueService.cs:line 22
at XYZ.DemoAPI.Services.RequestService.EnqueueRequest(String requestId, String name, String queueName, Boolean priority) in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\DemoAPI\Services\RequestService.cs:line 205
at XYZ.DemoAPI.Services.RequestService.PostReportRequest(RequestParams p) in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\DemoAPI\Services\RequestService.cs:line 127
at XYZ.DemoAPI.Controllers.BaseController`1.PushReportRequest[TResult,TRow,P](P param, IProcessRequest`3 service) in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\DemoAPI\Controllers\BaseController.cs:line 54
at XYZ.DemoAPI.Controllers.DemoApiController.GetReport(String businessLine, String category, String firmId, String authorization, String authUserId, Object requestPayload, String requestTrackingId) in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\DemoAPI\Controllers\DemoApiController.cs:line 57
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeNextActionFilterAsync&gt;g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State&amp; next, Scope&amp; scope, Object&amp; state, Boolean&amp; isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
</code></pre>
<p><strong>Error 3</strong></p>
<p>--- End of stack trace from previous location where exception was thrown ---</p>
<pre><code>at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at XYZ.Demo.RedisService.RedisConnectionFactory.Connection() in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\XYZ.Demo.RedisService\RedisConnectionFactory.cs:line 26
at XYZ.Demo.RedisService.RedisQueueService`1..ctor(IRedisConnectionFactory connectionFactory) in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\XYZ.Demo.RedisService\RedisQueueService.cs:line 22
at XYZ.DemoAPI.Services.RequestService.EnqueueRequest(String requestId, String name, String queueName, Boolean priority) in D:\TeamCity\buildAgent\work\abdf9bd4783a2774\GenevaAPI\Services\RequestService.cs:line 205
</code></pre>
<p><strong>Error 4</strong></p>
<pre><code>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server) \n   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)\n   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)\n   at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp; connection)\n   at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\n   at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)\n   at Microsoft.Data.SqlClient.SqlConnection.Open()\n   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnection(Boolean errorsExpected)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)\n   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.InitializeReader(DbContext _, Boolean result)\n   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)\n   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()\n   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)\n   at XYZ.Demo.BuisnessService.ValidateService.GetClusterServer(RequestParams requestParams, String&amp; queueName, String&amp; filePath) in D:\\TeamCity\\buildAgent\\work\\abdf9bd4783a2774\\XYZ.Demo.BuisnessService\\ValidateService.cs:line 220\n   at XYZ.DemoAPI.Services.RequestService.PostReportRequest(RequestParams p) in
</code></pre>
<p><strong>Error 5</strong></p>
<pre><code>The timeout period elapsed during the post-login phase.  The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=7; handshake=1069; [Login] initialization=0; authentication=0; [Post-Login] complete=13032;  \n   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)\n   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)\n   at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp; connection)\n   at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\n   at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)\n   at Microsoft.Data.SqlClient.SqlConnection.Open()\n   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnection(Boolean errorsExpected)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)\n   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.InitializeReader(DbContext _, Boolean result)\n
</code></pre>
<p><strong>Error 6</strong></p>
<pre class=""lang-html prettyprint-override""><code>&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.17.10&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;


&lt;html&gt;&lt;body&gt;&lt;h1&gt;504 Gateway Time-out&lt;/h1&gt;
The server didn't respond in time.
&lt;/body&gt;&lt;/html&gt;
</code></pre>
<p>Please suggest how to fix this issue.</p>
",https://stackoverflow.com/questions/63560979/net-core-web-api-slowness-with-redis-queue-on-k8s,"['c#', 'entity-framework', 'asp.net-core', 'kubernetes']",197,False,1,0
Using LMAX Disruptor for event handling reduces performance compared to Netty Handlers,"<p>I have written a Netty HTTP Server. <br><br>
I am figuring out right way to handle Http requests <br>
Options: (1. Netty Handlers 2. LMAX Disruptor). <br><br>
I have read it somewhere that LMAX Disruptor are good for async event handling. <br> 
But after the load testing, server with LMAX Disruptor for event handling provided 70% less throughput than Netty Handler. And latency also increased by 200%. <br>
I was getting 30k qps on an 8 core 16gb box. After using Lmax Disruptor, I am getting 10k qps.
<br>
Currently my service is just reading Json request and returning static response. I am just trying to compare raw performance as of now.</p>

<p>I am reading HttpRequest from SimpleChannelInboundHandler and sending to LMAX Disruptor event handler and freeing the netty worker handler whose configuration is mentioned below:</p>

<p>Netty IO threads: 24 and worker threads: 48</p>

<p><code>Disruptor disruptor = new Disruptor&lt;&gt;(new EventFactory(), 65536, DaemonThreadFactory.INSTANCE);</code> <br>
<br>
Is it because Disruptor creates new Daemon thread for each event?</p>
",https://stackoverflow.com/questions/61077660/using-lmax-disruptor-for-event-handling-reduces-performance-compared-to-netty-ha,"['netty', 'nio', 'reactor-netty', 'disruptor-pattern', 'lmax']",386,False,1,0
Identify what check has failed,"<p>I'm load testing a backend and have a couple checks to add to the error if failed. I'm able to collect the failed check and add it to the error collection but I would like to know on how to identify what check has failed and add a tag to the error collection corresponding to the failure.</p>
<p>I could see the Check() function takes a optional 3rd argument <code>tags</code> but there seem to be no example on how it is used.</p>
<p>Here is how my current code is:</p>
<pre><code>export let errorRate = new Rate('errors');
export let checks = {
    'Response Time': r =&gt; r.timings.duration &lt; 2000, // Response time should be less than 2seconds
    'status was 200': r =&gt; r.status == 200, // Response status should be 200
};

export default function() {
  let res = http.get('https://url');
  const result = check(res, checks);
  errorRate.add(!result, { type: 'failure type' }); //I'd like to set the type as either response or code here

  sleep(1);
}
</code></pre>
<p>Something like this could work but this isnt scalable meaning, more checks = more if conditions. I'm looking for a more simplified solution which could scale to number of checks easily.</p>
<pre><code>var result;
  result = check(res, {'Response Time': r =&gt; r.timings.duration &lt; 2000});
  if (!result)
      errorRate.add(1, {type: 'response'}); 
  result = check(res, {'status was 200': r =&gt; r.status == 200});
  if (!result)
      errorRate.add(1, {type: 'status'}); 
</code></pre>
<p>My ultimate aim is to record failures in influx database and store why it failed so I could add queries in grafana to show different axes for each failure.</p>
",https://stackoverflow.com/questions/63613647/identify-what-check-has-failed,"['javascript', 'load-testing', 'k6']",127,False,1,2
Can you cache a variable to use between invocations of a C# AWS Lambda function,"<p>I want to use caching between c# Lambda calls, I understand if the Lambda starts from cold this wouldn't be possible, but if it is called many times within a short period can we use a cache.</p>
<p>I have tried by creating a static variable, but this seems to be reinitialised after each call?</p>
<p>Anyone have any ideas?  Here is an example where I want to increase the TestCache variable by 1 each time, however this always returns 1.</p>
<pre><code>using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using System.Collections.Generic;

// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]

namespace MyTestLambda
{
    public class Global
    {
        private readonly Dictionary&lt;string, string&gt; allOriginHeaders = new Dictionary&lt;string, string&gt;
            {
                { &quot;Access-Control-Allow-Origin&quot;, &quot;*&quot; }
            };

        public static int TestCache = 0;

        public APIGatewayProxyResponse Handler(APIGatewayProxyRequest apigProxyEvent)
        {
            TestCache += 1;

            return new APIGatewayProxyResponse
            {
                Body = TestCache.ToString(),
                StatusCode = 200,
                Headers = allOriginHeaders
            };
        }
    }
}
</code></pre>
<ul>
<li>UPDATED *</li>
</ul>
<p>I have realised that actually my code does cache, but there must be multiple instances created.  In my case I was load testing throwing 500 requests at once, which all came back the same, however when I tested one by one doing it manually, then the numbers did increase.  I am going to look at elastic caching as a better approach going forward as per the answer below.</p>
",https://stackoverflow.com/questions/63097080/can-you-cache-a-variable-to-use-between-invocations-of-a-c-aws-lambda-function,"['c#', 'amazon-web-services', 'aws-lambda']",3044,True,0,3
"After over 1,000 successful calls, getting &quot;An existing connection was forcibly closed&quot;","<p>I am doing some load testing of client and server code.  As it gets going, the first 1,000 calls are just fine.  But (on some runs), I start getting the following exception:</p>
<pre><code>System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.  
---&gt; System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..  
---&gt; System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
</code></pre>
<p>Some searching around shows that a common solution is to add the following code:</p>
<pre><code>System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
</code></pre>
<p>But this seems to be a fix for when none of the calls work.  In my situation, I can get 1,000+ successful calls through before I start getting the above exception.</p>
<p>My real purpose in asking is that after this starts happening, I get a lot of failures of the same kind.</p>
<p>I am wondering if my <code>HttpClient</code> is in a faulted state after this happens?  If it is, how do I fix that?  (My <code>HttpClient</code> is static and if it fails, then all my calls will fail.)</p>
<p>Note: My code runs as a NuGet that needs to run in .Net Framework 4.7 and .Net Core 3.1.</p>
",https://stackoverflow.com/questions/63405481/after-over-1-000-successful-calls-getting-an-existing-connection-was-forcibly,"['.net', '.net-core', 'dotnet-httpclient', '.net-standard-2.0']",374,True,0,2
Performance testing for serverless applications in AWS,"<p>In Traditional Performance Automation Testing:
There is an application server where all the requests hits are received. So in this case; we have server configuration (CPU, RAM etc) with us to perform load testing (of lets say 5k concurrent users) using Jmeter or any load test tool and check server performance.</p>
<p>In case of AWS Serverless; there is no server - so to speak - all servers are managed by AWS. So code only resides in lambdas and it is decided by AWS on run time to perform load balancing in case there are high volumes on servers.</p>
<p>So now; we have a web app hosted on AWS using serverless framework and we want to measure performance of the same for 5K concurrent users. With no server backend information; only option here is to rely on the frontend or browser based response times - should this suffice?
Is there a better way to check performance of serverless applications?</p>
",https://stackoverflow.com/questions/64035750/performance-testing-for-serverless-applications-in-aws,"['amazon-web-services', 'performance-testing', 'serverless']",1205,True,3,3
Spring kafka producer threads keep increasing,"<p>We are using Kafka with Spring and we are currently doing some load testing on the application. Within few minutes of starting the load test Tomcat stops responding, on analyzing the thread dump I am seeing quite a large number of Kafka producer threads and assuming that this could be a reason why application hangs.The number of threads are quite high, i.e. within few minutes there are 200+ Kafka producer threads are there. Is there any way to close these producer threads. Given below is my Spring Kafka producer configuration.</p>

<p><strong>EDIT</strong>:
      In our application we have a event pub/sub and I am using Kafka for publishing the events. <strong>Number of partitions : 15, Concurrency : 5</strong></p>

<pre><code>@Bean
public ProducerFactory&lt;String, Object&gt; producerFactory() {
    Map&lt;String, Object&gt; configProps = new HashMap&lt;&gt;();
    configProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress);
    configProps.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
    configProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class);
    configProps.put(ProducerConfig.PARTITIONER_CLASS_CONFIG, KafkaCustomPartitioner.class);
    configProps.put(ProducerConfig.BATCH_SIZE_CONFIG, 16384);
    configProps.put(ProducerConfig.LINGER_MS_CONFIG, 200);


    DefaultKafkaProducerFactory factory = new DefaultKafkaProducerFactory&lt;&gt;(configProps);
    factory.setTransactionIdPrefix(serverId+""-tx-"");
    // factory.setProducerPerConsumerPartition(false);
    return factory;
}

public ConsumerFactory&lt;String, Object&gt; consumerFactory(String groupId) {
    Map&lt;String, Object&gt; props = new HashMap&lt;&gt;();
    props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress);
    props.put(ConsumerConfig.GROUP_ID_CONFIG, groupId);
    props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
    props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, JsonDeserializer.class);
    props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false);
    props.put(ConsumerConfig.ISOLATION_LEVEL_CONFIG,""read_committed"");
    props.put(ConsumerConfig.GROUP_ID_CONFIG,""custom-group-id"");
    props.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG,60000);
    props.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG,5000);
    props.put(ConsumerConfig.MAX_POLL_RECORDS_CONFIG,20);
    props.put(ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG,600000);
    props.put(JsonDeserializer.TRUSTED_PACKAGES, ""org.xxx.xxx.xxx"");
    return new DefaultKafkaConsumerFactory&lt;&gt;(props);
}


@Bean
public ConcurrentKafkaListenerContainerFactory&lt;String, String&gt; customKafkaListenerContainerFactory() {
    ConcurrentKafkaListenerContainerFactory&lt;String, String&gt; factory = new ConcurrentKafkaListenerContainerFactory&lt;&gt;();
    //factory.setConcurrency(eventTopicConcurrency);
    factory.getContainerProperties().setAckOnError(false);
    factory.getContainerProperties().setAckMode(AckMode.MANUAL_IMMEDIATE);
    factory.setErrorHandler(new SeekToCurrentErrorHandler());
    factory.setConsumerFactory(consumerFactory(""custom-group-id""));

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

<p>Below are my publisher and subscriber code</p>

<pre><code>@Override
public void publish(Event event) {
    //try {
        DomainEvent event = event.getDomainEvent();
        ListenableFuture&lt;SendResult&lt;String, Object&gt;&gt; future = kafkaTemplate.send(topicName,
                event.getMainDocumentId() != null ? event.getMainDocumentId() : null, event);

        future.addCallback(new ListenableFutureCallback&lt;SendResult&lt;String, Object&gt;&gt;() {

            @Override
            public void onSuccess(SendResult&lt;String, Object&gt; result) {
                if(LOGGER.isDebugEnabled())
                    LOGGER.debug(""Published event {} : {}"",event.getEventName(), event.getEventId());
            }

            @Override
            public void onFailure(Throwable ex) {
                LOGGER.error(""Failed to publish event {} : {} "", event.getEventName(), event.getEventId());
                throw new RuntimeException(ex);
            }
        });
    }
</code></pre>

<p>Listener: We have more than one subscriber for an event, so when we receive an event from Kafka we spawn new threads for each subscribers to process that event and when all of them completes the processing we commit the offset. </p>

<pre><code>@KafkaListener(topics = ""${kafka.event.topic.name}-#{ClusterConfigSplitter.toClusterId('${cluster.info}')}"", concurrency=""${kafka.event.topic.concurrency}"", clientIdPrefix=""${web.server.id}-event-consumer"", containerFactory = ""customKafkaListenerContainerFactory"")
public void eventTopicListener(Event event, Acknowledgment ack)
        throws InterruptedException, ClassNotFoundException, IOException {

    if(LOGGER.isDebugEnabled())
        LOGGER.debug(""Received event {} : {}"", event.getDomainEvent().getEventName(), event.getDomainEvent().getEventId());

    DomainEvent domainEvent = event.getDomainEvent();

    List&lt;EventSubscriber&gt; subcribers = new ArrayList&lt;&gt;();
    for (String failedSubscriber : event.getSubscribersToRetry()) {
        subcribers.add(eventSubcribers.get(failedSubscriber));
    }

    CountDownLatch connectionLatch = new CountDownLatch(subcribers.size());

    List&lt;String&gt; failedSubscribers = new ArrayList&lt;&gt;();

    for (EventSubscriber subscriber : subcribers) {

        taskExecutor.execute(new Runnable() {
            @Override
            public void run() {
                tenantContext.setTenant(domainEvent.getTenantId());
                DefaultTransactionDefinition def = new DefaultTransactionDefinition();
                def.setName(domainEvent.getEventId() + ""-"" + subscriber.getClass().getName());
                def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);

                TransactionStatus status = txManager.getTransaction(def);

                try {
                    subscriber.handle(domainEvent);
                    txManager.commit(status);
                } catch (Exception ex) {
                    LOGGER.error(""Processing event {} : {} failed for {} - {}"", domainEvent.getEventName(), domainEvent.getEventId(), ex);

                    txManager.rollback(status);
                    failedSubscribers.add(subscriber.getClass().getName());
                }

                connectionLatch.countDown();

                if(LOGGER.isDebugEnabled())
                    LOGGER.debug(""Processed event {} : {} by {} "", domainEvent.getEventName(), domainEvent.getEventId(), subscriber.getClass().getName());
            }
        });

    }

    connectionLatch.await();

    ack.acknowledge();

    if(failedSubscribers.size()&gt;0) {

        eventPersistenceService.eventFailed(domainEvent, failedSubscribers, event.getRetryCount()+1);

    }




}
</code></pre>

<p>TransactionManager</p>

<pre><code>    @Bean
@Primary
public PlatformTransactionManager transactionManager(EntityManagerFactory factory,@Qualifier(""common-factory"") EntityManagerFactory commonFactory, ProducerFactory producerFactory){

    JpaTransactionManager transactionManager = new JpaTransactionManager();
    transactionManager.setEntityManagerFactory(factory);

    JpaTransactionManager commonTransactionManager = new JpaTransactionManager();
    commonTransactionManager.setEntityManagerFactory(commonFactory);

    KafkaTransactionManager kafkaTransactionManager= new KafkaTransactionManager(producerFactory);

    return new ChainedKafkaTransactionManager(kafkaTransactionManager,commonTransactionManager,transactionManager);

}
</code></pre>
",https://stackoverflow.com/questions/61756563/spring-kafka-producer-threads-keep-increasing,"['java', 'tomcat', 'apache-kafka', 'spring-kafka']",1547,True,2,1
CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed,"<p>This happens on <strong>ReportDocument.Export()</strong> for a PDF generation.
But only sporadically/randomly.</p>
<p>In the overall picture it's not that bad, 1 or 2 errors per day (+10k request), but still this bugs me.</p>
<p>2 different kinds of errors:</p>
<ul>
<li>CrystalDecisions.CrystalReports.Engine.LogOnException: <em>Database logon failed</em>.</li>
<li>CrystalDecisions.CrystalReports.Engine.LogOnException: <em>Error in File</em> &lt; Reportname &gt;.rpt<br />
<em>Unable to connect: incorrect log on parameters</em></li>
</ul>
<p>I see that these errors are quite common in the community, i've found lots of sites with solutions to these error, i've  tried a lot of them, but none have worked so far (one exception i'll mention below).</p>
<h1>Facts</h1>
<ul>
<li>Version used is 13.0.21.2533 (SAP Crystal Reports runtime engine for .NET Framework (32 and 64 bits))</li>
<li>The reports generated work in all environments (even prod)</li>
<li>Some reports randomly/sporadically fail. Although the same (request) report can be generated almost immediately working fine.</li>
<li>No report viewer.</li>
<li>The fact that they work in prod, for me, discards many of the proposed solutions. Regardless i tried/checked them.</li>
<li>No connection to DB, i'm passing a DataSet as the DataSource of the report (multiple tables inside)</li>
<li>I use an &quot;Using&quot; pattern/syntax. I also tried explicitly disposing on Finally (isntead of using)</li>
</ul>
<pre><code>            finally
            {
                report.Database.Dispose();
                report.Close();
                report.Dispose();
            }      
</code></pre>
<h1>Testing/Replicating</h1>
<p>To be able to replicate the issue, i use <em>SOAP UI</em> to Load test the request (1 minute, 2 threads, as many (exactly the same) requests as possible) and from time to time, one fails.</p>
<h1>Error 1. Database Logon failed</h1>
<p>This one is partially solved, i changed from setting the datasource this way:</p>
<pre><code>                report.SetDataSource(rawData);  
</code></pre>
<p>to setting it for each table in the datasource, more or less like this:</p>
<pre><code>                foreach (DataTable dataTable in rawData.Tables)
                {
                    foreach (CrystalDecisions.CrystalReports.Engine.Table table in report.Database.Tables)
                    {
                        if (table.Name == dataTable.TableName)
                        {
                            table.SetDataSource(dataTable);
                            break;
                        }
                    }
                }

</code></pre>
<p>This fix removes almost entirely this error, almost.
I need more aggressive Load testing to get it to fail once sporadically, while previously it failed ,once or twice, each and every time i load tested it.</p>
<h1>Error 2. Error in File &lt; Reportname &gt;.rpt.     Unable to connect: incorrect log on parameters</h1>
<p>With the fix above, there are also few instances of this error (1 or 2 exceptions), also need more aggressive load testing to happen, but occurs more than the above one. before it failed 3 to 7 times per load test.</p>
<h1>Errors</h1>
<pre><code>An exception is thrown: 
     &gt;&gt;&gt;&gt;&gt; Exception details=CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed. 
                        ---&gt; System.Runtime.InteropServices.COMException: Database logon failed.
                        
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       
       --- End of inner exception stack trace ---
       at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()
       at &lt; mynamespace &gt;.RptUtil.GeneratePDF(DataSet rawData, ...
</code></pre>
<p>the other one</p>
<pre><code>    An exception is thrown: 
     &gt;&gt;&gt;&gt;&gt; Exception details=CrystalDecisions.CrystalReports.Engine.LogOnException: Error in File &lt; 
report name &gt;_{1E5E29F7-E5A2-43EA-90E5-D62ECAA19A01}.rpt:
    Unable to connect: incorrect log on parameters. ---&gt; System.Runtime.InteropServices.COMException: Error in File &lt; 
report name &gt;_{1E5E29F7-E5A2-43EA-90E5-D62ECAA19A01}.rpt:
    Unable to connect: incorrect log on parameters.

       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

       --- End of inner exception stack trace ---
       at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()
       at &lt; mynamespace &gt;.RptUtil.GeneratePDF(DataSet rawData, ...
       
</code></pre>
",https://stackoverflow.com/questions/62704280/crystaldecisions-crystalreports-engine-logonexception-database-logon-failed,"['c#', 'crystal-reports']",2802,False,2,0
How to wait until I get a specific response in jmeter?,"<p>I'm doing load testing using JMeter for my gaming application.</p>

<p>First I log in my application by HTTP request and then enter into the game(it is a WebSocket connection).</p>

<p>I successfully hit Websocket and able to send the request and receive a response.
Iam using  WebSocket Samplers by Peter Doornbosch.WebSocket request-response Sampler captures one response at a time.</p>

<p>But in my application for a single request <strong>five</strong> JSON response is returned by the server. I need to capture those five responses. so I used WebSocket read sampler.</p>

<p>If I hit that WebSocket by increasing thread count most of the test cases are failed because of timer issue.</p>

<p>Jmeter sends the next request without waiting for previous reponse.</p>

<p>In my application, if one game ends, then the response is sent by the server. After receiving that only next game request must hit.</p>

<p>But the next game request hit the server before the current game ends. can please help me to sort this issue????</p>
",https://stackoverflow.com/questions/61145598/how-to-wait-until-i-get-a-specific-response-in-jmeter,"['jmeter', 'load-testing']",2709,True,1,1
IOptions configurations throws random NullReferenceException - AspNetCore 2.2,"<p>I have an WebApi app targeting net framework 4.6.1 and using AspNetCore 2.2 :</p>

<p>Setup:</p>

<pre><code>public void ConfigureServices(IServiceCollection services)
{            
    services.Configure&lt;EmailConfig&gt;(Configuration.GetSection(""EmailConfig""));

    services.AddTransient&lt;IEmailService, EmailService&gt;();
}
</code></pre>

<p>Injecting:</p>

<pre><code>public EmailService(IOptions&lt;EmailConfig&gt; emailConfig)
{
    _emailConfig = emailConfig.Value;
}
</code></pre>

<p>The setup works fine at the first look, but under some load testing I have noticed that I get the following error when the DI container tries to get the <code>IOptions&lt;EmailConfig&gt;</code>:</p>

<pre><code>System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Extensions.Configuration.ConfigurationProvider.&lt;&gt;c__DisplayClass9_0.&lt;GetChildKeys&gt;b__0(KeyValuePair`2 kv)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.&lt;ConcatIterator&gt;d__59`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.&lt;GetEnumerator&gt;d__1.MoveNext()
   at System.Linq.Enumerable.&lt;ConcatIterator&gt;d__59`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.&lt;GetEnumerator&gt;d__1.MoveNext()
   at System.Linq.Enumerable.&lt;ConcatIterator&gt;d__59`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.&lt;GetEnumerator&gt;d__1.MoveNext() 
   at System.Linq.Enumerable.&lt;DistinctIterator&gt;d__64`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Microsoft.Extensions.Configuration.ChainedConfigurationProvider.GetChildKeys(IEnumerable`1 earlierKeys, String parentPath)
   at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   at Microsoft.Extensions.Configuration.ConfigurationRoot.GetChildrenImplementation(String path)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.BindInstance(Type type, Object instance, IConfiguration config, BinderOptions options)
   at Microsoft.Extensions.Configuration.ConfigurationBinder.Bind(IConfiguration configuration, Object instance, Action`1 configureOptions)
   at Microsoft.Extensions.Options.ConfigureNamedOptions`1.Configure(String name, TOptions options)
   at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
   at System.Lazy`1.CreateValue()
</code></pre>

<p>Does anyone got trough this type of problem?</p>

<p>Later Edit:
Removing the <code>IOptions&lt;EmailConfig&gt;</code> from the <code>EmailService</code> and injecting the <code>IConfiguration</code> directly and then getting my emailConfigs from <code>IConfiguration</code> manually, works great and solves my problem. 
But still, in order to respect the <a href=""https://en.wikipedia.org/wiki/Interface_segregation_principle"" rel=""nofollow noreferrer"">ISP</a> and <a href=""https://en.wikipedia.org/wiki/Separation_of_concerns"" rel=""nofollow noreferrer"">SoC</a> principles when using configurations, the recommended way to do it by the aspnetcore team is using <a href=""https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-3.1"" rel=""nofollow noreferrer"">Options Pattern</a>, but looks like it is not working fine all the time.</p>

<hr>

<p>I am starting to think that maybe there is a problem with my setup: aspnetcore  2.2 targeting netFramework 4.6.1. I'll try to upgrade to the latest netcore and also change the target to netcore to see if the problem reproduces.</p>
",https://stackoverflow.com/questions/60863618/ioptions-configurations-throws-random-nullreferenceexception-aspnetcore-2-2,"['c#', 'asp.net-core', 'dependency-injection', 'configuration', '.net-core-2.2']",555,False,1,0
How to handle pop-ups in Jmeter automation tool?,"<p>I am trying to perform load testing on particular application form of a portal using JMeter tool. I have recorded the whole scenario using blazemeter tool and exported it into .jmx file. In the JMeter tool, I have imported the file, able to login to the portal through JMeter, and parameterized the whole fields required to fill the application form.The problem is at last, request of all the data against those field is going but in the response I am getting ""Data Failed"", ultimately unable to submit the form through JMeter.This can be due to the pop-up which can not be recorded by blazemeter but it pops up at the time of submission on the actual portal, so **how to handle that pop up in JMeter to submit the form?**I am using apache-JMeter 5.2.1.I am also attaching the screenshots for reference. I am looking forward for help.<a href=""https://i.stack.imgur.com/jCU5s.png"" rel=""nofollow noreferrer"">pop up shown on window</a><a href=""https://i.stack.imgur.com/sANMT.png"" rel=""nofollow noreferrer"">request data shown in image</a><a href=""https://i.stack.imgur.com/Wt5YF.png"" rel=""nofollow noreferrer"">Pop-up shown on actual window</a><a href=""https://i.stack.imgur.com/P4LaE.png"" rel=""nofollow noreferrer"">Logged in successfully</a></p>
",https://stackoverflow.com/questions/60112515/how-to-handle-pop-ups-in-jmeter-automation-tool,"['unit-testing', 'load-testing', 'jmeter-5.0', 'window-tester']",666,False,-1,2
