There are list of items in the array. For each Item we need to fetch data from the server on componentMount. All requests are triggered in parallel but the request are getting stalled. All requests use same connection id as well. The target domain is in HTTP 2 as well. Last request is stalled for almost 4s. Do anyone have any idea?
API calls:
Last call(almost stalled for 4s):
Request should not stalled.
Related
The situation is next: I need to run the performance tests using jmeter. I have setup several Graphql requests, tested them and they work perfectly. The idea of the flow is next:
The user login to the platform using graphql mutation, and in response headers receives accessToken, which is valid for an hour.
The next graphql request must parce the generated token, and perform the next mutation using this token.
The idea is to test the platform with 250k requests, which takes more than 1 hour, and as you probably understand - the token is expired.
What I have done within my script:
I've created 2 thread groups. In the first, there is a Flow is Control action element, which is setup to pause duration for 3600000 msec. This means that it will run the Login request once per hour.
I'm scraping the token with JSON extractor, and parcing it using the BeanShell post-processor, by the following command:
props.put("accessToken", vars.get("accessToken"));
Second thread group has a Graphql request to perform the 250k requests to the server and uses the token value from HTTP headers:
Bearer ${__P(accessToken)}
Everything works fine, accept the fact, that I don't know how to setup the scenario, where the thread group with login will finish its run, after the second thread group will complete 250k requests.
I've tried adding the loop controller to Login, set as infinite, but the thing that once the second group will complete 250k requests - the run won't be finished, as the Login will be running forever once per hour.
Any ideas?
You can add a Loop Controller or Throughput Controller and configure them to execute these 250k requests followed by Flow Control Action Sampler configured like:
When the sampler is reached - it will tell all the threads in all thread groups to stop.
Also be informed that since JMeter 3.1 you're supposed to be using JSR223 Test Elements and Groovy language for scripting so it makes sense to consider migration now. Storing a property once per hour with 1 thread is not something you should be worrying but for more resource intensive tasks Groovy behaves much better (for example it has built-in JSON support so you can discard the JSON Extractor)
In Microsoft Azure Logic Apps, I have a do until loop which loops through a get request until it is completed. But the HTTP Get request is giving the following error to do with timeout. It seems that even with 4 retries within 2 minutes, the http get request times out.
BadRequest. Http request failed: the server did not respond within the
timeout limit. Please see logic app limits at
https://aka.ms/logic-apps-limits-and-config#http-limits.
ActionFailed. An action failed. No dependent actions succeeded.
4 retries occurred.
Until Loop Control elaboration
I am building a webhook to connect Shopify with my dispatch.
Shopify Webhook sends a json request and wait for 5 seconds, if it doesn't receive 200 back, it terminate the request and try another one.
My server at the moment handle this straightaway
receive a shopify request
sorting order data from shopify
send request to dispatch server
check response from the server
response to shopify
with this sometimes it takes slightly longer than 5 seconds, so shopify send requests again while the server is updating the dispatch.
What's the best solution to fix this?
I am thinking two solutions
a. Response 200 back to shopify first then process dispatch (I am not sure how to do this with python2.7)
b. Create a database to store shopify request, so shopify request just create an order record then it will receive 200 back (which should take less than 5 seconds). With this set up crontask or celery task to update dispatch
Any suggestions?
Better to use task queues. Use celery to do time taking tasks in background. As soon as you get the response from shopify, give your task to celery so that it can run the tasks in background, then you can send the 200 response back.
Something tells me this is trivial, but better safe than buggy.
If I have an ongoing AJAX request, say request A (and server is still to send response), then I fire another request to the same AJAX performing call B, do each of these responses come back normally, or does the XMLHttpRequest object only takes care of one at a time (where it either ignores the first request (A) once the second becomes the 'active' request?
Or does it ignores the second (B) because the XMLHttpRequest object is already 'busy' with A)?
I already have an "array of requests" plan, where I queue requests, and once the callback is triggered, it scans that array for further waiting requests if needed, but I am not sure I need this.
AJAX is a generic acronym meaning 'asynchronous javascript'. It means that you can run any number of AJAX requests concurrently. Any modern javascript framework should handle multiple concurrent requests correctly.
Behavior of my application:
HTTP Request Login
..JSON Path Extractor - Im extracting the session id
Debug Sample - Checking the session id
HTTP Request -- Im passing the session id to these requests
HTTP Request -- Im passing the session id to these requests
HTTP Request -- Im passing the session id to these requests
If I run the above script for one time Im getting the expected results above requests are passing step by step process.
If I run the above script with - Number of Threads as 5 .Then Login is hitting for 3 times other urls hitting for 2 times.
I need to run the above script one order for number of times.
I'm not seeing any regular expression extractor which you would need to pass in the session ID from one request to another. Also, if your back end uses cookies make sure to add the http cookie manager.
Here are some good JMeter getting started videos which also cover what you're trying to do:
http://blazemeter.com/blog/jmeter-tutorial-video-series