Publish ends with an internal error : Error executing query

Hello,

I'm hoping that someone has some insight into this.

When publishing some of our modules in the dev environment the publish 'fails' with the following message.
Internal Error - Error Executing Query.
When viewed in the Service Center's error logs, the detail for the error is as follows:

eSpace:
ServiceCenter
Tenant:
ServiceCenter
User:
swarta
Session Id:
d+cuDImlDUm3HqmF054cEg==
Server:
DEVWEB
Module:

Message:
Error executing query. Error in advanced query GetConsumers in Espace_UpdateCache in Espace in ServiceCenter (SELECT DISTINCT {Espace}.*  from  {Espace_Reference}  inner join  {Espace_Version} on {Espace_Version}.[Id]={Espace_Reference}.[Consumer_Version_Id]   inner join  {Espace} on {Espace}.[Id]={Espace_Version}.[eSpace_Id]   where producer_ss_key=@key   and {Espace}.[Is_Active] = 1): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.


It's worth noting that despite the error, the module still appears to have been published when viewed in Service Center.

Things that happened before this....
An extensive refactor of a module was underway which involved splitting one module up into many smaller modules. 

This was abandoned and the method of rolling back was to delete all the newly created modules and re-publish the version of the main modules from teh application from before the refactor started. These 'rollback publishes' were done from Service Center without opening them in Service Studio. So the references were not refreshed.

Subsequent attempts at refreshing references and publishing from Service Studio have not been successful.

Has anyone experienced this before?

Thanks

Albert


One thing that has caused us issues in the past is the espace version history being too big. Outsystems support suggested that we prune old espace versions using the dbcleaner application from the forge or from servicecenter (the later is a pain as you can only delete an handful at a time so we use dbcleaner). 

Other issue could be that the backend database server isn't high enough specked for your environment. Are you using the full PaaS option, how many espaces and dev's do you have? is it a particularly large team or project?

The problem has been resolved. 

Looking at the query afresh this morning it seems as though it timed out while trying to determine what the consumers are of the module being published.

This timeout might be have been the result of :

  • Publishing older (rollback) versions from Service Center without refreshing the references in Service Studio, and then refreshing references in an illogical (not a specific order) way. This might have caused the references to be too many.
  • Spurious extra references coupled with a probably slow network in the late afternoon.

Resolution
I opened each module and updated its references before publishing.
I made sure that i did it in a top-down fashion. I.e the 'highest' producer first and then the consumers thereof, and so on until i got to the last consumer.
It might also be that early morning network speeds were better.

John Williams wrote:

One thing that has caused us issues in the past is the espace version history being too big. Outsystems support suggested that we prune old espace versions using the dbcleaner application from the forge or from servicecenter (the later is a pain as you can only delete an handful at a time so we use dbcleaner). 

Other issue could be that the backend database server isn't high enough specked for your environment. Are you using the full PaaS option, how many espaces and dev's do you have? is it a particularly large team or project?

Thank you for your reply John.
I don't think it had anything to do with what you suggested as it sorta 'self-resolved' this morning. My previous post has the details.

I'll be sure to keep the size of the version history in mind.

Cheers

Albert