Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5847563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:44:10+00:00 2026-05-22T12:44:10+00:00

I have a WCF service that has a complex operationcontract that has to executed

  • 0

I have a WCF service that has a complex operationcontract that has to executed atomically i.e. either the entire operation succeeds or fails. The WCF service is hosted on IIS server in an ASP .NET application. This operation has a sequence of SQL commands that execute in a transaction. During tests I found that with concurrent access by 4 – 5 users, atleast one user gets “Transaction Deadlock” error.

I then looked at the serviceThrottling settings which I had set to

<serviceThrottling  maxConcurrentCalls ="5" maxConcurrentInstances ="50" maxConcurrentSessions ="5" />

and changed it to

<serviceThrottling  maxConcurrentCalls ="1" maxConcurrentInstances ="1" maxConcurrentSessions ="1" />

I have turned off session since I don’t need in the service contract. So I don’t know whether maxConcurrentSessions will be having any effect at all

<ServiceContract([Namespace]:="http://www.8343kf393.com", SessionMode:=SessionMode.NotAllowed)>

This way I was queuing up the requests so that the request are processed serially instead of concurrently. While the transaction issue got away, the process time increased which was expected.

I was wondering

  1. Whether serviceThrottling is the only way to resolve this issue ?

  2. How can I set serviceThrottling such that while the service will accept many requests at the same time but will process one at a time?

  3. Is setting the InstanceContextMode=InstancePerContext.PerCall relevant here since the application is ASP .Net application which in itself is multithreaded ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:44:10+00:00Added an answer on May 22, 2026 at 12:44 pm
    1. Well, i think your going about this the wrong way trying to solve a database deadlock with WCF throttling.
      you should try to understand why your database operations causes a deadlock, and try to avoid it (by using maybe locking hints.)
    2. a singleton will do what you ask , but that isnt very scalable.
    3. it is relevant but i think you get my drift , solve the deadlock in the database not in WCF.

    if its SQL server that you are using , theres a great tool to analyze deadlocks (and a lot more) and its called the SQL Profiler. Also its a fairly well documented topic in the SQL Books Online

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We currently have a WCF service that has been setup with its own DataContracts
I have a WCF service that is hosted inside a Windows Service. The Windows
I have a WCF service that lives side-by-side with an MVC2 web site. I'd
I have a WCF service that is called by a Windows Mobile application running
I have built a WCF Service that is being consumed by a Silverlight app.
I have a WCF that has two endpoints, one for https one for http.
I have a net.tcp WCF service, and I would like the OS to pick
I am going to develop a WCF service that connects back-end system with two
I have an asp.net web application that use FormsAuthentication. Now, the application has a
I've been trying to do a simple restful wcf service that will return JSON.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.