Welcome! Log In Create A New Profile

Advanced

How can I run more than one process on Windows?

August 20, 2014 10:35AM
Despite sending an async request to the server over AJAX, the server will not respond until the previous unrelated request has finished. The following code is only broken in this way on Nginx, but runs perfectly on Apache.

This call will start a background process and it waits for it to complete so it can display the final result.

$.ajax({
type: 'GET',
async: true,
url: $(this).data('route'),
data: $('input[name=data]').val(),
dataType: 'json',
success: function (data) { /* do stuff */}
error: function (data) { /* handle errors */}
});

The below is called after the above, which on Apache requires 100ms to execute and repeats itself, showing progress for data being written in the background:

checkStatusInterval = setInterval(function () {
$.ajax({
type: 'GET',
async: false,
cache: false,
url: '/status?process=' + element.attr('id'),
dataType: 'json',
success: function (data) { /* update progress bar and change status messages */ }
});
}, 1000);

Unfortunately, when this script is run from nginx, the above progress request never even finishes a single request until *after* the first AJAX request that sent the data gets it's own response.

Basically, it appears that the nginx server can only handle 1 open request at a time on Windows. I don't have this problem at all on Linux production servers.

Is there anyway to configure nginx so I can use it on my local Windows 8.1 development server?
Subject Author Posted

How can I run more than one process on Windows?

eComEvo August 20, 2014 10:35AM

Re: How can I run more than one process on Windows?

itpp2012 August 20, 2014 11:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready