Tridion 2013 SP1 Core service timeout with frequent requests
up vote
5
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
5
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
5
down vote
favorite
up vote
5
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 Dec 12 at 17:03
Atila Sos
2,6512720
2,6512720
asked Dec 12 at 16:25
Harald Greve
512214
512214
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
6
down vote
accepted
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
Dec 12 at 17:20
Updated my answer
– Atila Sos
Dec 12 at 18:41
add a comment |
up vote
3
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 |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "485"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
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
Dec 12 at 17:20
Updated my answer
– Atila Sos
Dec 12 at 18:41
add a comment |
up vote
6
down vote
accepted
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
Dec 12 at 17:20
Updated my answer
– Atila Sos
Dec 12 at 18:41
add a comment |
up vote
6
down vote
accepted
up vote
6
down vote
accepted
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 Dec 12 at 18:41
answered Dec 12 at 17:03
Atila Sos
2,6512720
2,6512720
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
Dec 12 at 17:20
Updated my answer
– Atila Sos
Dec 12 at 18:41
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
Dec 12 at 17:20
Updated my answer
– Atila Sos
Dec 12 at 18:41
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
Dec 12 at 17:20
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
Dec 12 at 17:20
Updated my answer
– Atila Sos
Dec 12 at 18:41
Updated my answer
– Atila Sos
Dec 12 at 18:41
add a comment |
up vote
3
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
3
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
3
down vote
up vote
3
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 Dec 12 at 19:55
Marko Milic
4,45121144
4,45121144
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