Blog

  • Dreamhost Increase PHP Upload Size

    Needed to upload some videos into my SlideShow Pro Director install.  However, my PHP upload size was set to 20MB and the videos were both 23MB.  After some Googling, I found a painless way to fix it.

    1. Ensure your domain is running FastCGI for PHP5
    2. Download DreamHost Custom PHP.ini from DeamHost Scripts and Tips
    3. Put the dh-phpini.php file at the root of your website
    4. Access http://<website>/dh-phpini.php
    5. Click to install and it will create the necessary files and folder
    6. Edit the php.ini in the newly created /cgi-bin/ folder in the following two places: post_max_size, and upload_max_filesize
    7. SSH into your website and run the following command for it to take affect (kills FastCGI): killall -9 php5.cgi

    All this good info was found at BlueSunray, so thanks for that!

  • Kindle for WP7

    And it is out.  Go and grab it!

    AppsFuze Description

  • Kindle Book Lending

    Well, it finally arrived.  Similar to the Nook, you can now lend Kindle books to others.  There are some caveats though.

    • Not all books are lendable, it depends on the publisher.  Looking around, very few actually are.
    • The lend is for 14 days, and the user has 7 days to accept the lend.
    • You cannot read the book while it is on load.  If you haven’t connected to the network with your kindle, you can still read it (we tested it).
    • You can return the book prior to the 14 days.
    • It can only be initiated from a US customer.

    Check out all information in Amazon’s help section.

  • Work Item Migration from TFS 2008 to 2010

    During a migration from TFS2008 to TFS2010 I am currently working on, one of the things we needed to migrate is Work Items.  We have three customized work items, which we need to migrate from one server to another.

    The downside, is that when I am running witadmin.exe, I get the error:

    TF212018: Work item tracking schema validation error: TF26177: The field System.RelatedLinkCount cannot be renamed from ‘Related Link Count’ to ‘RelatedLinkCount’.

    This is happening because the xml has changed between TFS2008 and TFS2010.  Talk about a pain.  However, the fix is fairly painless.  All you need to do is rename RelatedLinkCount in your xml that you’re trying to import to “Related Link Count”.

    More than likely you will receive multiple errors that are similar.  Simply rename them all, and it should import.  The ones I constantly ran into:

    • RelatedLinkCount – Related Link Count
    • IterationID – Iteration ID
    • ExternalLinkCount – External Link Count
    • HyperLinkCount – Hyperlink Count
    • AttachedFileCount – Attached File Count
    • AreaID – Area ID

    As an aside, always test with the /v, validate, switch to ensure everything in the xml is valid.

  • Iteration and Path Import/Export

    There is a great little utility I found for importing and exporting Iteration and Path. It also makes it way easier to bulk edit items via notepad and then import. Works with TFS 2005, 2008, and 2010. Yay!

  • Process to Named Instance

    When working with programs that spawn multiple processes (i.e. BizTalk, svchost, etc), sometimes you just need to know which one of the processes is actually spinning at 100% CPU or eating all your memory.  Unfortunately, task manager doesn’t really give you and details about which process it is.

    In order to get the details, you need to run the following (example is for svchost)

    tasklist /SVC /fi “imagename eq svchost.exe”

    Just remember to open the command prompt as administrator for elevated processes.

     

  • Windows Phone 7

    Well, it’s been a few years, and I finally bought a new phone.  I used to have the Touch Pro 2, and while I enjoyed the keyboard, there was a lot not to love to.  Let me count thy ways:

    1. Windows Mobile 6.5 (even with all the hacked ROMs that I used)
    2. Thickness.  Man was that thing a pocket sore
    3. Windows Mobile 6.5

    Pretty much everyone I work with either has an Android powered phone or an iPhone.  While I’m sure either would’ve worked just fine, I was holding out for the new Windows Phone 7.  I loved playing with a friend’s Zune HD.  The interface is just so much more fresh and, I’m not all that into apps, which is what both Android and iPhone seem to be centered around.

    I waited, and I waited (and I was in Singapore for a few months), but I finally received my phone a week before Christmas.  All-in-all, I’m very fond of it, and getting around is so much better.  I ended up with the HD7, since I’m on T-Mobile through work, but I’ve also played with the Focus as that is what all the AT&T guys have.

    There are a few issues which I’ll get to, but talk about a completely awesome overhaul.  The touchscreen is smooth and responsive, the icons are finger friendly, and most of all the integration is very intuitive.  The one thing I was really worried about was moving away from a keyboard.  On all my smartphones I’ve had a physical keyboard of some sort.  However, with the Windows Phone 7 keyboard, I’m able to type just about as fast and accurately.  Also, I never used to use my phone for music, but now I’m using it quite a bit.  The Zune integration is nice, and my (overly expensive) headphones sound excellent on them with no static/electric background noise.

    Overall I am very happy, and I know with all the money that Microsoft has banked on it, it will at least try to become a large player and continually grow.  However, as mentioned there are a few annoyances that I have (there are more comprehensive lists elsewhere):

    • Dialer does not auto-complete names and numbers.  This is something that was great with WinMo 6.5.  In fact WP7 does it for text messages, just not for the dialer.  Boo.
    • No gapless playback with MP3s
    • I’m sure there are other things, but nothing that actively bothers me…

    Microsoft has said that there is an update coming out in January/February timeframe to fix some of the other issues (copy/paste, etc), and I’m sure there will be many other updates to come to fix other issues.  However, right now, I’m glad I jumped on board.

    If you’re interested, here are all the WP7 phones available now.

  • Offline SharePoint

    I’m sure a lot of you have heard about Colligo for offline SharePoint.  Unfortunately, the SharePoint sites that I continually access where for my company have some interesting security setup and therefore I’ve never been able to get Colligo to work.  Since I had originally tried, I never really bothered to figure it out as we were told it simply wouldn’t work.

    However, when I installed Office 2010 I noticed that there was a SharePoint Workspace 2010 which does offline SharePoint too.  Since we only use MS products for security I was very optimistic about getting Offline SharePoint finally working (incredibly useful for working on flights).  Well, I attempted to use it and quickly realized it will only do offline SharePoint for SharePoint 2010.  Unfortunately we were still on 2007.

    Fast forward through a bit of searching, and I ran across a nice KB article that explains how to sync a SharePoint 2007 site with SharePoint Workspace 2010 using groove.  I don’t really care how it works, as long as I can have offline editing and syncing.  Yay!

  • Moved from EE

    My Dreamhost server was upgraded awhile ago, and ever since then I have had nothing but issues with my installation of EE.  A lot of other things had issues too, but I was easily able to reinstall and everything worked.  Sadly, that was not an option for EE as my yearly download had expired.  No way was I going to pay just to get things back to where they were.

    Needless to say I have been wanting to migrate over, and just never really had the time to do it.

    Well, I did it today because I’ve been wanting to post a few things.  I think everything migrated over fairly well, but there are definitely a few issues.  I really wanted to use some rewrite logic to keep all the inbound links working, but I’m afraid that just isn’t going to happen.

    Without further ado, hopefully there were be some fun tech updates soon!

  • TokenAndPermUserStore Cache on x64 SQL 2005

    We’ve been having yet another performance issue that has taken awhile to fix.  This one isn’t related to code though.  However, it has been a nightmare to solve.  Thankfully we have some Microsoft guys on sight who were able to quickly diagnose the problem and get us moving along.

    Some background:

    • x64 SQL 2005 SP3
    • x64 Windows 2003 R2
    • 64GB RAM per cluster node
    • 12 HT enabled cores

    With that, we were noticing a lot of CPU activity even though we really shouldn’t have, but it was strange as CPU would peak at about 45% and the SQL would appear to become very sluggish.  Running ad hoc queries took forever, and it was causing our app to run slowly too.  In fact, we were normally front-end CPU bound, but when we were having these issues, the front-end sat at about 25% CPU, SQL was at 45% and there were no waits on the SQL server.  It was very annoying as there was no place to point the finger at.

    As I was digging through things, I noticed that the last geography we did we had set MDOP to 1 (see previous post).  As I was slowly going through various SQL configurations I noticed that it was set to 0 on all of the cluster nodes.  Needless to say, I talked to a few people, and 1 is apparently the default setting during their buildout, so I changed it. 

    Miraculously everything was solved!  A quality day’s worth of work!  Ran some validation steps, and then handed it off to our offshore team.  The next day, I notice that the results were looking a lot worse that what I was seeing.  I spin up LoadRunner (ugh, another post I should probably write about) and run a test.  My results are for crap too.  Looking at front-end CPU, I notice it is once again not maxing out, and SQL is running hot again. 

    I know how to fix this though, so I go and look at the MDOP setting.  Interesting, it is still set to 1.  Well, maybe something is hung someplace, so I set it to 0 then back to 1.  Run the test, problem solved, move on to something else. 

    Well, this continually happens for the next week, and so I send an email asking if anyone has seen this before to the local DBAs and the onsite Microsoft DBAs if they have ever seen MDOP “revert”, but not really.  Needless to say, they had never heard of this, but the Microsoft DBA quickly narrowed in on the fact that the cache plan is being dumped when I re-run that configuration.  Looking at some memory dumps, he quickly jumped on the TokenAndPermUserStore cache.  We also verified it by only flushing that cache and watching the improvements on the site. 

    The good news is that we are not the only ones having issues with this.  MS has actually tried to fix this issue since before SP2.  However, nothing, not even in SP3 has actually fixed it.  Yet, in SP3 they finally added a few trace flags that can be used to manually set the size of this specific cache.  Before I get to telling you how to fix it, here is what is going on.

    On the previous geography our SQL tier looked the same except that we only had 24GB of RAM on the SQL nodes, plus our databases were a lot larger because of legacy data.  Therefore, we have memory pressure on the box.  SQL wants to load all the databases into RAM, but it can’t.  Therefore, the caches are continually going through garbage collection.  Now, on this current project, we have more than doubled the amount of RAM, and our databases are are tiny in comparison.  In fact, all of our databases are effectively in memory.  Therefore, we have no memory pressure, and the caches are never collected.  They keep growing to sizes that make them useless as they are spending more time in CPU finding the corresponding item (the security token in this case) than just recreating it.

    Our SQL nodes are too big.  Who knew that was possible?

    Now the solution.  Microsoft has tons of articles on this, but the one that describes it the best is 927396.  The top bullet points explain exactly what we were seeing:

    • Queries that typically run faster take a longer time to finish running.
    • CPU utilization for the SQL Server process is more than usual.
    • When you experience decreased performance when you run an ad hoc query, you view the query from the sys.dm_exec_requests or sys.dm_os_waiting_tasks dynamic management view. However, the query does not appear to be waiting for any resource.
    • The size of the TokenAndPermUserStore cache store grows at a steady rate.
    • The size of the TokenAndPermUserStore cache store is in the order of several hundred megabytes (MB).
    • In some cases, execution of the DBCC FREEPROCCACHE command provides temporary relief.

    Now there are multiple ways of fixing it, it really depends on how many users are accessing your database.  For us, it is very few as we only have application accounts.  However, here are your options:

    1. Enable trace flag 4618 to set a quota of 1,024 entries.
    2. Enable both trace flag 4618 and 4610 to set a quota of 8,192 entries.
    3. Put a custom quota in the registry and enable trace flag 4621.

    We went with option #2, so we have the default settings, and guess what it works!  The downside is that the memory keeps increasing, but we haven’t had a performance issue.  I am guessing is that the used memory space is staying consistently the same size, but it is not reclaiming memory, which is causing a memory leak.  I am going to work with our DBA this next week to validate that assumption (and make sure it will reclaim the memory at some point), so I will keep this post updated based on what we found.

    In addition, I am going to switch MDOP back to 0, and see if SQL isn’t quite as dumb with parallelism as we think it is now.