WCF Service Failing Every 23 Hours - Request Channel Timed Out
Oct 27, 2010
We have a WCF service self-hosted in a Windows Service. Right now we're experiencing a really strange behavior with it, which is that every 23 hours, approximately, the service raises an exception for every call made to it with the following error: Server was unable to process request. ---> The request channel timed out while waiting for a reply after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.---> The HTTP request to [URL]has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.---> The operation has timed out. The duration of the failure is between 4 and 6 minutes and, without touching anything at all, the service then goes out of the failure and the following responses are ok, for the next 23 hours, and then, again the error.
As pointed above, the WCF service is self-hosted in a Windows Service, installed on a Windows 2008 Server OS. The clients calling the service are two different Asp.NET web services, one running on the same server and the other on a virtual server in a production environment. Both clients have presented the same issue. The configuration of the complete environment is this: Phone calls are received in an IVR system (let's say node 1), which calls a web service (node 2) that retrieves some information about the customer calling. Once the customer approves the operation, the IVR calls the web service (node 2), which relays the call to the WCF Service (node 3) to process a credit operation. The WCF then makes a TCPIP socket operation through a VPN connection to another entity (node 4). That communication lasts between 3 and 10 seconds, is registered in a persistent database and then is sent back in the same path to the customer (node 3, 2 and 1). This platform processes about 2,000 transactions a day, 24/7, except for the ones failing with the timeout. The reason to have the transaction relayed to a second service is for security purposes. The amount of data exchanged in each call is about 200 or 300 bytes.
I've already tried most of the workarounds posted right here in stackoverflow ([http://stackoverflow.com/questions/981475/wcf-timeout-exception-detailed-investigation][1]) and the ones appearing there and some others found in google. The error is still persistent. The TCPIP socket operations are logged to a text file, and found no issues there with the response times from the external entity. The largest time was 9 seconds. Also, a database operations trace has been logged and did not show any performance issues either. The concurrency mode of the service is set to ConcurrencyMode.Multiple and, before going into production we made an stress test with ten clients making iterative calls over 2 hours, processing the wcf service about 30k transactions with no signs of performance impact. However, I already discarded a concurrency issue because the average time between transactions is one minute, and the largest one lasts for 9 seconds approximately. Besides, all other transactions complete successfully, independently of the load on the service.
I cannot increase the timeout of one minute given the fact that the service is for executing ecommerce operations and in fact there's nothing really taking more than a few seconds to complete. This are the facts, and I hope you guys could come up with something I haven't already tried yet. Please have in mind at the time of answering that this is a critical mission service, and the changes or configurations possible to apply in a production environment are very limited.
View 2 Replies
Similar Messages:
Mar 31, 2010
I am calling web service which takes very long time to execute due to which i get request timed out exception....
I hav kept my web method processing in try catch block....
even i have handled httpException....but it gives Request timed out exception..
View 1 Replies
Nov 1, 2010
I have a thread class which makes a web request. After 20-30 urls request, its throwing exception: System.Web.HttpException: Request timed out. My code is below where it is throwing exception:
httpReq.AllowAutoRedirect = false;
httpReq.KeepAlive = false;
httpReq.Headers.Add("Location", "");
httpReq.Timeout = this.HttpRequestTimeout;
httpRes = (HttpWebResponse)httpReq.GetResponse();
In last line : httpRes = (HttpWebResponse)httpReq.GetResponse(); it is throwing exception. "The remote server returned an error: (403) Forbidden."
View 1 Replies
Oct 6, 2010
We have page that allows the users to upload documents (multiple). When the upload takes a long time - either due to the size of the files or due to slow upload speeds - we get a exception saying "Request timed out".
We found that the exception is thrown as soon as the upload is complete. So we have modified the executionTimeout config entry to 6000 secs. But this error still shows up consistently. We are running IIS6, .net 3.5 sp1 (asp .net 2.0).
Update.I'm able to reproduce this issue with relatively small files (multiple files with total of 75MB)
View 4 Replies
Feb 17, 2010
I am getting this ajax timeout error.I am using updatepanel and update progress. Locally am not getting this error but after hosting this error is coming and the page is not navigating to the next page to show the result.
I tried most of the solutions eplained like below,
http://forums.asp.net/p/1042916/2700600.aspx#2700600
http://forums.asp.net/p/1042916/3582830.aspx#3582830
http://forums.asp.net/p/1189929/2040856.aspx#2040856
http://forums.asp.net/p/1355876/2781123.aspx#2781123
View 4 Replies
Nov 4, 2010
i have a web application which which proccesses some request on some data that client selects, when the client selects more than 20 objects and clicks on proceed the client recieves this error, because the server takes a long time to process, however if the records are less and hence a timely response is recieved, no such error comes?
i have increased the sessiontimeout as well as set the
View 1 Replies
Nov 9, 2010
So I have an unmanaged C++ dll which I am calling from my ASP.NET application, it has a single entry point and a couple of structures for passing data. If I create a C# console app to call the dll it works fine. If I hook it in to my asp.net app running on my local WinXP machine (IIS 5.1) then it works fine.
When I publish it to our development environement which is running Windows 2003 and IIS 6 then the first 1 or 2 calls works fine but then it simply stops responding. I'm getting no error messages, warnings etc... but I am fast running out of hair!
I've set the virtual directory which runs the asp.net app up inside of its own application pool but this seems to have had no impact.
View 2 Replies
May 15, 2010
I have a webservice which works 100% fine on my developer machine. Where Web Service is installed on LOCALHOST on my developer machine,Then i went to my servers, I installed webservice on one server and map it with the server where the website is hosted, Then i tried accessing this service using BROWSER from my web server, it worked fine, That means the mapping was done perfect.Then i run my program on web server (website). It worked fine on page1, then on page2, but when i did the same and call same function on page3, It popped me any error of
View 4 Replies
Feb 8, 2010
I want to create a web method that accepts a List of custom objects (passed in via jQuery/JSON). When I run the website locally everything seems to work. jQuery and ASP.NET and everyone is happy. But when I put it on one of our servers it blows up. jQuery gets a 500 error after the ajax request with the response being:
System.InvalidOperationException: EditCustomObjects Web Service method name is not valid.
[WebMethod]
public void EditCustomObjects(int ID, List<CustomObject> CustomObjectList)
[code]...
View 8 Replies
Jan 29, 2011
I have a grid view which contains Hours as one of the columns.. now, i need to have a total hours in the footer (sum of hours for all rows).
View 2 Replies
Jan 11, 2011
I'm submitting a request to a web service, but I'm receiving some errors. They've asked to see an example of the xml request and response. I used Visual Studio to consume the web service, so I'm just calling a method in my code - I don't actually see any xml. Is there a way to grab the XML request and response as XML or at least a text string?
View 2 Replies
Mar 18, 2011
I've got this application that works locally and when deployed and using a .mdf SQL Express database file (which I usually use for testing purposes). However, when I change it to work with our SQL Server 2008 the app works but the service doesn't. For example if in my code behind of a page I have a button that adds data to a table such as this it works fine:
public static string connString = @"Data Source=server1;Initial Catalog=Project;Integrated Security=True";
protected void btnAddProj_Click(object sender, EventArgs e)
{
using (var sqlc = new SqlConnection(connString))
{
sqlc.Open();
var cmd = sqlc.CreateCommand();
int intProjectID;
// Add the project info to the database
cmd.CommandText = "INSERT INTO tblProject VALUES(@ProjName,@ProjTeam,@ProjStart,@ProjEnd)";
cmd.Parameters.Add("ProjName", System.Data.SqlDbType.NVarChar).Value = txtProjName.Text;
cmd.Parameters.Add("ProjTeam", System.Data.SqlDbType.Int).Value = ddlTeamSupported.SelectedValue;
cmd.Parameters.Add("ProjStart", System.Data.SqlDbType.NVarChar).Value = txtStartDate.Text;
cmd.Parameters.Add("ProjEnd", System.Data.SqlDbType.NVarChar).Value = txtEndDate.Text;
cmd.ExecuteNonQuery();
}
}
My web.config is setup to use impersonation on that server and all works perfectly well. However, for my service the query doesn't seem to return anything and I get a 400 Bad Request error. The code for the jquery is:
$.ajax({
type: "POST",
async: false,
url: "Services/ProjectService.svc/test",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
console.log(data);
}
});
And for the Service:
[ServiceContract]
public interface IProjectService
{
[OperationContract]
[WebInvoke(ResponseFormat = WebMessageFormat.Json)]
ArrayList test();
}
public static string connString = @"Data Source=server1;Initial Catalog=Project;Integrated Security=True";
public ArrayList test()
{
var sqlc = new SqlConnection(connString);
sqlc.Open();
var cmd = sqlc.CreateCommand();
cmd.CommandText = "SELECT ProjectID FROM tblProject";
var reader = cmd.ExecuteReader();
ArrayList temparray = new ArrayList();
while (reader.Read())
{
temparray.Add(reader[0]);
}
sqlc.Close();
return temparray;
}
If instead of querying the database I have the service just return static data then it works fine. What could cause my service not to be able to connect to the database when the rest of the code behind for the app works?
View 3 Replies
Oct 5, 2010
[Code]....Web Service Getting Request
[Code]....
View 1 Replies
Jun 1, 2010
I have an asp.net web service which has SSL enabled via IIS. It works fine if the user uses https, however I have a user that insists on using http on the url.
What I'd like to do is have the web service (asmx) do the equivalent of the response.redirect to change http to https automatically.
I don't believe that I can do this from a web service so does anyone know a of a similar solution for web services.
View 4 Replies
Apr 26, 2010
I'm developing a client of a webservice in C# with VS.NET 2008.And I would like view the xml response of my request to the web service. which i have call . Is it posible?
View 2 Replies
May 26, 2010
I have an ASP.NET web application that I can't modify (I only have the binaries). This application connects to a web service and it seems like the connection is closed from the client side (my web app). I have increased the "executionTimeout" in the machine.config of the destination server but my web app seems to still stop after waiting for a while.
Is there a way to increase the timeout time for my web application by simply modifying the web.config? As I said... I can't modify the timeout in the code so my only option would be through config files.
View 1 Replies
Feb 10, 2010
I am using .NET roles and membership model to manage user accounts in my system back-end.
If the request is come from within my web-app, I can authenticate through form.
But if the user is requesting from else where, maybe their own apps, how to I do authentication?
attach username and password (GET/POST) and then secure the line by SSL? is that what I should do?
View 3 Replies
Nov 11, 2010
Am consuming a web service for example Calculator
Calculator CALC = new Calculator();
int a = CALC.Add("23","27");
and result will be stored in a;
Please help me to encrypt this request using the X509 certificate. Am having a certificate with public key and with subject "My Calculator"and also decrypt the result with the private key "abcdef" and with subject "My Response"
View 2 Replies
Jun 10, 2010
I have a wcf service that randomly begins to fail when requesting the autogenerated javascript that wcf supports making. But I have no luck tracking down why. The js thing is part of the wcf featureset, so I dont know how it can suddenly begin to fail and be unable to work until IIS is recycled.
The http log gives me:
2010-06-10 09:11:49 W3SVC2095255988 myip GET /path/myservice.svc/js _=1276161113900 80 - ip browser 500 0 0
So its an error 500, and that is about the only thing I can figure out. The event log contains no information.
Requests to /path/myservice.svc works just fine. After recycling IIS it works again, and some days later it begins to fail until I recycle IIS.
<service
name="path.myservice"
behaviorConfiguration="b">
<endpoint
address=""
behaviorConfiguration="eb"
binding="webHttpBinding"
contract="path.Imyservice" />
</service>
...
<endpointBehaviors>
<behavior name="eb">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="b">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
I dont see any problems in the web.config settings either.
Edit:
Just to make it clear - It is the generation of javascript that fails, my code is never invoked. Calls to the service works just fine.
View 2 Replies
Aug 25, 2010
where i need to understand the Raw XML Request and Response send thru when an web service API is called.We are using a Third part web service i.e. we have reference a third party wsdl file in our application and using its APIs defined.For Authentication purpose we are using web service extension in Framework 2.0
View 1 Replies
Apr 4, 2011
I am using a web method of a company's web service.
This web method requires one parameter when calling it:
CompanyOpereations srv = new CompanyOperations();
srv.getCustomerInfo(input);
How can I see my soap request xml when calling this method?
View 2 Replies
Feb 21, 2011
I've got a web service on a server with valid IP and valid DNS entries. I'm using an asynchronous thread in a WPF .NET application to access methods from that web service. Under normal connection conditions, for almost all users, the connection and method works fine. Under a very specific condition - Verizon Aircard being used to connect, no VPN connection to the company through SSTP, on a PC with Forefront Client Security installed - the web service will return a "HTTP Error 400: Bad Request" error to the user. If the same user on the same PC connect their VPN connection, the method works flawlessly.
View 1 Replies
Mar 1, 2011
īm trying to pass a header to a web service using jquery but i canīt. Iīm a NEWB at AJAX so please be gentle.
[Code]....
View 2 Replies
Jun 13, 2010
for the past couple of days i am facing an issue where the first call from my ASP.NET 4 application (VS 2010 Web Site) hosted in IIS 7 to an XML web service is dead-slow. subsequent calls are fast until the AppDomain is restarted.
I have tried all solutions related to pre-generating the serializer assembly but nothing worked. Anyway THEN I was sure it is an IIS-only issue because if i consume the xml web service from a console .net application then all the calls are fast. its even fast from an ASP.NET web site NOT hosted in IIS instead running on the development server. SO clearly the problem is there only when my app is hosted in IIS.
View 1 Replies
Aug 23, 2010
I am trying to create a web service that can do the following functionality:
Request XML
[Code]....
How can I create web service to do this.
View 1 Replies