Publishing Internal Error!An error occurred in task 'Collects all runtime config...

Hi Guys,

Has anyone encountered this and know how to fix this? 

This happens when I tried to publish a module(Any module in my environment). (Publishing by Service Studio or ServiceCenter).

What's happen with my Environment???

Please tell me any idea TT!


Error Message : 

Internal Error: An error occurred in task 'Collects all runtime configurations and dumps them to a .configurations file.':
Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Details : System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   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, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, 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& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior


Hi,

It looks like something related to a SQL query, try seeing how many records you're trying to select in you SQL queries?  If you have advanced queries try to increase timeout property of your SQL, but of course, It will increase your page loading duration.


I hope it helps,

Hung Nguyen wrote:

Hi Guys,

Has anyone encountered this and know how to fix this? 

This happens when I tried to publish a module(Any module in my environment). (Publishing by Service Studio or ServiceCenter).

What's happen with my Environment???

Please tell me any idea TT!


Error Message : 

Internal Error: An error occurred in task 'Collects all runtime configurations and dumps them to a .configurations file.':
Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Details : System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   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, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, 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& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior


Hi Hung,

Can you provide a copy of your module, to try and upload it to a different environment?

It may be a temporary spike on your environment resources availability.

Thank you.

Best regards,

Paulo Moreira


Paulo Moreira wrote:

Hung Nguyen wrote:

Hi Guys,

Has anyone encountered this and know how to fix this? 

This happens when I tried to publish a module(Any module in my environment). (Publishing by Service Studio or ServiceCenter).

What's happen with my Environment???

Please tell me any idea TT!


Error Message : 

Internal Error: An error occurred in task 'Collects all runtime configurations and dumps them to a .configurations file.':
Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Details : System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   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, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, 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& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior


Hi Hung,

Can you provide a copy of your module, to try and upload it to a different environment?

It may be a temporary spike on your environment resources availability.

Thank you.

Best regards,

Paulo Moreira


Thanks for supporting me!

But i can't provide copy of module.

We changed enviroment 4 days ago.

I copied module from old enviroment to new environment. 

It seem be no problems until yesterday.

Can you suggest me some reasons for above error?


Nélio Dionisio wrote:

Hi,

It looks like something related to a SQL query, try seeing how many records you're trying to select in you SQL queries?  If you have advanced queries try to increase timeout property of your SQL, but of course, It will increase your page loading duration.


I hope it helps,


We're always set max records to 1000 for Agg or Sql.

Everything seem be goods until yesterday. I have not been able to publish again until now!

Thanks for supporting!

Hi, we just have the same error with you, but we are using on premise

after we use the profiler we found a locking query


SELECT DISTINCT E.SS_KEY CONSUMER_KEY, PRODUCER_SS_KEY PRODUCER_KEY, CONSUMER_VERSION_ID, PUBLISHED_PROD_VERSION_ID PRODUCER_VERSION_ID, PRODUCER_KIND, PRODUCER_NAME
FROM OSSYS_ESPACE_REFERENCE R
INNER JOIN (
    SELECT SS_KEY, VERSION_ID, PENDING_VERSION_ID FROM OSSYS_ESPACE WHERE IS_ACTIVE = 1
    UNION
    SELECT SS_KEY, VERSION_ID, VERSION_ID PENDING_VERSION_ID FROM OSSYS_EXTENSION WHERE IS_ACTIVE = 1
) E ON (E.PENDING_VERSION_ID IS NOT NULL AND R.CONSUMER_VERSION_ID = E.PENDING_VERSION_ID) OR (E.PENDING_VERSION_ID IS NULL AND R.CONSUMER_VERSION_ID = E.VERSION_ID)


and after that we try to Truncate the OSSYS_ESPACE_REFERENCE Table, and everything running well, but we still have no clue from Outsystems

Solution

Please do NOT start truncating system tables.

@Steven make sure you republish your full factory (including running configuration tool to publish ServiceCenter again). Never assume you can truncate a table and that it won't break your environment.


That issue is already fixed in the Oct.2019 CP2 release of the Platform (issue RPC-355)


Regards,

João Rosado

Solution

Just a heads up,

We are facing the exact same issue on version Oct.2019 CP2, so apparently the issue was not fully fixed yet.

We have opened a ticket and we are currently waiting a fix from Outsystems.