It is not easy to find the causes for a replication timeout. If it doesn't happen frequently, I would say some network contention, GC pause or some write intensive/high contention case. If you have logging enable, you can attach the logs and I'll give take a look to see if something strange is happening.
To increase the replication timeout, you need to set the attribute 'remote-timeout' when define your cache. For example:
<replicated-cache ... remote-timeout="20000">
<distributed-cache ... remote-timeout="20000">
The values are in milliseconds and the default is 15 seconds (it is enough for most uses cases).