S
S
Steely2017-08-04 19:28:12
PHP
Steely, 2017-08-04 19:28:12

How to remove restriction (on connections?) at Ajax script request?

There is a script script.php, there is a page that requests this script via Ajax 30 times at the same time (the script does different actions according to the get parameter).

In theory, this should be asynchronous, but I notice that it works like this for the first 5 together, and then when one is completed, the next one takes its place.

The question is, what do I need to change in the nginx, Apache2 or PHP settings so that all 30 requests are executed asynchronously at once?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Tallmange, 2017-08-04
@p00h

This is a browser limit on the number of simultaneous connections.

E
Exploding, 2017-08-04
@Exploding

Is it possible to somehow optimize and feed these parameters for a smaller number of times? I reason like this: if 30 times - at the same time, then the parameters are already predefined and for example 2 ... n parameter / value does not depend on what is returned as a result of the first request, right?
Then why make 30 requests, if you can immediately transfer all 30+ parameters in json or anything at once, and also return the result in the form of the same json or a string with a pentacle as a separator ... not so important :)
An inner voice says: "Most likely this person does not know how to parse the result into pieces, that's why he makes 30 requests at the same time"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question