As with any mobile device, data connectivity is very reliant on a number of factors, including;
1. Your device capability
2. The local networks capability
3. And - having a good signal
4. And - not having network congestion
If the mobile signal is weak or fluctuating data sessions may drop out. If you experience connection issues, always try manually connecting to a different subscribed network if available, or setting your SIM/device to "GSM only". This may give a more stable but slower connection speed.
Note : At the border of 2 countries the signal is often switching between the network of each country causing some network instability.
Same situtation occur when you are on the move like traveling by train in the middle of the country where few antenna are located.