EPiWiki.se  - EPiServer notes shared with others
 

Community

[Edit]
EPiServer community and other Relate+ troubleshooting sessions.

Troubleshooting a low CPU hang in community 3.2
After installing Community get There is a duplicate scriptResourceHandler section defined
Troubleshooting a multi site using remote events over UDP broadcast

A community site with a lot of files


I was a part in troubleshoot a community site with over 10’000’000 of pictures.

Problem description:


The application has to be restarted each 20 minutes
It can take over one minute to render a web page on the system.
Low CPU on front servers
Low CPU on database servers
Environment: Windows 2008, SQL-Server 2008, UNC file share with a lot of files

Trobleshooting the error message "The network BIOS command limit has been reached"


Examining the logs
The message "The network BIOS command limit has been reached" appears frequently in the log.
The problem occurs because EPiServer community doesn’t use virtual path providers; instead it has to be a mapped folder against the application. IIS7 has a “feature” that looks in the application folders to detect if a configuration file is changed (called File Change Notifications) that can be a disaster for large UNC shares.

Resolution:


Turn of the File change notification feature.
This is done for IIS7 by setting the registry key
HKLM\Software\Microsoft\ASP.NET\FCNMode to the DWord 1 - The application will disable File Change Notifications (FCNs).
See http://support.microsoft.com/kb/317955 for more information.

Troubleshooting that it sometimes takes over a minute to render a web page


We used my program StackDump and examine the .NET CLR stacks when the issue comes up, and it shows that almost each stack looks similar to:

  SNINativeMethodWrapper.SNIReadSync(SqlClient.SNIHandleSystem.IntPtr, N/A)
  System.Data.SqlClient.TdsParserStateObject.ReadSni(N/AN/A...
  System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket(N/A)
  System.Data.SqlClient.TdsParserStateObject.ReadBuffer(N/A)
  System.Data.SqlClient.TdsParserStateObject.ReadByte(N/A)
  System.Data.SqlClient.TdsParser.Run(N/A, RunBehavior, N/A, N/A, N/A, N/A)
  System.Data.SqlClient.SqlDataReader.ConsumeMetaData(N/A)
  System.Data.SqlClient.SqlDataReader.get_MetaData(SqlDataReader)
  System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReaderN/AN/A)
  System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(SqlCommand, ...
  System.Data.SqlClient.SqlCommand.RunExecuteReader(SqlCommandN/AN/AN/AN/AN/A)
  System.Data.SqlClient.SqlCommand.RunExecuteReader(N/AN/AN/AN/AN/A)
  System.Data.SqlClient.SqlCommand.ExecuteReader(SqlCommandN/AN/A)
  System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(N/AN/A)
  EPiServer.Common.Data.DatabaseHandler.GetReader(N/AN/AN/AN/A)
  EPiServer.Common.Data.DatabaseHandler.GetReader(N/AN/A)
  EPiServer.Community.ImageGallery.Data.ImageGalleryFactory.GetImages(N/A, N/A,...
  EPiServer.Community.ImageGallery.ImageGalleryHandler.GetImages(N/AN/AN/A...
  EPiServer.Community.ImageGallery.ImageGalleryHandler.GetImages(N/A, N/A, ...

That means that a database query is probably slow or looked.
To verify this we using the “Activity monitor” in SQL-server 2008 and saw that a lot of locks where created.
The problem are not really fixed - and I think that it has to be fixed by EPiServer, because when deleting, altering or adding images six queries is done in a trigger. But a workaround to get the reading of the site working we does the following changes:
Add a “no lock” hint to the query that reads data for the image in the stored procedure spEPiServerCommunityImageGalleryAddImage.

Version author:
Mattias Lövström

EPiServer version

'EPiServer CMS 5'