danwrong / restler

REST client library for node.js
MIT License
1.99k stars 391 forks source link

Retry causes 'out of memory' error #217

Open osambhus opened 8 years ago

osambhus commented 8 years ago
rest.get(config.edgecast.get_purge_url + purgeID, purgeOptions).on('complete', function(data) {
        if (data.CompleteDate) {
            console.log('Purge completed on ' + data.CompleteDate);
            callback();
        } else {
            this.retry(10000);
        }
    });

Before executing the above code, I'm sending out a purge request to the API and the above code just checks if the purge request was completed (If it is completed, the data.CompleteDate field is valid). I want to retry to check if data.CompleteDate is generated, every 10 seconds.

But it keeps saying FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory and exits.