Insufficient memory - local heap is full

Insufficient memory - local heap is full.

Server returns this error message when scheduled agent is calling web service consumer (collecting large data sets from our partner using web service).

Any solution?