Tags: | Categories: SharePoint, Windows, SharePoint development Posted on 2/26/2014 9:33 PM | Comments (0)
We used a very useful tool to make our SharePoint environment responsive after application pool recycles or web server restarts (iisreset) for years which is available under the GPLv2 license on CodePlex. It is called SPWakeUp which is a quite fast and simple tool to breathe new life into your server before you add that back to "production". Issues with the original solution As our environment grew, the wake up of the SharePoint sites took so long, for instance waking up a SharePoint environment with a ~0.5TB database took about a half hour which in our case meant high risk because as a general practise we remove the server from the load balancer for the maintenance period and we only add that back after the wake up. The second problem with the application was that it is full of memory leaks which in this case is not a serious issue because when the application stops the memory will be freed, but not too nice anyway. Improvements As per our original goal, we wanted to speed up the wake up process (reduce the time required for the run), also we wanted to reduce the memory usage by eliminating memory leaks. To achieve these goals a large part of the application has been modified/rewritten, but we tried to keep the most of the original source code and processing logic as possible. It means that for instance we tried to keep the wake up order of the sub sites within each site collection although changing the order would meant less code. Multi threaded application The "verbose" mode has been extended with multi threading capabilities. The application will open each site on its own thread. Because the application utilize the thread pool object, it will not consume the resources of the server, but it will run faster after the collection of the sites on the portal. How it works The followed process is very easy: Reads the farm configuration (Web application list) Navigates through the site collections and sub sites Based on the site list, it can parallely send http or http requests to the portal. Downloadable content As the original version of the software is distributed under GPLv2, this software must follow that license as well. SPWeakUp.zip (35.79 kb) Compilled code.zip (16.33 kb)