This message was deleted.
# ask-questions
w
This message was deleted.
f
I can check with the team on the desired behavior for the proxy server
🙏 1
I will say that our SDK implementation also works with fallbacks so you can set a sensible behaviour should things go wrong.
h
Hey there. The proxy can be configured to stay up indefinitely while serving stale data whenever the API is down. Just set a couple of environment variables:
Copy code
CACHE_ALLOW_STALE=1    # this is already on by default
CACHE_EXPIRES_TTL=999999999999    # infinity...
We'll look into refining this use case (documentation, making this the default setting).
a
This don't work for me. I have set the environment variables as your recomendation, but the proxy still crashes with the same error message as above when I kill the GB API. I have tested without any probes that might interfere with the proxy, but the error still occurs. Are there any other settings that I need to set to make this work?
h
Does the crash happen while a new instance is spinning up and the API server is already down? Or does a running instance start crashing once the API server goes down? I'll investigate further...
I think you're right, there are some occasions where a Redis-backed proxy will fail to hydrate state when the API server is down. Working on a patch now...
I published a new version of the proxy, would you be able to update to 1.1.11 and see if your proxy performs better during API outages?
a
@happy-autumn-40938 Things look much better now, I haven't run all our test scenarios. But the proxy stays alive now 👍 Thanks for your help, and ill get in touch if we find any other issue.
h
great to hear it, thanks
104 Views