This project has moved. For the latest updates, please go here.

Application Pool Stops

Apr 18, 2011 at 8:01 AM

Hi, I have just managed to install v 2 after using v1 for about a year.

It runs fine for a few pages and then i get a 503 error.

Looking in IIS the application pool has stopped. I can restart and get a few more pages but then it crashes again.

it is a W2K8 R2 server (x64) running iis 7.5 and sql server 2008 r2

Here is the event log:

Log Name:      Application
Source:        ASP.NET 4.0.30319.0
Date:          18/04/2011 08:54:20
Event ID:      1325
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      Berners.main.strodes.ac.uk.internal
Description:
An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/3/ROOT

Process ID: 4512

Exception: System.AggregateException

Message: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.

StackTrace:    at System.Threading.Tasks.TaskExceptionHolder.Finalize()

InnerException: System.SystemException

Message: Cannot create directory: E:\inetpub\wwwroot\TicketDesk\TdSearchIndex

StackTrace:    at Lucene.Net.Store.NativeFSLockFactory.AcquireTestLock() in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Store\NativeFSLockFactory.cs:line 107
   at Lucene.Net.Store.NativeFSLockFactory.MakeLock(String lockName) in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Store\NativeFSLockFactory.cs:line 156
   at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, Boolean closeDir, IndexDeletionPolicy deletionPolicy, Boolean autoCommit, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Index\IndexWriter.cs:line 1826
   at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean closeDir, IndexDeletionPolicy deletionPolicy, Boolean autoCommit, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Index\IndexWriter.cs:line 1805
   at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, MaxFieldLength mfl) in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Index\IndexWriter.cs:line 6168
   at TicketDesk.Domain.Services.TicketSearchService.BuildIndex(ITicketService ticketService) in C:\Projects\Personal\VS2010\TicketDesk\TicketDesk-2-branch\TicketDesk.Domain\Services\TicketSearchService.cs:line 160
   at System.Threading.Tasks.Task.Execute()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="ASP.NET 4.0.30319.0" />
    <EventID Qualifiers="49152">1325</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2011-04-18T07:54:20.000000000Z" />
    <EventRecordID>10869</EventRecordID>
    <Channel>Application</Channel>
    <Computer>Berners.main.strodes.ac.uk.internal</Computer>
    <Security />
  </System>
  <EventData>
    <Data>An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/3/ROOT

Process ID: 4512

Exception: System.AggregateException

Message: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.

StackTrace:    at System.Threading.Tasks.TaskExceptionHolder.Finalize()

InnerException: System.SystemException

Message: Cannot create directory: E:\inetpub\wwwroot\TicketDesk\TdSearchIndex

StackTrace:    at Lucene.Net.Store.NativeFSLockFactory.AcquireTestLock() in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Store\NativeFSLockFactory.cs:line 107
   at Lucene.Net.Store.NativeFSLockFactory.MakeLock(String lockName) in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Store\NativeFSLockFactory.cs:line 156
   at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, Boolean closeDir, IndexDeletionPolicy deletionPolicy, Boolean autoCommit, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Index\IndexWriter.cs:line 1826
   at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean closeDir, IndexDeletionPolicy deletionPolicy, Boolean autoCommit, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Index\IndexWriter.cs:line 1805
   at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, MaxFieldLength mfl) in C:\Projects\Personal\VS2010\Lucene.Net\C#\src\Lucene.Net\Index\IndexWriter.cs:line 6168
   at TicketDesk.Domain.Services.TicketSearchService.BuildIndex(ITicketService ticketService) in C:\Projects\Personal\VS2010\TicketDesk\TicketDesk-2-branch\TicketDesk.Domain\Services\TicketSearchService.cs:line 160
   at System.Threading.Tasks.Task.Execute()</Data>
  </EventData>
</Event>

 

Log Name:      Application
Source:        .NET Runtime
Date:          18/04/2011 08:54:20
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      Berners.main.strodes.ac.uk.internal
Description:
Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AggregateException
Stack:
   at System.Threading.Tasks.TaskExceptionHolder.Finalize()

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2011-04-18T07:54:20.000000000Z" />
    <EventRecordID>10870</EventRecordID>
    <Channel>Application</Channel>
    <Computer>Berners.main.strodes.ac.uk.internal</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AggregateException
Stack:
   at System.Threading.Tasks.TaskExceptionHolder.Finalize()
</Data>
  </EventData>
</Event>

 

Log Name:      Application
Source:        Application Error
Date:          18/04/2011 08:54:20
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      Berners.main.strodes.ac.uk.internal
Description:
Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bd0eb
Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdfe0
Exception code: 0xe0434352
Fault offset: 0x000000000000aa7d
Faulting process id: 0x11a0
Faulting application start time: 0x01cbfd9dd0eeaf69
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 10d80de1-6991-11e0-b9d2-005056b0000b
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2011-04-18T07:54:20.000000000Z" />
    <EventRecordID>10871</EventRecordID>
    <Channel>Application</Channel>
    <Computer>Berners.main.strodes.ac.uk.internal</Computer>
    <Security />
  </System>
  <EventData>
    <Data>w3wp.exe</Data>
    <Data>7.5.7600.16385</Data>
    <Data>4a5bd0eb</Data>
    <Data>KERNELBASE.dll</Data>
    <Data>6.1.7600.16385</Data>
    <Data>4a5bdfe0</Data>
    <Data>e0434352</Data>
    <Data>000000000000aa7d</Data>
    <Data>11a0</Data>
    <Data>01cbfd9dd0eeaf69</Data>
    <Data>c:\windows\system32\inetsrv\w3wp.exe</Data>
    <Data>C:\Windows\system32\KERNELBASE.dll</Data>
    <Data>10d80de1-6991-11e0-b9d2-005056b0000b</Data>
  </EventData>
</Event>

Any Ideas?

 

Thanks

 

Robs

Apr 18, 2011 at 8:24 AM

just found the error log built into the app. here are the results

 

No valid exports were found that match the constraint '((exportDefinition.ContractName == "KeepAlive.ashx") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "System.Web.Mvc.IController".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.

System.ComponentModel.Composition.ImportCardinalityMismatchException: No valid exports were found that match the constraint '((exportDefinition.ContractName == "KeepAlive.ashx") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "System.Web.Mvc.IController".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.

System.ComponentModel.Composition.ImportCardinalityMismatchException: No valid exports were found that match the constraint '((exportDefinition.ContractName == "KeepAlive.ashx") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "System.Web.Mvc.IController".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality)
   at TicketDesk.Web.Client.MefControllerFactory.CreateController(RequestContext requestContext, String controllerName) in C:\Projects\Personal\VS2010\TicketDesk\TicketDesk-2-branch\TicketDesk.Web.Client\Mef\MefControllerFactory.cs:line 39
   at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
   at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Thanks
Robs
Coordinator
Apr 18, 2011 at 6:44 PM

These are not the same problem. The first issue you posted about is a permissions issue. The relevant exception is:

Message: C annot create directory: E:\inetpub\wwwroot\TicketDesk\TdSearchIndex

You need to either give the application pool's account write access to the TicketDesk folder under wwwroot so it can create the folder it needs or you can create the TdSearchIndex directory manually and grant the user write access to just this folder. 

 

The second problem that you were seeing in the ELMAH logs (in the admin section) refers to is an exception that you'd see when a browser asks for a URL that isn't valid.

In this case someone is asking for the "keepalive.ashx" handler. This does NOT exist in TicketDesk 2 at all. It was a handler in ticketdesk 1.x though. The error is probably being caused by someone on the network that had ticketdesk 1.x open in a browser window after you upgraded the server to ticketdesk 2.x. This exception is not causing a problem any of your users though and should not happen again once all old browser instances of ticketdesk 1.x are closed.

Apr 19, 2011 at 6:59 AM

Hi,

Once again thanks for the quick reply. I have learnt a few new things which is always good.

I have added the apppool account to the ticketdesk folder and given it full control so hopefully this will fix it. I hadn't realised you had to add in the security of the folder IIS AppPool\PoolName

One of the guys in the office had it open so i guess that wa what was causing the 2nd error.

Will give it a go and see how it runs.

thanks again

Robs