I am making a GUI Extensions that needs to get all Components and their schemas that are being used on the pages that the user selects.
To do this, I just get all PageData's (CoreServce) for the pages the User selected in the list. Then for each PageData I get the ComponentData and its SchemaFieldsData.
Now after exactly 164 calls on one of our environments and 27 on a local vagrant box, the process gets stuck on the call I make to the core service. It will stay stuck until the 10 min timeout has passed, and will then continue doing it's thing. The operation that hung the process also seems to be successful as the data is printed out in my logging (data only the componentData has).
When I debugged the TcmServiceHost it is stuck on a TryRead action to our MySQL database. But as this is a Read action, this makes it only stranger to me ..
Does anybody have any ideas as to what could cause this?
As for now, it is working, but the 10 min delay now and then slows the pages/min rate down drastically.
Thanks!
Thomas
Edit - Rick Pannekoek's question
Example of how I call the core service:
private static ComponentData GetComponent(string id, string requestingUser)
{
ComponentData componentData;
using (var client = TridionCoreServiceFactory.GetSessionAwareCoreServiceClient(requestingUser))
{
componentData = client.Read(id, DefaultReadOptions) as ComponentData;
}
return componentData;
}
The TridionCoreServiceFactory.GetSessionAwareCoreServiceClient function
public static IDisposableSessionAwareCoreServiceClient GetSessionAwareCoreServiceClient(string user = null)
{
var client = new DisposableSessionAwareCoreServiceClient(EndPoint);
if (user != null)
{
client.Impersonate(user);
Log.Debug("Impersonated Core Service session as {0}", user);
}
return client;
}
The implementation of the DisposableSessionAwareCoreServiceClient class:
public class DisposableSessionAwareCoreServiceClient : SessionAwareCoreServiceClient, IDisposableSessionAwareCoreServiceClient
{
...
protected virtual void Dispose(bool disposing)
{
if (_isDisposed || !disposing)
return;
_isDisposed = true;
try
{
if (State != CommunicationState.Closed)
base.Close();
}
catch (CommunicationException)
{
Abort();
}
catch (TimeoutException)
{
Abort();
}
catch (Exception)
{
Abort();
}
}
....
}
The IDisposableSessionAwareCoreServiceClient interface extends ISessionAwareCoreService and IDisposable