Category

Debugging

Azure, C#, Debugging

When Redis times out in an application but Redis is fine: The .NET Edition

Did you read When Redis times out in an application but Redis is fine: Lessons from a Real-World investigation and think, “Great story, but we’re a .NET shop”? Fair enough! This is the companion piece. The investigation happened on the Java side, with the Lettuce client, but the lessons travel well, and most of them map neatly to StackExchange.Redis, the main Redis client library for .NET. A quick recap, in case you haven’t read it. An application running on Kubernetes saw intermittent client-side Redis timeouts while Redis itself looked healthy. The clearest cause was freshly started pods, where connections to each shard were opened on first use just as CPU throttling slowed everything down. Two other patterns showed up too,…

Read more
Azure, Debugging

When Redis times out in an application but Redis is fine: Lessons from a Real-World investigation

This post is a friendly recap of a real Azure Managed Redis investigation Some incidents teach you more than any documentation page ever could. This one started with a few intermittent Redis timeouts. This grew into a deep investigation that touched Kubernetes CPU limits, Java client internals, cluster topology, and even the limits of what you can simulate on a managed service. One symptom, three very different stories. The customer stays anonymous, because the lessons matter more than the logo. What’s left is the part you can reuse: what happened, what we learned, and tips and tricks for testing. Along the way, we try to showcase how you can look beyond the error message. Settle in, because this one has…

Read more
Azure, Debugging, Web, WebApi

Debugging a managed identity connection to Azure SQL in Azure App Service using containers

So you’ve been eager to deploy your containerized web application that you’ve been working on for a while, to Azure App Service. You follow the best security practices which means you’ve setup your connection to your Azure SQL database using a managed identity. Upon loading your application, you get a dreadful exception that you can’t connect to the database. You then wonder, is this a database permission problem or some another problem, such as the application cannot connect to the database using its managed identity. This problem is even tougher to diagnose in applications such as Custom Off the Shelf (COTS) that you don’t have the source code. Rest assured, this happen to the best of us (yes, even me!)….

Read more
Debugging, Tools

Changing requests status codes to test your front-end behaviors

A developer I work with came across an interesting problem where he needed to test the error handling on the front-end side of a SPA without adding extra “hacks” in the APIs that were consumed by the front-end. I helped him with this task, without adding “hacks”, by using Fiddler. Setup Download yourself a copy of Fiddler. Once installed, you need to configure Fiddler to intercept and decrypt HTTPS requests (as I hope your APIs are chatting on HTTPS). To do so, go in Tools -> Options and under the HTTPS tab, check Capture HTTPS CONNECTs and Decrypt HTTPS traffic and select …from browsers only. Accept all the dialogs that come after checking all of those. You will see that…

Read more