chdsbd / kodiak

🔮 A bot to automatically update and merge GitHub PRs
https://kodiakhq.com
GNU Affero General Public License v3.0
1.03k stars 65 forks source link

replace asyncio-redis with redis-py #867

Closed chdsbd closed 1 year ago

chdsbd commented 1 year ago

Asyncio-redis is pretty terrible in adverse network conditions. Digital Ocean network connectivity can flake out and the lack of timeouts within asyncio-redis make it easy for the library to cause hangs, which will break Kodiak for users. redis-py's async version (which originally was aioredis) has excellent timeouts for every operation, making it a safer choice. It also has a reasonable connection pool setup where we don't need to have a fixed pool size.

The default timeouts for redis-py async are infinite, which isn't great, but we explicitly set short timeouts.

Hopefully, now we shouldn't see any more hangs, which has been a problem for us for many months.