WordPress Performance (caching)

I’ve been tinkering with the W3 Total Cache to see what improvements might be possible over on the Cytanium web site. We weren’t concerned about any speed issues, but saw this plugin mentioned many times so figured we should give it a look.

It has been installed and enabled for most settings so we’ll watch it to see how performance is impacted.

Here’s the link to the plug in: http://wordpress.org/extend/plugins/w3-total-cache/

Here’s a link to a handy guide to the settings: http://zemalf.com/1443/w3-total-cache/

UPDATE: It seems that Windows Server and IIS weren’t the main focus of this tool and it doesn’t fully implement all the best practices. To do that you need to make some manual setting changes in IIS for the caching and other things. This might not be worth messing with on Windows.

Be Sociable, Share!

    SQL Server 2005 Export / Import Issues

    SQL Server 2005 Box ArtWe had a client run across some issues recently when they exported their SQL Server 2005 database from their old host and imported it into a new database at OrcsWeb. After spending quite a bit of time working with the client on why the application wouldn’t work, we tracked it down to a page on the site that tried to do an insert but was missing a key field. The client assured us that the same code worked elsewhere, so we continued troubleshooting for them. After a while we came across the idea to do a full audit and compare of their database hosted with OrcsWeb and the one at the old host. Well, come to find out, the databases weren’t the same.

    But… wait… an export and then import were done directly through SQL so they should match! Yeah, you would think so, but there are apparently issues with SQL Server (at least in version 2005) where it can drop identity fields.

    So with no identity set on certain fields in the new database, SQL Server was expecting that value to be provided. Since it wasn’t, the code barfed.

    Here’s a link to a post someone else wrote about the issue:

    http://rip747.wordpress.com/2007/10/01/sql-server-2005-import-export-reset-identity-keys-no-workaround-2005-sucks-period-the-end/

    The workaround would be to get a full backup from the one server and then perform a full restore on the new server – that’ll assure the tables, data, and *all* settings are brought across for the migration.

    I hope this helps someone else. Happy hosting!

    Be Sociable, Share!

      Diagnosing Windows/Web Application Issues

      Here’s a great video post over on Channel9 that you may find useful if you ever have to troubleshoot application issues.

      You can’t troubleshoot a problem effectively until you first know what the problem is.

      When applications encounter stability or performance issues in the production environment, obtaining an accurate problem definition is a key first-step to reducing Time To Resolution.  Learn how Microsoft Support leverages various tools & techniques to help customers define the problems plaguing their production applications.

      Diagnosing Application Issues – 01

      Enjoy!

      Be Sociable, Share!

        Five Valuable Posts on IIS7 Topics

        Here are 5 valuable posts on IIS topics that you should check out if you haven’t already.

        Caching in IIS to Speed Performance

        Why, and then how, to enable caching within IIS for your web site/application.

        IIS 7.x Shared Configuration

        What is Shared Configuration for IIS7? What are the reasons to use it? How do you set it up?

        IIS7 Mime Mappings

        You can manage MIME mappings in IIS7 to control what files and served from the site – and how they are handled.

        Troubleshooting SSL in IIS

        SSL is mostly painless to deal with on IIS7 but when there are issues, it can get tricky to troubleshoot. Here are great tips to help track down issues.

        Managing Default Documents in IIS7

        What page loads by default when someone visits your site? What is next in line if that page isn’t there? How do you control this?

        I think you’ll find these five posts very useful in your dealings with Microsoft’s IIS7.

        Happy hosting!

        Be Sociable, Share!

          Blog Feed Subscription

          Do you know that you can easily subscribe to my full blog feed from here: http://bradkingsley.com/feed/

          Did you also know that you can subscribe to just specific categories if you wanted? Say you could care less about random rants and just want information on IIS, here’s the direct feed for posts only in the IIS category: http://bradkingsley.com/category/iis/feed/

          Want a feed for hosting related posts? Subscribe to that feed here: http://bradkingsley.com/category/hosting/feed/

          Be Sociable, Share!

            Voice-Secured USB Drive

            Wow, have you seen this voice-secured USB drive? That’s awesome! It has built-in ability to recognize your voice and to let you – and only you – access the data on the drive. Super crazy awesome IMO.

            Hopefully at some point in my lifetime soon we’ll have totally portable OS options – like the new USB Windows 8 feature. Don’t like Windows? Well, Linux has already supported similar functionality for a few years. Plug your OS-configured USB drive and boot to it, and bam, your own personalized desktop and data is right there at your fingertips! Sweet!

            Some challenges right now are probably best summarized as:

            1. Size of USB drives. People store a LOT of data, so a 16GB or 32GB likely isn’t going to cut it for mass-market. There are of course larger drives, but they also start to get pretty expensive.

            2. Speed of USB drives. This seems to be improving on an almost weekly basis. Of course those newer and faster USB drives are quite costly too though.

            3. Cost of USB drives. Sure, you can get REALLY cheap USB drives now. But, do you want a big one? Do you want a fast one? How about one that is both BIG and FAST? Well, that’s gonna cost you!

            4. Security. Each OS has at least some level of security built-in. If you follow best practices, common OS’s are rather secure today. But still, I’m sure enough people will have concerns that someone might brute-force their password, or work-around the authentication in some manor. That’s a valid concern. Something like this new voice-authenticated USB stick should go a long way toward addressing those concerns though.

            5. Security – part 2. Not only does the OS need authentication, but the data on the storage. Something like Bitlock or some other type of encryption process will be needed so that if the storage does fall into the wrong hands, it’s fully encrypted and the data is unavailable to whomever finds it.

            6. Backups. USB drives are really small. That’s one of the great things about them. But something so small can also get lost easily. If it is encrypted and fully secured, then the user doesn’t have to worry about that, but hey, I don’t know about you, but I’ve spent a LOT of time getting my OS configured and applications installed and working just the way I want them. So the thought of losing that and having to go through it again doesn’t sound like fun. Plus, the loss of data. Yikes. I feel slightly sick just thinking about it. So we need a good solution like backup-to-the-cloud. I know that Windows 8 is said to include a feature like this automatically. And I suppose the USB OS could also leverage things like SkyDrive, Google Drive, or DropBox. So there are options, but they need to be easy… both to “rebuild” the full USB image, and also to retrieve specific data if needed.

            All in all, I’m very excited about this. I look forward to having an OS-on-a-stick!

             

            Be Sociable, Share!

              Windows Server 2012 Fish

              Windows Server 2012 FishInstalling the latest Microsoft Windows Server 2012 build this morning and watching this cool little tropical fish while waiting for the OS to “prepare” itself.

              Not sure about you, but I like it. If I have to sit and wait a few minutes for something, why not squeeze a little color splash and fun into those few moments.

              Kudos MS. Now looking forward to the new server OS! :-)

              Be Sociable, Share!

                URL Scan or Request Filtering in IIS7

                URL Scan has been a useful tool since Windows Server 2003, and continues to be used on many web server deployments. Did you know though that IIS7 includes a feature named Request Filtering that handles the same functionality as URL Scan but also gives a tighter level of control over the settings and where they are applied?

                Filtering requests on IIS7 for security

                Request Filtering is a great resource to protect your site from SQL Injections and other attacks. One, of several, great reasons to consider using it is that it can be configured from the GUI (accessed through the icon shown above) *OR* from within your web.config file. Managing this from the GUI makes the web.config changes for you, so it winds up being the same thing, but it makes it a little easier to deal with. Then once the settings and rules are in your web.config file, they are nice and portable – just deploy them along with your site to assure that the server settings are in proper place to filter out the types of “bad” requests and possible attack footprints that you want to lock down.

                It doesn’t get much easier than that – and you don’t have to remember to make the settings if you move the site, or add more server nodes, or … whatever!

                There are plenty of great resources online so I won’t rehash what’s already been communicated quite well, but I’ll provide some links for your reference below.

                http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering#005

                http://learn.iis.net/page.aspx/143/use-request-filtering/

                http://learn.iis.net/page.aspx/504/using-enhanced-request-filtering-features-in-iis/

                Happy hosting!

                Be Sociable, Share!

                  SQL Server restore failure and resolution

                  A friend on mine had a recent issue where the restore of a SQL Server backup file – taken on one server and being restored to a different one – wouldn’t complete. It would continually throw an error of:

                  Server was unable to process request. —> File ‘C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\TheDatabase_log.ldf’ is claimed by ‘YAF_log’(2) and ‘ftrow_YafSearch’.

                  That made no sense and the names in the error message (I changed the DB name to “TheDatabase”) didn’t match (before my change I mean :>) anything in reality. The database didn’t already exist, and those other two file names, which the error states have some sort of “claim” on the log file, didn’t match anything in the destination system.

                  After a lot of troubleshooting with no luck, he stumbled across some information online that helped him get past it. I asked him to summarize so I could post here in case it helps someone else – or for reference for myself if I ever run across the issue.

                  His summary to me:

                  The issue seems to happen when there is a secondary database file (NDF) in the BAK file. The SQL restore doesn’t seem to like NDF files if the file does not already exist.

                  If this happens with a dedicated server you just create the files first (step 4), then restore, and you’re good to go. With a shared hosting account you have to do a bit more.

                  Steps to fix:

                  1. Download and install SQL Server Express to a local computer, if you do not have access to SQL Server already. You will need file level access to the SQL Server so you cannot do this connected to a shared hosting SQL Server instance with SSMS.
                  2. Connect to your local SQL Server instance.
                  3. Create a new, blank database with the same name as the database you need to restore.
                  4. Open a SQL query and run the following command, replacing ‘path\file.bak’ with the full path to your BAK file, INCLUDING the double single ticks (‘ ‘) surrounding the path. This will create all the necessary files needed to restore the database.

                  RESTORE FILELISTONLY FROM DISK = ‘path\file.bak’

                  5. Restore the database to the local server.

                  NOTE: If you get stuck in “DBname (Restoring…)” mode after the restore run the following command (WITH RECOVERY must be on a separate line):

                  RESTORE DATABASE DBname
                  WITH RECOVERY

                  6. You will now need to merge the NDF(s) with the MDF. For each NDF file run the following command, replacing the names appropriately:

                  USE DBname
                  DBCC shrinkfile(‘file.ndf’,emptyfile)
                  ALTER DATABASE DBname
                  REMOVE FILE logical_file_name;
                  GO

                  You can get the NDF file name by navigating to your SQL Data folder or running this query:

                  SELECT name, physical_name AS current_file_location
                  FROM sys.master_files

                  You can get the logical_file_name from the Files section or the name column from the above command.

                  7. Backup the database from the local SQL Server instance and restore it to the shared hosting SQL Server instance – it should work fine this time!

                  Hopefully this is helpful to someone else in the same situation. Happy hosting!

                   

                  Be Sociable, Share!

                    Google Drive, SkyDrive, Dropbox, and more Buzz

                    The buzz around the different “cloud drive” options available has really escalated recently. First Dropbox announced some changes, the SkyDrive announced some changes, and then Google Drive made an announcement to overshadow them all.

                    I haven’t played with all the different options yet, but its great to know there are options!

                    Here are a few links to additional information if you’ve somehow missed out on the recent chatter.

                    Google Drive vs Dropbox, SkyDrive, Box and more – How does it stack up?

                    Google Drive vs. Dropbox, SkyDrive, SugarSync, and others: a cloud sync storage face-off

                    How Does Google Drive Compare to the Competition?

                    Be Sociable, Share!