Friday, August 31, 2012

Share Point application pool re-set for perticular user and page.

It was very frustrating, In one of our production site, only two members of Management group when goes to view a particular web part page, browser do not open and IE (version 9.0) gave, "Internet explorer can not display this page."

In FireFox it returned a co-relation token ID searching that toke returned following few logs

"Usage Logging Importer: Exception occured while retrieving profiling information for the user="

"Microsoft.Office.Server.UserProfiles.UserNotFoundException: An error was encountered while retrieving the user profile."

"System.TimeoutException: The HTTP request to 'http://server:xxxxx/GUID/MetadataWebService.svc' has exceeded the allotted timeout of 00:00:09.9990000. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out     at System.Net.HttpWebRequest.GetResponse()"

"System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)    Exception rethrown at [0]:      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)     at Microsoft.SharePoint.Taxonomy.IMetadataWebServiceApplication.GetServiceSettings(Guid rawPartitionId) "

"'http://server:xxxxx/GUID/MetadataWebService.svc' Channel: 'System.ServiceModel.Channels.ServiceChannel' Action: 'http://schemas.microsoft.com/sharepoint/taxonomy/soap/IMetadataWebServiceApplication/GetServiceSettings' MessageId: 'urn:uuid:"

It was clear that something authentication or operation timeout is taking place, but was not clear why as I am not that much expert... So I decided to monitor Application log which gave me, following

"Log Name:      Application
Source:        Application Error
Date:         Date:Time 
Event ID:      1000
Task Category: (100)
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17625, time stamp: 0x4de88429
Exception code: 0xe053534f
Fault offset: 0x000000000000cacd
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13

 w3wp.exe
    7.5.7601.17514
    4ce7afa2
    KERNELBASE.dll
    6.1.7601.17625
    4de88429
    e053534f
    000000000000cacd"

While the  System Event log gave me following entries.

"Log Name:      System
Source:        Microsoft-Windows-WAS
Date:          DateTime
Event ID:      5009
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
 A process serving application pool 'SharePoint - port' terminated unexpectedly. The process id was '3612'. The process exit code was '0x800703e9'.

SharePoint - port
    3612
    800703e9

 

Log Name:      System
Source:        Microsoft-Windows-WAS
Date:          Date Time
Event ID:      5011
Task Category: None
Level:         Warning
Keywords:      Classic

A process serving application pool 'SharePoint - port' suffered a fatal communication error with the Windows Process Activation Service. The process id was '6824'. The data field contains the error number. 

 SharePoint - port
    6824
    6D000780"


So much logs and googling each gave hundreds of solution. I was really out of directions where to go... I tried may things like

changing local server security options for Network logon, re creating application pool, synchronizing User Profile service multiple times successfully, changing application pool Identity, add user to Farm Admin, making SQL server dbo, etc., etc.,  then I found one post here which told to trace the code, I decided to go for it,

http://stackoverflow.com/questions/9695339/application-pool-crashing

I changed the code and put trace log at almost each alternate line, nothing unusual, but though after one particular spot it stopped to execute and RE_SET then application pool.. I notice that part of code and found that it was about querying and filtering a table view with long filter string, AND I have very limited physical memory on my web front end server having only 4GB on PROD server !!! increasing memory instantly was not feasible, So I changed logic to avoid long query and filtering in memory table, go with loops and filtering, and it worked !!!

OVER ALL (SharePoint, Dot Net, c#) ::: Application pool reset caused stop rendering particular web part page to particular users only. In web part code, a long filtering and querying in memory table (any lengthy or bulky in memory operation on inmemory object)  pushed system KERNELBASE and as result system reset your application's application pool :) (tit for tat !!) and users think that you have played with their profiles and permissions... :)

HOPE This HELPS SOMEONE as ME...

No comments:

Post a Comment