Improvement on memory management

The memory management has been improved by pacing the number of items in the export queue and handling situations where ION API Gateway is busy.

2221564