December 20, 2007

You Can Guess, or You Can Know

This happens to me a lot:

"Hey this web service never gets invoked even though my client sent the message"
"Hey this code hangs for like 90 seconds intermittently"

There are two ways to solve this problem:

  • You can guess: Sometimes this works. You can try different stuff, pour through logs, blame it on the sys admins (my favorite). If your lucky you may come upon the problem. I usually do this for about a minutes.
  • You can know: Why guess when you can know? If you're in doubt about a SOAP message, or just regular HTTP traffic getting through or about its contents it takes all of 30 seconds to know. Wireshark and TCPMon are your friends. Why guess what the SOAPAction header is when you can know? The same thing can be applied to Java. Why guess where the code is hanging when you can do a thread dump (stack trace) and know. At my old job we eventually left our sys admins with standing instructions that if something was going wrong to run a "kill -3" on the JVM before doing anything to fix it (usually a restart) so we could get a look at what was happening.

0 comments: