fix hanging and crashing issue caused by storing huge responses to memory