Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Web Service CLR resulting in Timeouts Expand / Collapse
Author
Message
Posted Friday, September 25, 2009 7:47 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 12:45 PM
Points: 817, Visits: 1,647
Hi all - not sure if this is the proper forum for this post, since it kinda spans several different areas, but this was the closest fit I could find.

I have a set of CLR functions, written in C#, which invoke a web service call, and then return a value back based on the result of the query.

Recently, this CLR has been timing out on the database.

I've tested this to the limit of my knowledge, but could not locate the problem.

If I run the web service from my browser, it works - I get the response fine.
If I run the CLR straight from Visual Studio, it still works.
If I log on to the machine that the server is hosted on, and try the web service, it works.
From the server, if I run a very similar CLR, which accesses the same web service, but against a different website, it works.

So, my conclusion from all of this, is that it must have something to do with the communication between the server and the website. But I can't really continue any further, to try and figure out exactly what the problem is, and how to address it.

Any insight would be appreciated!
Post #793819
Posted Friday, September 25, 2009 9:10 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 12:45 PM
Points: 817, Visits: 1,647
Alright - so we just addressed the issue, by restarting SQL Server.

Not exactly the solution that I'd like to rely upon though, especially since this is a production server.

One thing we noticed is that the server is running on a 64-bit machine, but the machine only has 4GB of RAM, of which 3ish GB was being used by SQL Server. Upon restarting, it went down to around 150MB.

Now, we haven't noticed any performance problems from the fact that it has only 4GB of RAM, and I can't imagine why a shortage of RAM might impact the communication between the server and one website, while leaving the communication between the server and another website unaffected.

If anyone can help me find the problem that was there, and address it, I'd greatly appreciate it, as we plan on having other CLR processes running in the future, the importance of which will be far greater than that which we have currently running.
Post #793886
Posted Thursday, August 14, 2014 4:26 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, August 14, 2014 6:29 AM
Points: 1, Visits: 5
Hi,

I am experiencing the same issue right now.
scenario is same as your. but if web service and SQl server are on same machine, then it works fine (so URL is localhost). if i tried to call remote web service (or website), then it works 2 times, JUST 2 TIMES. from third call, it starts to time out.

It starts to work again after i restarted sql server. (just 2 calls only)

Could you please help me to overcome this.
Post #1603203
Posted Thursday, September 11, 2014 1:47 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 1:54 PM
Points: 368, Visits: 1,940
amilapradeep (8/14/2014)
I am experiencing the same issue right now.
scenario is same as your. but if web service and SQl server are on same machine, then it works fine (so URL is localhost). if i tried to call remote web service (or website), then it works 2 times, JUST 2 TIMES. from third call, it starts to time out.

It starts to work again after i restarted sql server. (just 2 calls only)

Could you please help me to overcome this.


Hi there. Considering that it does work a couple of times and then stops, that leads me to think that it is a resource issue. Are you properly closing the HttpWebRequest and any other resources that have a Close() method? I would not rely on a using() statement to take care of it but instead make sure to have the Close() calls in a finally block.

Any File System and Network resources opened will become orphaned and remain open if not properly closed.

Take care,
Solomon..





SQL# - http://www.SQLsharp.com/
Post #1612803
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse