Is it possible to set per request timeouts on queries or mutations? - apollo-server

I know its possible to set the timeout at the server level.. but can I dynamically set a timeout on individiual requests from say an input variable specified by the caller?

Related

How to set idle timeout in quarkus when we limit the maximum number of http connections

https://quarkus.io/guides/http-reference#http-limits-configuration
quarkus.http.limits.max-connections
The maximum number of connections that are allowed at any one time. If this is set it is recommended to set a short idle timeout.
what does this exactly mean and what is the property to set the idle timeout?
It means that Quarkus will limit the number of open HTTP connections to whatever you have set.
The reason we recommend to also set a low idle timeout via quarkus.http.idle-timeout (depends on the application, but you probably want something in the low seconds), is that if you have idle connections sitting around and have the number of maximum available connections, you could run out of connections very quickly.
P.S. All Quarkus configuration options can be found here.

display session timeout interval in sinatra

I have a sinatra (ruby) based web application which is used to control the workflow for end users.
It appears there is one task that can take so long that the session is nil at the time it is ready to perform the next step. It results in an error message and the task is not completed properly.
I want to increase the session timeout (if it is possible at all). But first, since I have not explicitly set it, I want to know the actual value of the timeout interval. Is there a way to access and print that?

Multiple user login in JMeter

I am trying to perform load testing on NodeJS application, the application allows single login session for an user.
But, when i tried to perform load testing with 8 concurrent users (using the same credentials) it was working.
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.
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.
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 ?
Make sure you have set the options for CSV Data Set Config as All Threads for Sharing mode and provide a minimum ramp-up period (say 1 second) so that each thread reads the CSV lines properly without clashes.
For the question why it worked 8 concurrent sessions , where you allow only single session from UI - My guess is you used the same credentials for all 8 users - so server might have considered it to be 8 parallel requests from the same user. It depends on how session is maintained. For eg., if it was with a session-cookie , then If you had 8 different cookies it might have failed. But this is only a guess, as I don't know how its done in your app.
JMeter acts as follows:
All threads are started within the bounds of the ramp-up period which you define in the Thread Group
Each thread starts executing Samplers upside down (or according to the Logic Controllers) as fast as it can
JMeter waits for previous request to finish before starting next Sampler
When the thread doesn't have any more Samplers to execute and loops to iterate - it's being shut down
If you observe the situation when this or that logic was used more than another, most probably the response time for the login was less.
You might want to check the size of the response as for successful requests it should be more or less the same and it might be the situation when the server returns HTTP Status code 200 but response body contains errors, to wit some logins may fail silently, if this is the case it makes sense to add a Response Assertion to add some extra checks, i.e. presence of "Welcome" text or "Logout" link or absence of "error" text or whatever.
What i could understand is you are trying to achieve 8 session each user.in order to do that you have to make 10 concurrent threads and 8 iterations that is how you will achieve 8 session for every credentials.
But of your requirement is to run 80 concurrent users then try to make 80 users and run the test.

Jmeter http request connection timeout after 180 concurrent users are passed

We are getting connection timeout for http request after 180 concurrent users are passed? How to handle concurrent users? We are using single login credentials for all 500 users ? Will that effect the flow
We are getting connection timeout for http request after 180 concurrent users are passed? How to handle concurrent users?
What is Thread Group settings Ramp-Up period and do you have Timers in your test?
You can play with different Thread Group types to simulate the actual user behavior as best as possible, because it is a very important. I suppose for now you have all users come in the same moment, so that's why you get connection timeout. So, try to do this:
Setup Ramp-Up period, suitable for you situation.
For instance, if you configure Thread Group to have 100 threads, and set Ramp-up Period to 0 (or to a small number), then all the threads would start at the same time, and it would produce an unwanted spike of the load. On top of that, if you set Ramp-up Period too high, it might result in "too few" threads being available at the very beginning to achieve the required load.
Add Timers to simulate User behavior.
Try another Thread Group types
We are using single login credentials for all 500 users ? Will that effect the flow
Actually, it depends on the application under testing. Better to ask your developer how it deal with multiple user authentication.
But to simulate the actual use of the system is better to use different users. Youu may store and read login and password for them from csv file with CSV Data Set Config

How to send multiple requests simultaneously with dynamically changing resource in jmeter?

I need to send multiple post requests simultaneously. And the problem is that transaction id in url should always be unique.
I added Synchronizing timer to send requests at once and added BeanShell PostProcessor to increment transaction id after request is sent.
But this works only if requests are executed one by one. How to increment transaction id if I need to run requests all at once?
Just use __counter() function in "global" mode like ${__counter(FALSE,)} instead of manually incrementing the "txnId" variable:
Demo:
See How to Use a Counter in a JMeter Test article for more information on generating incremented numeric values in JMeter.
Going forward remember that you need to implement some form of inter-thread communication to ensure that the same variable is not updated by 2 threads at the same time.

Resources