My application seems to hang. What do I do? – Part 1

Defining “hang” is a good place to start.   When people say “hang” they could mean all sorts of things. When I say “hang” I mean the process is not making progress – the threads in the process are either blocked (eg. deadlocked, or not scheduled because of threads from other processes) or executing code…


Bluehat message recall incident: flashback to Bedlam DL3

If you don’t know what Bedlam DL3 means, I encourage you to read this blog entry You Had Me At EHLO… : Me Too! Yesterday, a similar event happened, in a smaller scale though. Someone sent an announcement email to the Bluehat Alert DL with more than 1000 members at the company. The email was…


General Network Error in .Net Framework 1.1

Under some circumstances (such as with certain network bandwidth), you might get a general network error in .Net Framework 1.1 when executing a query that takes longer than SqlCommand.CommandTimeout value. This has something to do with how SqlClient 1.1 deals with timeout. Basically we track the timeout value by decrementing it each time after we…


Understand the problem before you try to find a solution

So far I’ve never written a blog entry that gives out philosophical advices on doing performance work. But lately I thought perhaps it’s time to write such an entry because I’ve seen enough people who looked really hard at some performance counters (often not correct ones) or some other data and asked tons of questions…


Internal connection fatal error when trying to run a UNION ALL query or to call the DeriveParameters method

http://support.microsoft.com/kb/913764/ The KB article didn’t say a lot of details about this bug. Usually the following conditions have to been met in order to trigger the bug: 1. Query must run against sql2000 (Sql2005 works fine) 2. The table name has to include 3 or more dots, ie: [A.B.C.D.E] 3. There has to be an…


I Am a Happy Janitor – Part 1: Finding garbage

Indeed what I do is very much like the job of the janitors – like the ones who clean your building, or janitors you see at a food court, or yourself when you are taking care of garbage at your house. Doubtful you say? Let me prove it to you.   Finding garbage   What…


High CPU use of SqlClient

There was a bug in SqlClient which could cause high CPU use. The scenario is a SqlClient application sends an attention to Sql Server but receives no acknowledgement from the server because the connection is broken. The bug lies in the logic of reading server’s response from the wire. We buffer the incoming data from the wire….


Bill Gates’ Transition

Today Bill Gates announced his transition plans: http://www.msnbc.msn.com/id/13348456/ Essentially in two years, Bill Gates will transition away from a daily role at Microsoft to focus on the charitable work of the Bill & Melinda Gates Foundation. However, he will continue to be the company’s chairman after the two-year transition period. Bill Gates always is my…


Timeout when using SqlBulkCopy

For certain size of data, SqlBulkCopy.WriteToServer() may throw a timeout exception, although it won’t happen when MARS is turned on. The problem is caused by a bug in the code for handling some boundary scenarios. The workaround is to apply this patch: http://support.microsoft.com/kb/913177/