Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backbone fetch async timeout not taking effect

I am trying to do a fetch on a large backbone collection that involves some server side processing.

I tried setting timeout to 0 (for a infinite timeout) or to a large value:

aCollection.fetch({
    // ...
    timeout: 500000
});

// or:

aCollection.fetch({
    // ...
    timeout: 0
});

…but neither of them are taking effect; the GET query involved during the fetch operation times-out every 2 minutes.

Is this a browser timeout over-riding the fetch async options? is there any work around for this?

like image 403
dcod35 Avatar asked Mar 01 '26 10:03

dcod35


1 Answers

I got this problem too and it was due to node default timeout (I was using expressjs). It's probably not the best solution but I changed the server timeout. this.server.timeout = 240000; (4minutes)

like image 133
François Richard Avatar answered Mar 04 '26 01:03

François Richard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!