Arduino hangs : if buffer is full how to solve this?


I am working with arduino and gsm modem continuously so data transmitting and receiving is continuously going on and if the internal buffer is full arduino get hangs and stop there or continue from setup(); please help me how to solve this?