One of my apps that uses the Heroku Redis server for a particular feature stopped working. After some troubleshooting, I found that an instance of Bul

A Spooky Tale of ChatGPT - The Error That Won't Go Away

submited by
Style Pass
2024-10-30 14:00:06

One of my apps that uses the Heroku Redis server for a particular feature stopped working. After some troubleshooting, I found that an instance of Bull Queue Manager failed to connect to the Redis server. Frenzied googling ensued and I came across an update on Heroku's site announcing that it has moved all its Redis mini plan connections to a TLS protocol.

The parameters I'm using for Bull's Queue function need to be updated since they only work with insecure connections, but now Heroku is forcing all apps to use secure connections.

The fix looked straightforward: update the code to use TLS protocol. However, my brain wanted to deploy the solution in the most calorie-efficient way possible. So, I copied/pasted my code, the error message and Heroku's documentation in ChatGPT and asked it to troubleshoot the issue and recommend a solution. Within seconds, I had what I was looking for: a ready-made snippet that I could slap in my code and live happily ever after.

Here was the solution: instead of using const redisQueue = new Queue('redis-queue', REDIS_URL); I should use const redisQueue = new Queue('redis-queue', { redis: { url: REDIS_URL, tls: { rejectUnauthorized: false, // Again, disable certificate verification for Heroku Redis } } });

Leave a Comment