Jan 18 2008

C L O V E R F I E L D

Best suspense / monster movie I’ve seen in years! Simply amazing! I don’t want to give anything way, but I do want to stress to you that you need to see it. Minus the cricket chatter it was freaking awesome! I think I’m going to have to go see it again!


Jan 18 2008

The Most Beautiful Sight

Around 4:45pm, I was able to witness the most beautiful sight! Something that I’ve been wanting to see. Scratch that, something I needed to see for over 2 weeks now.

For over 2 weeks straight. Literally, all day, all night, and sometimes overnight all-nighters, I spent trying to figure out the database issue that has been causing so many problems with BodyMod.org.

For all this time, my DB server would run at 100% CPU utilization, and with throwing up errors that only returned 3 sites to troubleshoot from in Google. I tried everything. I rewrote my code (a whole hell of a lot), converted a lot of my sql statements in code to stored procedures, added more ram to the server, changed pagefile settings, messed with IIS settings, modified database connecting code, added / messed with connection pooling though .NET to my DB server, created new indexes, reindexed the old ones, changed network configurations, changed database security privileges, installed countless patches, defragged the drive, and tried every server hack under the sun to get it to work. I ran the SQL Analyzer, profiler, tuning wizard. Nothing.

My web server would run nicely for about 1.5 - 2.5 hours and then shit the bed with constant ‘Insufficient memory to run that query’ statements to a point where the database services would just seize and die. This of course required me to login and start it manually (the automatic “fail-safes” never kicked in). On top of that, my error logs would have this message 20-30 times per second(!) for an entire day. We’re talking log files in the GB range:

2008-01-17 03:41:48.43 spid    The query notification dialog on conversation handle '{GUID}.' closed due to the following error: '-8470Remote service has been dropped.'.

I am posting this so that if anyone else has this problem, you’ll know what to do. The fix? Reinstall SQL server. Yep. I backed it all up, wiped it out, and reinstalled it from scratch. Don’t just unmount and then attach the DB’s either. Backup, then Restore.

What did I finally get after all this BS? The most beautiful site…

Picture 2.jpg

I guess the good that came of this is that I now have an extremely fine tuned website, I know more about SQL memory management than I would ever need to know, I can trace a SQL server like a champ, and I learned how to create stored procedures. So I guess it’s not all doom and gloom, even though there was a point where I was just going to flip the switch and say “fuck it” (after I’d been up about 48+ hours straight staring at SQL Logs and a green wavey line about a centimeter higher than would have preferred.)

I’m also hoping that it stays this way. I’m just going to have to keep my fingers crossed for the next few days.


Jan 15 2008

It’s Official…

This year’s apple keynote was lame.

The only real announcement worth anything is about the MacBook Air (which was leaked by wired yesterday). It’s a neat toy, but here’s the downsides:

- No Ethernet port
- MacBook style keyboard
- Trackpad is ginormous
- 64GB SSD drive is $1000 extra!
- Superdrive is external and extra
- Only 1 USB port
- adapter needed for DVI (ie. Micro DVI)
- Processor is a 1.6
- Pimped out one (1.8ghz w/ SSD) = $3,100

I also just noticed that they’re selling a USB / Ethernet adapter for $30. Umm, but won’t that eat up the 1 USB Port?

It’s cool that it’s super thin, has a battery that will last forever, and is “Green” (i’ll rant about that new wave of b.s. later), but seriously. You’re going to have to keep it in a bag with your superdrive and all the various add-on adapters that you’ll need (sold separately of course).

Boo…

design_gal08_20080115.jpg

Jan 9 2008

IIS 6 Page Compression

While looking into ASP.NET caching techniques, I ran across this little gem on IIS page compression using gzip.

IIS 6 has a built-in capability of compressing pages and / or content through gzip before sending it to the requesting client to cut down on bandwidth usage and overall network performance.

