I've just completed a migration from SharePoint Portal Server 2003 to shiny new Moss 2007 implementation. And whilst looking for some content that had gone missing, I noticed that the search results page sometimes took 30 - 60 seconds to return the next page in the result set, whilst on other occasions it came back very quickly. My first thought was perhaps it's busy, all those users making lots of use of it! But no, processor usage on the boxes was all negligible.
As I explored this some more I discovered that it was consistently inconsistent! By which I mean that the first page of a particular query always came back quickly, the second slow, the third and fourth quickly, then the fifth slow and so on. I think that's a quick step ( - I've been subjected to too much strictly come dancing), anyhow some digging around eventually showed up the following message in the logs:
12/08/2008 22:32:19.57 w3wp.exe (0x1134) 0x0EC4 Search Server Common MS Search Query 0 High Exception while finishing web request or starting web page read on http://search.live.com/results.aspx?q=safety&count=3&first=1&mkt=en-GB&format=rss&FORM=SHAREF: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host 194.217.240.73:80 at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at Microsoft.Office.Server.Search....
12/08/2008 22:32:19.57* w3wp.exe (0x1134) 0x0EC4 Search Server Common MS Search Query 0 High ...Federation.HttpAsync.RespCallback(IAsyncResult asynchronousResult)
and
12/08/2008 22:27:35.20 w3wp.exe (0x1134) 0x0EC4 Search Server Common MS Search Query 0 High Exception while finishing web request or starting web page read on http://search.live.com/QSOnly.aspx?q=safety&count=3&first=1&mkt=en-GB&FORM=SHARES&format=rss: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host 194.217.240.71:80 at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at Microsoft.Office.Server.Search.F...
12/08/2008 22:27:35.20* w3wp.exe (0x1134) 0x0EC4 Search Server Common MS Search Query 0 High ...ederation.HttpAsync.RespCallback(IAsyncResult asynchronousResult)
I thought it a bit strange that a federated search was being performed as there were no federated search webparts on the results page I was looking at. Anyhow it seems that by default the federated searches at Microsoft's live.com are run anyway... disabling these federated search locations in Search Administration > Federated Locations instantly gave me nice quick results all the time. Well disabling - I added a prefix that's unlikely to get used as I thought they might come in useful when Microsoft has fixed the delay!
If you find another solution - please add a comment to let me know. Thanks.