Here I am answering my own question.
I think that this happened because of sudden increase in price of spot instances. My bid price was $2 per instance per hour for a m1.xlarge instance.
Snapshot of aws console spot instance pricing:
You can notice the blue jumps in pricing. My bid was $2 and the actual price jumped to $11. Hence my cluster was killed automatically.