FileBasedProject.PublishProject() succeeds but Studio indicates publish failed

We are having intermittent problems using the FIleBasedProject creation API. For some of the created projects we are unable to open in Studio. The error information states:

"The project with ID {0} can not be opened becasue it was not successfully published to the server"

However, the result of the PublishProject() call has a status of PublicationStatus.Published

Why are the projects not openable?

Parents
  • Are there any errors in the Exectution log (or other log files) of GroupShare from the time when the project was published?

  • We see this error repeated several times in the execution log at the time of the inconsistent publish:

    2017-09-07 13:41:49.913#Sdl.StudioServer.Services.ProjectServer.PackagePublisher#Finished package publishing - error.
    System.Data.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
    --- End of inner exception stack trace ---
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
    at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
    at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
    at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
    at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
    at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
    --- End of inner exception stack trace ---
    at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
    at System.Data.Objects.ObjectContext.CreateFunctionObjectResult[TElement](EntityCommand entityCommand, ReadOnlyMetadataCollection`1 entitySets, EdmType[] edmTypes, MergeOption mergeOption)
    at System.Data.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, MergeOption mergeOption, ObjectParameter[] parameters)
    at Sdl.StudioServer.Services.ProjectServer.PackageEntities.ProjectData.GetPublishedProjectInformation(Nullable`1 userGuid, String projectUniqueIds)
    at Sdl.StudioServer.Services.ProjectServer.ProjectServerManager.GetProjectDetails(Guid projectId)
    at Sdl.ProjectServer.Implementation.ProjectServer.ProjectServerEventPublisher.PublishProjectCreatedEvent(Guid projectId, IDictionary`2 assigneesAfter, List`1 languageFilesForAssiegnees, List`1 languageFileIds)
    at Sdl.StudioServer.Services.ProjectServer.PackagePublisher.Publish(Boolean useAssignment)
  • Seems like the SQL stored procedure [SDlSystem].[proj].[GetPublishedProjectInformation] is timing out for some reason.
    After a quick look at the SP, I would expect it to take (possibly significantly) longer if a greater number of project is published on the server.
    How many projects do you have on your server?
    Are there possibly any performance issues on the SQL Server?

    PS: Yes, PublicationStatus.Published is odd.
  • @Raphael, Do you mean a large number of projects already published on the server or a large number being published simultaneously. Our simultaneous load is low but I believe we do have a large number of completed projects.
  • We just took a longer look at your support case and we believe that this may be caused by the total number of projects published.

    However, other simultaneous - especially project related - activities may of course also play a role. However, this depends a bit on how exactly you do things (and may also depend also on the performance of your SQL Server).

     

    Interestingly, the stored procedure that times out according to your log files has not changed at all in GroupShare 2017.

    I believe Adrian will look at a few further details together with you and will discuss the further steps.

Reply Children
No Data