caden311 caden311 - 1 year ago 82
Node.js Question

Why is my Node express .post being called multiple times, and my res.send() never resolves the $http request?

My request look this -

$'/api/internal/Properties/' + + '/Upload', { Buildings: Buildings })
.success(function (data){

on the server side, this request can take a long time to process. Up to 5 minutes. Before it can finish (res.send()), the $ request is being called again, every few minutes.

When it finally does finish processing, the res.send(data) is never caught on the client side. It's like it just disappears.

Anything would help.

Answer Source

Each browser has it's own http request timeout. So it will not wait for 5 minutes to complete request it would just fail. Browser Timeouts .

In chrome it's 30 or 60 seconds.

In your case i suggest use sockets or something like that to show user what's up with uploading.

Hope this helps.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download