Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Web Service CLR resulting in Timeouts


Web Service CLR resulting in Timeouts

Author
Message
kramaswamy
kramaswamy
SSC Eights!
SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)

Group: General Forum Members
Points: 859 Visits: 1788
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!
kramaswamy
kramaswamy
SSC Eights!
SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)SSC Eights! (859 reputation)

Group: General Forum Members
Points: 859 Visits: 1788
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.
amilapradeep
amilapradeep
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
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.
Solomon Rutzky
Solomon Rutzky
Say Hey Kid
Say Hey Kid (661 reputation)Say Hey Kid (661 reputation)Say Hey Kid (661 reputation)Say Hey Kid (661 reputation)Say Hey Kid (661 reputation)Say Hey Kid (661 reputation)Say Hey Kid (661 reputation)Say Hey Kid (661 reputation)

Group: General Forum Members
Points: 661 Visits: 2935
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/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search