Wednesday, August 13, 2008

The search request was unable to connect to the Search Service

If Search was functioning fine yesterday, but seems to have taken a crap on you today you might want to try these quick and easy fixes followed by some maintenance on Service Accounts and their Logins.

Here's what I did:

Restart these services:

Indexing Service
Office SharePoint Server Search
Windows SharePoint Services Search

After this do a quick IISReset and test the search functionality.

Or heres a quick script to restart all of the services and perform an IISReset for you.

net stop "Indexing Service" && net start "Indexing Service"
net stop "Office SharePoint Server Search" && net start "Office SharePoint Server Search"
net stop "Windows SharePoint Services Search" && net start "Windows SharePoint Services Search"

iisreset \\servername /noforce
iisreset \\servername /status
pause


If this worked for you then you might want to check the Service Accounts that you have tied to these services. They stopped or quit working for a reason. Investigate your Search and Query Server's Event Viewer and see what happened.

-Brian Grabowski

Wednesday, August 6, 2008

SharePoint Latency and Optimiaztion over WAN

Colonel Sanders: Prepare ship for lightspeed!
Dark Helmet: No, no, no! Lightspeed's too slow!
Colonel Sanders: Lightspeed too slow?
Dark Helmet: Yes. We're going to have to go right to.......Ludicrous speed!

One key to an efficient workforce is providing pertinent information in a reliable and quick manner. SharePoint is an excellent foundation for this theory. However, if you have ever wanted to boost speed and increase performace, here is one option that I have used that may give you that extra umph! (THE FOLLOWING REQUIRES REGISTRY CHANGES TO SERVERS...TEST FIRST!!!)

RFC 1323

RFC 1323 is a high-speed transmission path that defines window scaling that allows a receiver to advertise a window size larger than 65,535 bytes.

"A TCP Window Scale option includes a window scaling factor that, when combined with the 16-bit Window field in the TCP header, can increase the receive window size to a maximum of approximately 1GB. The Window Scale option is sent only in synchronize (SYN) segments during the connection establishment process. Both TCP peers can indicate different window scaling factors to use for their receive window sizes. By allowing a sender to send more data on a connection, TCP window scaling allows TCP nodes to better utilize some types of transmission paths with high BDPs."

So in short it allows more information to be sent and recieved, ultimately speeding up performance. In our lab we were able to take an 8MB file that was previously downloading at around 10 seconds to just over 2 seconds.

Pre RFC 1323 tuning= 8MB/10 sec.
Post RFC 1323 tuning= 8MB/2 sec.

Here's what I did:

(The following registry keys may or may not exist...create or edit them...also keep in mind that you can play with the values, however don't increase the sizes so much that they overload the Processor with heavy I/O loads.)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters]

"DefaultSendWindow"=dword:00100a40

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]

"TcpWindowSize"=dword:00100a40

"GlobalMaxTcpWindowSize"=dword:00100a40

"Tcp1323Opts"=dword:00000003

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters]

"MaxBytesPerSend"=dword:000fffff

-Brian Grabowski

Tuesday, August 5, 2008

STSADM, Site Template Codes, and Scripted Site Creation

If ever you've wanted to create Sites from the command line and quit halfway through because you had no clue what the Templates were called or named, you can finally press enter and watch impatiently for the cursor to blink down and say success. Keep in mind these are only the inherent MOSS 2007 Templates and not anything custom that you've thrown in there.

Here's the list:

WSS Templates

Team Site: STS#0
Blank Site: STS#1
Document Workspace: STS#2
Wiki Site: WIKI#0
Blog Site: BLOG#0
Basic Meeting Workspace: MPS#0
Blank Meeting Workspace: MPS#1
Decision Meeting Workspace: MPS#2
Social Meeting Workspace: MPS#3
Multiple Meeting Workspace: MPS#4

MOSS Templates

Document Center: BDR#0
Site Directory: SPSSITE#0
Report Center: SPSREPORTCENTER#0
Search Center with Tabs: SRCHCEN#0
My Site Host: SPSMSITEHOST#0
Search Center: SRCHCENTERLITE#0
Personalisation Site: SPSMSITE#0
Collaboration Portal: SPSPORTAL#0
Publishing Portal: BLANKINTERNETCONTAINER#0
Publishing Site: CMSPUBLISHING#0
Publishing Site with Workflow: BLANKINTERNET#2
News Site: SPSNHOME#0

All you need is the title and the code.

Example;

-sitetemplate STS#0

Also, here is a little code snippet in a batch file that will ask the correct questions, input the data, and create a Site Collection for you without having to go through CA. (Just edit the code to match your configuration.)

@ECHO off
cls
:start
ECHO.
ECHO Please Enter the following information:
set/p url=Complete the Site Url you wish to create. http://mysharepointsite/sites/
set/p owneremail=Enter the Owner's Email address.
set/p ownerlogin=Enter the Owner's Account Name.
set/p sitetemplate=Enter the SiteTemplate Code you wish to use.
set/p title=Enter the Title of the Site.
ECHO 1. Would you like to create the Site Collection?
set choice=
set /p choice=[Y/N] if '%choice%'=='Y' goto CreateSite
if '%choice%'=='N' goto start
ECHO "%choice%" is not valid please try again
ECHO.
goto start
:CreateSite
stsadm.exe -o createsite -url http://mysharepointsite/sites/%url% -owneremail %owneremail% -ownerlogin %ownerlogin% -sitetemplate %sitetemplate% -title %title%
goto end
:end
pause



-Brian Grabowski