【Net-ERR_FAILED】What can cause Chrome to give an net::ERR_FAILED when Large number of requests occured by http2s? - ajax

When I send many requests in parallel, the browser gets "net-error". Occasionally some requests fail. The log shows that sending the request header failed. How to deal with it?
none of requests fail.

Related

Response code: 503 Response message: Service Unavailable

I have given two url in csv file and trying to load that in jmeter. I am getting 503 response code.
As per HTTP 503 status code description
The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code indicates that the server is not ready to handle the request.
Common causes are a server that is down for maintenance or that is overloaded. This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, contain the estimated time for the recovery of the service.
Note: together with this response, a user-friendly page explaining the problem should be sent.
Caching-related headers that are sent along with this response should be taken care of, as a 503 status is often a temporary condition and responses shouldn't usually be cached.
So I can think of at least 3 possible issues:
Your server is really overloaded, you can try checking Response Data tab of the View Results Tree listener - if you're lucky - you will the the aforementioned "user-friendly page explaining the problem"
Your request is malformed and server is sending 503 response instead of 4xx which indicates client-side error. Double check what URL(s) you're trying to open by looking into Request tab of the View Results Tree listener and try to open it in the browser. If you're building the URL from parts (i.e. host, port, protocol, query string, etc.) - you might want to check if the values are correctly read from the CSV file using Debug Sampler
I fail to see HTTP Header Manager in your Test Plan, some servers check the client Headers, for example User-Agent or Accept and may report an error if the required header is missing (i.e. indicating that the browser is not supported)

Jmeter - Internal server error 500 in jmeter response code

I have recorded script in jmeter V3.3 via IE browser and then done correlation. When I run this script, then it is receiving internal server error 500 in response, however it works fine manually in IE browser and also while recording this scenario, it does not occur.
I also cross verified Header manager with Request Headers in network IE F12 Developer tool and it is uptodate.
Sampler Request
Http Get Request
It is simply Get request. I really appreciate for your help to handle this error in jmeter.
I hope you have compared both Request Headers one from IE Browser and from JMETER request headers to check if anything is not missing to pass. And also along with any dynamic id is not missing.
You are likely not checking for expected results with each step. As a result, you are receiving an HTTP 200 correct response page prior to your HTTP 500, but the content of the page is out of context with the expected results for the business process. When you make your next request the state of the application is not appropriate to your request. As an unhandled condition by the developer you are greeted with an HTTP 500 screen dump.
Most likely cause: Unhandled dynamic data component.

Chrome firing two OPTIONS requests on CORS preflight

When doing CORS requests that require preflight, they fail to work on our network. Instead of Chrome making two requests, the OPTIONS and PUT, it fires two OPTIONS requests that are exactly the same, this ends up in the following error:
XMLHttpRequest cannot load http://server/api/foo. Response for preflight is invalid (redirect)
Digging into the problem, there are two things that stand out.
If I turn on Throttling in the Network section of the Chrome developer tools, things work and the OPTIONS request is followed by a PUT.
Under the timing tab, it almost looks like as if it tries to fire both (First request,
Second request) requests simultaneously. Despite the fact that a request is queued at a later time, the Started At time shows it at the same request as the initial OPTIONS request.
The throttled working, and non-working requests look fairly similar for comparison.

Prevent browser from repeating long post requests

According to the HTTP 1.1 spec, browsers should retry a request if they pass a certain time limit or if an error response is received. POST requests are no exception.
Occasionally, slow connections combined with a processor heavy request can cause an ajax POST request to time out, and the browser will fire a second POST request with the same data. This leads to unexpected and erroneous behaviors. Is there any way to prevent that browser timeout from triggering and firing a second POST request?
Based on my understanding you can't restrict the client to stop automatic retries.
The best option is to handle the identical requests in the server side by using unique GUID's.
https://blogs.oracle.com/ravello/beware-http-requests-automatic-retries/comment-submitted?cid=b956dee8-7352-4d88-ad40-71ff9fd1eb53

Keep-alive problems in Internet Explorer 11 in a ajax application

I have a web application that communicates with the server with AJAX. I am using https and SSL and keep-alive is set to 10 seconds.
Sometimes the user is sending a request to the server exactly when the keep-alive time expires. When this happens a new SSL session is created. This is all fine.
After this happens, the browser (Internet Explorer 11) is resending the AJAX request.
But now strange things happens. The browser is only sending the headers of the request. No body. The server first waits for a body that never arrives. Finally the server is aborting the request and the client gets a exception with http status 0 with message: Network error.
Some say this is normal behavior when using SSL and keep-alive and that this must be handled in the webb application. Other say this is a not correct behavior in Internet Explorer 11.
All I can see is that the server cant reuse a body of a request sent on a previous SSL session. The browser need to resend the entire request, but this is not happening.
If I catch the exception in the application and resends the request to the server, everything is working again. But it feels very strange to catch all http=0 in and resending them. Could also be dangerous from a application point of view.
The application only works in IE, so I cant compare with Chrome and FF.
My question is: Is this normal behavior or have I perhaps some incorrect configuration in the browser or on the webbserver?
When the server closes a connection at exactly the same time as a new request on a keep alive connection was sent, then it is not clear if the server received the request and acted on it or not. Therefor only requests which are considered idempotent (i.e. not change anything on the server) should be automatically retried by the client. GET and HEAD are considered idempotent while POST not.
Thus if the client automatically retries a GET or HEAD this would be correct behavior. Retrying a POST would be bad. Resubmitting a request without a body which originally had a body (like you claim but don't prove) would be a bug.

Resources