Code stops after some time using delay

sounds like you're using an external supply rated at 5V to drive both the arduino and servos. (still potentially a problem) (See Feeding power to Arduino)

you're not driving the servos thru the on-board regulator of the Arduino. right?

i hope you see it would be better to provide a higher voltage to Arduino Vin and let it's on-board regulator supply the processor and either power the servos directly from the external supply or thru a regulator