Why would rasagullas break while cooking?
I think the water content of the rasgullas cause it to break.

To make sure that they're ready, after you drain the water from the paneer, take a bit of paneer on your palm and knead it with your thumb for about 40 seconds. You should be able to roll out a firm yet smooth ball off it. If you can't form balls, it means you will have to squeeze out more water from the paneer. In the end you should have something like a soft dough. 

It takes a while to get it just right. If you can't make perfect balls in your first few shots at it, you can make rasmalai/ kheer/paneer pedas out of it, so it won't be a wasteful disaster after-all.  

Refer to these articles/videos: 
Sources : 
1, 2, 3, 4