It’s also a smart process. First, there’s two types of compression that it will do. If it’s a static file (no dynamic content), it’ll zip up the file and store it in a temp space to send every time the page is requested. This way the CPU overhead is very minimal because it only has to compress the page once. The other is for dynamic pages. For these, it’ll compress the page as requested on the fly. This has a higher CPU usage, but worth it overall.

On top of that, it also checks the users browser for gzip compatibility before it even compresses the file. If it’s compatible (IE, Firefox, etc), it’ll send the compressed version. If the browser can’t handle compressed content, it’ll send the non-compressed version. Rock!

The downer is that it’s not very easy to setup (kinda). Meaning that there’s no checkbox anywhere to enable this and configure it. The guy over at AngryHacker.com (article above), wrote a great batch file that enables it and sets it up in one quick swoop. Make sure to save the BAT file in C:\Inetpub\AdminScripts

IISreset.exe /stop 

cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true
cscript.exe adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "ppt" "xls" "xml" "pdf" "xslt" "doc" "xsl" "htc" "js" "css"
cscript.exe adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions "htm" "html" "txt" "ppt" "xls" "xml" "pdf" "xslt" "doc" "xsl" "htc" "js" "css"
cscript.exe adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx" "ashx"
cscript.exe adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx"
cscript.exe adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDynamicCompressionLevel "9"
cscript.exe adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDynamicCompressionLevel "9" 

IISreset.exe /restart

If you’re not familiar with IIS, this script will stop your web server while it implements this and then start it back up once it’s done. Also, the default compression level is 0 (0-10), and this script sets it to 9. I have mine set at 9 and didn’t really notice much difference in CPU utilization.

Good stuff eh?


Jan 7 2008

QuickLook Plugins

If you have a mac running Leopard (OS X 10.5), you’re probably already familiar with the freaking awesome QuickLook feature. This what’s triggered when you press the spacebar while a file is selected.

I just found out that there are actually plugins for QuickLook to enable you to view even more formats!

Here’s a list of ones that I’ve grabbed so far:

- BetterZipQL: Allows QuickLook of contents within a Zip file
- colorxml: Color formats XML docs
- Folder: View the contents of a selected folder
- QLColorCode: Color formatting of various Code docs

Find a bunch of plugins at QuickLookPlugins.com

To install QuickLook plugins, you should copy the “*.qlgenerator” file into /Library/QuickLook/ or ~/Library/QuickLook/. Note that “*” in the filename will vary based on exactly which QuickLook item you choose to install.

If a QuickLook folder is not present, feel free to create one.

After copying the file into the directory you will need to logout and then back in to your account for it to become active. Alternatively, you can prevent having to logout by running the following command in Terminal:

qlmanage -r

This will force OS X to search /Library/QuickLook and ~/Library/QuickLook for plugins and load them accordingly.

6C965E06-3ED9-403F-A591-283CAB830E11.jpg

Jan 5 2008

ROWCOUNT(), You Are My Hero!

I’ll go into the details and some sample code later, I have a bit of a crisis on my hands right now, but in short the ROWCOUNT() feature in SQL 2005 ROCKS!

I just got my queries down from 40-50 seconds (i think that’s the prob I’ve been having) to 183 milliseconds! Hells Yeah!

More on this awesomeness later =)


Jan 4 2008

Favorite 5 Second Movie Summaries


Jan 4 2008

SQL 2005 Eats All My RAM!

I had added a bunch more RAM to my database server (MS SQL 2005) and it eatted it all up! This isn’t an exaggeration either. It consumed every little byte! So my question… why?

After a lot of hair pulling and then a little googling, I found my answer. By default SQL 2005 consumes all available memory. Not cool. To set a limit, just open up the SQL Design Console and Right click on the server instance, then choose Properties. You’ll see a Memory tab on the left. In there you can set it to use min / max MB of RAM.

After I updated it to 512 less than what I had, my server ran much smoother. The problem was that SQL would eat up all the available ram and then not give any back to other apps and services that needed it to run properly.

Fook!