Announcement Announcement Module
Collapse
No announcement yet.
poller ocuppy cpu 100% Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        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%?

        Comment

        Working...
        X