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 559737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:16:09+00:00 2026-05-13T12:16:09+00:00

I have a web service, implemented with WCF and hosted in IIS7, with a

  • 0

I have a web service, implemented with WCF and hosted in IIS7, with a submit-poll communication pattern. An initial request is made, which returns quickly and kicks off a background process. The client polls for the status of the background process. This interface is set and can’t be changed (it’s a simulation of an external service we depend on).

I implemented the background processing by adding another service contract to the existing service with a one-way message contract that starts the long-running process. The “background” service keeps a database updated with the status in order to communicate with the main service. This avoids creating any new web services or items to deploy.

The problem is that the background process is very CPU intensive, and it seems to be starving the other service calls out. It will take up an entire processor, and while a single instance of the background process is running, status polling calls to the main service can take over a minute. I don’t care how long the background process takes.

Is there any way to throttle the resource usage of the background method? Or an obvious way to do long running async processes in WCF without changing my submit/poll service contract? Would separating them into different web services help if the two services were still running on the same server?

  • 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-13T12:16:10+00:00Added an answer on May 13, 2026 at 12:16 pm

    The first thing I would try would be to lower the priority.

    If you’re actually spinning off a separate process for the background work, then you can do it like this:

    Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal;
    

    If it’s really just a background thread, use this instead (from within the thread):

    Thread.CurrentThread.Priority = ThreadPriority.BelowNormal;
    

    (Actually, it’s better to start the thread suspended and change the priority at the caller before running it, but it’s generally OK to lower your own priority.)

    At the very least it should help determine whether or not it’s really a CPU issue. If you still have problems after lowering the priority then it might be something else that’s getting starved, like file or network I/O.

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

Sidebar

Related Questions

I have a web service implemented in WCF. This service is only going to
We have an implemented a WCF service for sync framework communication with the guidance
i have the WCF web service within my solution. service has interface which implemeted
I have a WPF application which talks to a WCF service hosted in IIS.
I have various bits of functionality implemented in WCF web services which are currently
I have a WCF RESTful web service , I have implemented cache mechanism using
I have some REST web services implemented in WCF. I wish to make these
I have a web service, defined(WSDL) and implemented in PHP. This one is relatively
I have implemented a web service with server and client authentication using keytool. The
I have web service which i want to use to upload image to the

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.