C# Semaphore issue

Hi All,

I'll be happy to get your option on this, i have a webservice that uses Semaphore to access shared (VB) resources and i noticed that when there is an high volume of webservice calls the semaphore could no make locks using the WaitOne() method, when using it, it throws an exception "Thread was being aborted." after 2 minutes.
I believe its aprobably a timeout error, but not sure what is the cause..

Can someone please explain what effects the lock? why t could be completed? what effects the timeout and can i configure somthing on the code or IIS or machine level to prevent that?



  • I would make sure your locks are not getting stuck in a dead-lock or live-lock - look these terms up on the wikipedia
  • And if they are, what can i do abou it?
  • Well that would depend on where, why, and how it's getting into that situation I suppose.

    I'm not trying to be evasive - I'm just not familiar with whatever sdk you're using BUT if it has anything to do with thread locking then you will really want to understand what live and dead locks are in order to trouble shoot your issues.

    Did you read the wikipedia pages yet? they have a great explanation.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!