Thread Circuit Breaker for Resource Scheduling

  • Last update:August 18, 2025
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    /

    11.0.32

    Optimized triggering logics and prompts.

    11.0.34

    Added the configuration item Report Rate Limiting Threshold.

    Optimized triggering logics.

    Function Description

    Problems such as thread blocking may occur when users access project resources, which often leads to project downtime.

    FanRuan provides the Circuit Breaker of Resource Schedule function to provide a fault tolerance strategy for thread blocking problems and reduce downtime risks.

    11.0.34 and Later Versions

    Function Enabling

    1. Log in to the FanRuan application system as the admin and choose System Management > System Setting > General.

    2. In Downtime Prevention Configuration, enable Thread Circuit Breaker, configure Report Rate Limiting Threshold, and save the setting.

    • When Thread Circuit Breaker, the overall switch, is not enabled, the configuration of Report Rate Limiting Threshold is invalid.

    • You can customize Report Rate Limiting Threshold (default value: 0.5, namely 50%; valid setting range: decimal between 0 and 1).            image 35.png

    Function

    Check Triggering Condition:

    The system automatically triggers a thread pool status check every 40 processed requests.

    Load Judgment Criteria:

    The thread pool with the usage rate higher than 80% is judged to be in a high load state.

    The thread pool with the usage rate no higher than 80% is judged to be in a low load state.

    Scenario Description:

    Scenario

    Function Description

    Interruption upon multi-blocked threads

    Execution Timing: A check is triggered upon each report business submission.
    Judgement Condition: The system checks if a thread blocks more than five other threads.

    Executed Action: When the condition is met, the system will immediately interrupt the blocking thread.

    Interruption upon thread timeout

    Execution Timing: A check is triggered by every 40 processed requests.
    Judgement Condition:

    • In a high load state (thread pool usage rate > 80%): The system checks if any thread running for more than one hour.

    • In a low load state (thread pool usage rate ≤ 80%): The system checks if any thread running for more than eight hours.

    Executed Action: When the condition is met, the system will interrupt the corresponding thread that timed out.

    Thread pool expansion

    Execution Timing: A check is triggered upon each report business submission.

    Judgement Condition: The system checks if the usage rate of the thread pool exceeds 80% (high load state).

    Executed Action:

    • The system calculates the new thread pool capacity: Take the smaller value between twice the current capacity of the thread pool and 800.

    • The system expands the thread pool capacity to the newly-calculated value.

    Report thread flow control

    Execution Timing: A check is triggered upon each report business submission.

    Judgement Condition: The following three conditions need to be met simultaneously:

    • Thread pool usage rate > 80% (high load state)

    • Thread pool capacity = Upper expansion limit (namely, 800)

    • Ratio of current report business requests to total requests > Configured value of Report Rate Limiting Threshold

    Executed Action: The system will perform flow control on report business threads.

    11.0.33 and Earlier Versions

    Function Enabling

    The steps to enable the Circuit Breaker of Resource Schedule function vary according to different FineReport versions. Select the corresponding steps based on your situation.

    FineReport Version

    Enabling Procedure

    11.0.29 and Earlier   Versions

    You need to install the Circuit Breaker of Resource Schedule plugin of V1.4.3 or later   versions to enable the Circuit Breaker of Resource Schedule function.

    You can contact our technical support to download the plugin Circuit Breaker of Resource Schedule.

    For details about how to install the plugin in the designer, see Designer Plugin Management.

    For details about how to install the   plugin on the server, see Server Plugin Management.

    iconNote: 
    If you use the plugin of V1.4.2 or earlier versions, the system may report errors. So   ensure that you have updated the plugin.

    Versions 11.0.30 to   11.0.33

    1. Log in to the FanRuan application as the admin and choose System Management > System Setting > General.

    2. Enable Thread Circuit Breaker in Downtime Prevention Configuration.

    2.png

    iconNote:
    When FineReport is upgraded from 11.0.29 or earlier versions to 11.0.30 or later versions, the Circuit Breaker of  Resource Schedule plugin will be disabled automatically and Thread Circuit Breaker is disabled by default. You need to enable Thread Circuit Breaker manually.

    Function

    After the function is enabled, the following conditions take effect automatically.

    1. The original HTTP thread pool is replaced with an asynchronous thread pool.

    2. Threads are considered to be highly loaded when the CPU load exceeds 80% or when more than 85% threads in the report thread pool are used.

    The system will be triggered to detect thread blocking deadlocks and long execution threads every 15 seconds when threads are highly loaded.

    • If more than three threads are blocked in the same session, session closure will be triggered.

    • Deadlocked threads (if any) will directly be interrupted. Long execution threads (if any) will trigger the shutdown.

    • After threads are terminated, the message "The extremely high system memory pressure triggers the system anti-downtime protection. The current template calculation has been suspended. Try again later." will be displayed.

     


    Attachment List


    Theme: Decision-making Platform
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy