Results 1 to 4 of 4

Thread: poller ocuppy cpu 100%

  1. #1
    Join Date
    Oct 2008
    Posts
    18

    Default poller ocuppy cpu 100%

    I configurated spring integration in my web application as follows:
    Code:
    ......
    <pool-executor id="dispatcherPoolExecutor" core-size="5" max-size="10" queue-capacity="10" keep-alive-seconds="120" rejection-policy="DISCARD" />
    <service-activator input-channel="orderChannel" ref="orderTarget" output-channel="cafeChannel">
        <poller period="1000" task-executor="dispatcherPoolExecutor" />
    </service-activator>
    ......
    I find the process "javaw" occupy cpu 100%. But when I commented out the poller subelement in service activator, cpu went well. Could you tell me what is the matter and what should I do to avoid this problem?

  2. #2
    Join Date
    Oct 2008
    Posts
    18

    Default

    Additional remarks:
    Whatever I ajusted the attributes of "pool-executor" and "poller" elements had no effect. The only approach was to comment out the "poller" subelement in "service-activator" element.

  3. #3
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    Try removing the "rejection-policy" element or you can explicitly specify the same value as the default: CALLER_RUNS

    With CALLER_RUNS, the calling thread will run whenever a task is rejected due to no available threads. That effectively throttles the requests. Otherwise, by simply DISCARD-ing and continuing, it will thrash.

  4. #4
    Join Date
    Oct 2008
    Posts
    18

    Default

    Cpu went normal when I removed "rejection-policy" as you suggested. But I wanted to discard some tasks when they were not responsed in time in my project, as the service responsed to requests maybe run in high load, and I wish this will not influence the requester's run. Then what should I do to realize it under the condition that DISCARD may occupy cpu 100%?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •