onsdag den 26. november 2014

PWA - Every Queuejob is failing (The value's length for key 'application name' exceeds it's limit of '128', ReportingResourceChangeMessageFailed, ProjectPublishFailure)

Today I came across a very strange problem. On a newly install server every queue job was failing. Project Create, Resource Change, Workflow submit, every reporting job and some project job was failing.

Problem:

I started looking into the queue to find an explanation. Here I found several errors, but could not make any sense of them.
Resource Reporting Error:
 Generelt•Reporting message processor failed:◦ReportingResourceChangeMessageFailed (24008) - The value's length for key 'application name' exceeds it's limit of '128'.. Detaljer: id='24008' name='ReportingResourceChangeMessageFailed' uid='3f02fa38-f574-e411-93fd-00155d007817' QueueMessageBody='Resource UID: 'dc548543-3352-454e-a86b-96d1a4bf63d2'. ChangeType='Alter'. ResourceChangeType='All'' Error='The value's length for key 'application name' exceeds it's limit of '128'.'.   
 ◦ReportingResourceChangeMessageFailed (24008) - The value's length for key 'application name' exceeds it's limit of '128'.. Detaljer: id='24008' name='ReportingResourceChangeMessageFailed' uid='4102fa38-f574-e411-93fd-00155d007817' QueueMessageBody='Resource UID: 'dc548543-3352-454e-a86b-96d1a4bf63d2'. ChangeType='Alter'. ResourceChangeType='All'' Error='The value's length for key 'application name' exceeds it's limit of '128'.'.   
 ◦ReportingResourceChangeMessageFailed (24008) - The value's length ...........  
   
   

Project Create Error:
 Generelt•Microsoft.Office.Project.Server.BusinessLayer.Queue.Message:◦ProjectPublishFailure (23000). Detaljer: id='23000' name='ProjectPublishFailure' uid='e42751bd-f874-e411-93fd-00155d007817' projectuid='99d8e3b1-f574-e411-93fd-00155d007817' messagetype='Microsoft.Office.Project.Server.BusinessLayer.QueueMsg.UpdatePublishStaleFlagMessage' messageID='32' stage='MSP_UPDATE_PUBLISH_STALE_FLAGS' blocking='Block'.   
   
 •Queue:◦GeneralQueueJobFailed (26000) - ProjectPublish.UpdatePublishStaleFlagMessage. Detaljer: id='26000' name='GeneralQueueJobFailed' uid='e52751bd-f874-e411-93fd-00155d007817' JobUID='a7d8e3b1-f574-e411-93fd-00155d007817' ComputerName='dbe6713d-1f94-451a-8426-16547c0b512f' GroupType='ProjectPublish' MessageType='UpdatePublishStaleFlagMessage' MessageId='32' Stage='MSP_UPDATE_PUBLISH_STALE_FLAGS' CorrelationUID='48b5cf9c-a9b3-8036-b512-f107af415cb9'. Der er flere oplysninger i ULS-logfilerne på computeren dbe6713d-1f94-451a-8426-16547c0b512f for poster med Job-UID a7d8e3b1-f574-e411-93fd-00155d007817.   

Also in the ULS logs I notice the following two lines:

 System.ArgumentException: The value's length for key 'application name' exceeds it's limit of '128'.   at System.Data.SqlClient.SqlConnectionString.ValidateValueLength(String value, Int32 limit, String key)   at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)   at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)   at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)   at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)   at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)   at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)   at Microsoft.Office.Project.Server.Data.SqlSession.OpenConnection()   at Microsoft.Office.Project.Server.Data.TransactionalSqlSession.RetrySqlConnectionInitialization(Action`1 initializer)   at Microsoft.Office.Project.Server.Data.TransactionalSqlSession.OpenConnection()   at Microsoft.Office.Project.Server.Data.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock).....  
   
 SqlCommand: '--Handle Update Using Sproc : MSP_Epm_UpdateWorkflowPhase SELECT @bp0 AS SQLBatchRequestColumnName; EXEC [dbo].MSP_Epm_UpdateWorkflowPhase @PhaseUID, @PhaseName, @PhaseDescription; '   CommandType: Text CommandTimeout: 30   Parameter: '@bp0' Type: UniqueIdentifier Size: 0 Direction: Input Value: 'cea2a731-f674-e411-93fd-00155d007817'   Parameter: '@PhaseUID' Type: UniqueIdentifier Size: 0 Direction: Input Value: 'caf3b122-9bc8-4f46-96b0-18976722ad9e'   Parameter: '@PhaseName' Type: NVarChar Size: 255 Direction: Input Value: 'Analyse'   Parameter: '@PhaseDescription' Type: NVarChar Size: 1000 Direction: Input Value: 'Opstarten af projektet hvor Start stage udføres'  

Solution:

The problem is apparently a new issue in SQL Server 2012. There is a limitation of 128 characters in the connection string and the problem only manifests itself when the queue starts to process jobs.
To solve the problem I simply renamed the Project Server database to something much shorter (SPDEV_PWA):


Of cause you also have to do a reprovisioning of the PWA instance after you rename the database. Otherwise Project Server will not be able to find your server.

On a site note: many SQL blogs suggested the file path to the database file (.mdf) was too long. I tried to move the database to the root of my E:\ drive but it did not solve the problem.



Ingen kommentarer:

Send en kommentar