Tridion 2013 SP1 Core service timeout with frequent requests
up vote
3
down vote
favorite
We have a problem whereby after making a certain (larger) number of requests to the Core Service, the requests begin to time out with the following message:
The request channel timed out while waiting for a reply after
00:01:00. Increase the timeout value on the Binding. The time allotted
to this operation may have been a portion of a longer timeout.
The failure is on:
Tridion.ContentManager.CoreService.Client.ISessionAwareCoreService.Read(String
id, ReadOptions readOptions)
When initializing the core service client we do this:
ISessionAwareCoreService coreServiceClient = factory.CreateChannel();
I suspect, given other posts, that the problem is that the coreServiceClient
is not disposed of once we've finished with it, and thus we get to a point where we are unable to create any further connections.
Other posts on a similar topic: /WebUI/Models/TCM54/Services/General.svc/GetUserSettings taking TEN minutes to respond
Is there a way to dispose of the coreServiceClient
when we are finished with it, and does this seem like a plausible cause of the issue?
2013-sp1 core-service
add a comment |
up vote
3
down vote
favorite
We have a problem whereby after making a certain (larger) number of requests to the Core Service, the requests begin to time out with the following message:
The request channel timed out while waiting for a reply after
00:01:00. Increase the timeout value on the Binding. The time allotted
to this operation may have been a portion of a longer timeout.
The failure is on:
Tridion.ContentManager.CoreService.Client.ISessionAwareCoreService.Read(String
id, ReadOptions readOptions)
When initializing the core service client we do this:
ISessionAwareCoreService coreServiceClient = factory.CreateChannel();
I suspect, given other posts, that the problem is that the coreServiceClient
is not disposed of once we've finished with it, and thus we get to a point where we are unable to create any further connections.
Other posts on a similar topic: /WebUI/Models/TCM54/Services/General.svc/GetUserSettings taking TEN minutes to respond
Is there a way to dispose of the coreServiceClient
when we are finished with it, and does this seem like a plausible cause of the issue?
2013-sp1 core-service
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
We have a problem whereby after making a certain (larger) number of requests to the Core Service, the requests begin to time out with the following message:
The request channel timed out while waiting for a reply after
00:01:00. Increase the timeout value on the Binding. The time allotted
to this operation may have been a portion of a longer timeout.
The failure is on:
Tridion.ContentManager.CoreService.Client.ISessionAwareCoreService.Read(String
id, ReadOptions readOptions)
When initializing the core service client we do this:
ISessionAwareCoreService coreServiceClient = factory.CreateChannel();
I suspect, given other posts, that the problem is that the coreServiceClient
is not disposed of once we've finished with it, and thus we get to a point where we are unable to create any further connections.
Other posts on a similar topic: /WebUI/Models/TCM54/Services/General.svc/GetUserSettings taking TEN minutes to respond
Is there a way to dispose of the coreServiceClient
when we are finished with it, and does this seem like a plausible cause of the issue?
2013-sp1 core-service
We have a problem whereby after making a certain (larger) number of requests to the Core Service, the requests begin to time out with the following message:
The request channel timed out while waiting for a reply after
00:01:00. Increase the timeout value on the Binding. The time allotted
to this operation may have been a portion of a longer timeout.
The failure is on:
Tridion.ContentManager.CoreService.Client.ISessionAwareCoreService.Read(String
id, ReadOptions readOptions)
When initializing the core service client we do this:
ISessionAwareCoreService coreServiceClient = factory.CreateChannel();
I suspect, given other posts, that the problem is that the coreServiceClient
is not disposed of once we've finished with it, and thus we get to a point where we are unable to create any further connections.
Other posts on a similar topic: /WebUI/Models/TCM54/Services/General.svc/GetUserSettings taking TEN minutes to respond
Is there a way to dispose of the coreServiceClient
when we are finished with it, and does this seem like a plausible cause of the issue?
2013-sp1 core-service
2013-sp1 core-service
edited 7 hours ago
Atila Sos
2,5441720
2,5441720
asked 8 hours ago
Harald Greve
500214
500214
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
You should definitely dispose of the client once you're done with it. Increasing timeouts is always an option but most of the time it's just masking an issue and not confronting the root cause.
To dispose the client:
In 2013 you can do:
if (_client.State == CommunicationState.Faulted)
{
_client.Abort();
}
else
{
_client.Close();
}
For Web 8 and later, you can do the following:
_client.Dispose();
Or simply use a using
block which will call dispose for you.
See here
UPDATE
Based on the comment.
You can switch your implementation to the SessionAwareCoreServiceClient
class (the rest of the code remains the same). To instantiate it, you can use the following code fragment (with the appropriate constructor (for example with the EndPointConfigurationName
)):
SessionAwareCoreServiceClient client = new SessionAwareCoreServiceClient();
The problem I have is that the ISessionAwareCoreService type used is not implicitly convertible to System.IDisposable. I don't have any of those aforementioned commands available on my ISessionAwareCoreService instance.
– Harald Greve
7 hours ago
Updated my answer
– Atila Sos
6 hours ago
add a comment |
up vote
0
down vote
Besides everything Atila said in his answer, i would like to state that you can use ChannelFactory
class also to instantiate web client and use it like in the snippet bellow:
using (ChannelFactory<ISessionAwareCoreService> chanelFactory = new ChannelFactory<ISessionAwareCoreService>(endpoint))
{
chanelFactory.Credentials.Windows.ClientCredential = new NetworkCredential(coreServiceUser, coreServicePass);
ISessionAwareCoreService client = chanelFactory.CreateChannel();
//use client here
}
Please make note that it is also instantiating client within using blocks, so its auto disposed.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
You should definitely dispose of the client once you're done with it. Increasing timeouts is always an option but most of the time it's just masking an issue and not confronting the root cause.
To dispose the client:
In 2013 you can do:
if (_client.State == CommunicationState.Faulted)
{
_client.Abort();
}
else
{
_client.Close();
}
For Web 8 and later, you can do the following:
_client.Dispose();
Or simply use a using
block which will call dispose for you.
See here
UPDATE
Based on the comment.
You can switch your implementation to the SessionAwareCoreServiceClient
class (the rest of the code remains the same). To instantiate it, you can use the following code fragment (with the appropriate constructor (for example with the EndPointConfigurationName
)):
SessionAwareCoreServiceClient client = new SessionAwareCoreServiceClient();
The problem I have is that the ISessionAwareCoreService type used is not implicitly convertible to System.IDisposable. I don't have any of those aforementioned commands available on my ISessionAwareCoreService instance.
– Harald Greve
7 hours ago
Updated my answer
– Atila Sos
6 hours ago
add a comment |
up vote
3
down vote
You should definitely dispose of the client once you're done with it. Increasing timeouts is always an option but most of the time it's just masking an issue and not confronting the root cause.
To dispose the client:
In 2013 you can do:
if (_client.State == CommunicationState.Faulted)
{
_client.Abort();
}
else
{
_client.Close();
}
For Web 8 and later, you can do the following:
_client.Dispose();
Or simply use a using
block which will call dispose for you.
See here
UPDATE
Based on the comment.
You can switch your implementation to the SessionAwareCoreServiceClient
class (the rest of the code remains the same). To instantiate it, you can use the following code fragment (with the appropriate constructor (for example with the EndPointConfigurationName
)):
SessionAwareCoreServiceClient client = new SessionAwareCoreServiceClient();
The problem I have is that the ISessionAwareCoreService type used is not implicitly convertible to System.IDisposable. I don't have any of those aforementioned commands available on my ISessionAwareCoreService instance.
– Harald Greve
7 hours ago
Updated my answer
– Atila Sos
6 hours ago
add a comment |
up vote
3
down vote
up vote
3
down vote
You should definitely dispose of the client once you're done with it. Increasing timeouts is always an option but most of the time it's just masking an issue and not confronting the root cause.
To dispose the client:
In 2013 you can do:
if (_client.State == CommunicationState.Faulted)
{
_client.Abort();
}
else
{
_client.Close();
}
For Web 8 and later, you can do the following:
_client.Dispose();
Or simply use a using
block which will call dispose for you.
See here
UPDATE
Based on the comment.
You can switch your implementation to the SessionAwareCoreServiceClient
class (the rest of the code remains the same). To instantiate it, you can use the following code fragment (with the appropriate constructor (for example with the EndPointConfigurationName
)):
SessionAwareCoreServiceClient client = new SessionAwareCoreServiceClient();
You should definitely dispose of the client once you're done with it. Increasing timeouts is always an option but most of the time it's just masking an issue and not confronting the root cause.
To dispose the client:
In 2013 you can do:
if (_client.State == CommunicationState.Faulted)
{
_client.Abort();
}
else
{
_client.Close();
}
For Web 8 and later, you can do the following:
_client.Dispose();
Or simply use a using
block which will call dispose for you.
See here
UPDATE
Based on the comment.
You can switch your implementation to the SessionAwareCoreServiceClient
class (the rest of the code remains the same). To instantiate it, you can use the following code fragment (with the appropriate constructor (for example with the EndPointConfigurationName
)):
SessionAwareCoreServiceClient client = new SessionAwareCoreServiceClient();
edited 6 hours ago
answered 7 hours ago
Atila Sos
2,5441720
2,5441720
The problem I have is that the ISessionAwareCoreService type used is not implicitly convertible to System.IDisposable. I don't have any of those aforementioned commands available on my ISessionAwareCoreService instance.
– Harald Greve
7 hours ago
Updated my answer
– Atila Sos
6 hours ago
add a comment |
The problem I have is that the ISessionAwareCoreService type used is not implicitly convertible to System.IDisposable. I don't have any of those aforementioned commands available on my ISessionAwareCoreService instance.
– Harald Greve
7 hours ago
Updated my answer
– Atila Sos
6 hours ago
The problem I have is that the ISessionAwareCoreService type used is not implicitly convertible to System.IDisposable. I don't have any of those aforementioned commands available on my ISessionAwareCoreService instance.
– Harald Greve
7 hours ago
The problem I have is that the ISessionAwareCoreService type used is not implicitly convertible to System.IDisposable. I don't have any of those aforementioned commands available on my ISessionAwareCoreService instance.
– Harald Greve
7 hours ago
Updated my answer
– Atila Sos
6 hours ago
Updated my answer
– Atila Sos
6 hours ago
add a comment |
up vote
0
down vote
Besides everything Atila said in his answer, i would like to state that you can use ChannelFactory
class also to instantiate web client and use it like in the snippet bellow:
using (ChannelFactory<ISessionAwareCoreService> chanelFactory = new ChannelFactory<ISessionAwareCoreService>(endpoint))
{
chanelFactory.Credentials.Windows.ClientCredential = new NetworkCredential(coreServiceUser, coreServicePass);
ISessionAwareCoreService client = chanelFactory.CreateChannel();
//use client here
}
Please make note that it is also instantiating client within using blocks, so its auto disposed.
add a comment |
up vote
0
down vote
Besides everything Atila said in his answer, i would like to state that you can use ChannelFactory
class also to instantiate web client and use it like in the snippet bellow:
using (ChannelFactory<ISessionAwareCoreService> chanelFactory = new ChannelFactory<ISessionAwareCoreService>(endpoint))
{
chanelFactory.Credentials.Windows.ClientCredential = new NetworkCredential(coreServiceUser, coreServicePass);
ISessionAwareCoreService client = chanelFactory.CreateChannel();
//use client here
}
Please make note that it is also instantiating client within using blocks, so its auto disposed.
add a comment |
up vote
0
down vote
up vote
0
down vote
Besides everything Atila said in his answer, i would like to state that you can use ChannelFactory
class also to instantiate web client and use it like in the snippet bellow:
using (ChannelFactory<ISessionAwareCoreService> chanelFactory = new ChannelFactory<ISessionAwareCoreService>(endpoint))
{
chanelFactory.Credentials.Windows.ClientCredential = new NetworkCredential(coreServiceUser, coreServicePass);
ISessionAwareCoreService client = chanelFactory.CreateChannel();
//use client here
}
Please make note that it is also instantiating client within using blocks, so its auto disposed.
Besides everything Atila said in his answer, i would like to state that you can use ChannelFactory
class also to instantiate web client and use it like in the snippet bellow:
using (ChannelFactory<ISessionAwareCoreService> chanelFactory = new ChannelFactory<ISessionAwareCoreService>(endpoint))
{
chanelFactory.Credentials.Windows.ClientCredential = new NetworkCredential(coreServiceUser, coreServicePass);
ISessionAwareCoreService client = chanelFactory.CreateChannel();
//use client here
}
Please make note that it is also instantiating client within using blocks, so its auto disposed.
answered 4 hours ago
Marko Milic
4,38121144
4,38121144
add a comment |
add a comment |
Thanks for contributing an answer to Tridion Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftridion.stackexchange.com%2fquestions%2f19581%2ftridion-2013-sp1-core-service-timeout-with-frequent-requests%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown