I want to make multiple AJAX calls to my RoR application, the thing is that the first AJAX call is to an action which takes a long time to return a value, does the first call prevents from the other calls from being executed? My question is directed to the server side, if the server is still "working" on the first call, is he available to the other calls?
Any thoughts?
Asked
Active
Viewed 373 times
0

Ran
- 3,455
- 12
- 47
- 60
2 Answers
1
Depends on the browser: check out this question: How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers?
1
That depends on the number of processes your server is able to run. For example, if you use Passenger, you can define a minimum and maximum number of processes via the --max-pool-size and --min-instances command line arguments.

rausch
- 3,148
- 2
- 18
- 27
-
Sorry for the rookie question but how do I change these values? – Ran Feb 16 '11 at 21:28
-
Do you run Passenger? If so, where and how? You have to start passenger as follows from the command line: `passenger start --min-instances X --max-pool-size Y` with X and Y being the min and max number of instances. Bear in mind that you probably need some other solution (e.g. Delayed::Job) if you expect some more users for your application. Otherwise you will block your server with several long running tasks. – rausch Feb 16 '11 at 22:00