BUG: Spark gives up on reconnecting too easily

Spark has some (uncustomizable) number of reconnect attempts before it gives up.

I am often disconnected from my server, but I don’t want it to stop trying to reconnect. It might take me 12 hours before I get back on the network and at that point I want Spark to reconnect to the server automatically. I dont’ want ot have to remember that I’m not online with Spark and people have been trying to text me.

I’d also like to be able to customize the time between reconnection attempts.

Thanks

My sparkseems to try connecting 3 times at 10 second intervals. Is this soemthing that can be set in the spark.properties or elsewhere? Would like to have all clients try 3 times at 60 second intervals to give enough time for the occasional reboot, etc.

If you get disconnected from the server for 12 hours, that’s a bit extreme in my opinion. Spark does have a good few attempts like jefferyvsmith said.

It’s only extreme if you ignore real-world use cases like the one I’m giving you.

What do you gain by having Spark give up so easily? Go ahead and let it try to reconnect forever. It doesn’t hurt. Skype doesn’t give up; I’m sure it doesn’t hurt Skypeit helps the user. Why would Spark be any different? Sometimes we just don’t have connectivity for a long timeit happens.

Well, ideally it can become resource intensive and generally, after 3 attempts Spark knows it’s not going to work so essentially it’s like starting a car, if it doesn’t work after the 3rd attempt chances are it wont work.

Essentially, what could be done about this is to set some sort of preference on the reconnect page, maybe like “Reconnect until Success”.

Maybe just adjust the reconnect logic. If it does not connect after 3 30 second retries, it then tries every 30 minutes for up to 12 hours or someting?

jeffreyvsmith wrote:

Maybe just adjust the reconnect logic. If it does not connect after 3 30 second retries, it then tries every 30 minutes for up to 12 hours or someting?

Yeah, i have suggested that in new features requests thread.

Okay, so, basically i’ve slated it for 2.6.1 and can be viewed here: SPARK-1002