I use Memorystore from Python and get "TimeoutError: Timeout connecting to server" few times a day.
My initial configuration is:
store = redis.StrictRedis(host=IP, port=PORT, socket_timeout=0.5)
# the following line invokes the error
Memorystore and VM is in the same region.
Should I increase socket_timeout value?
I'd prefer not to increase the timeout much. I'm afraid that it won't help and the program will be waiting too long. It's the part of time critical code.