Limit Replacements Per Rule and Per Page Request

QCDR has two replacement ceilings: a per-Rule Maximum replacements per page value and a global Maximum replacements per request Runtime Safety setting. They work together to prevent a broad Rule set from transforming an unbounded number of matches.

Per-Rule Maximum Replacements

In a Rule, Maximum replacements per page accepts 0 through 100,000. A value of 0 means the Rule adds no extra cap of its own. It does not mean “make zero replacements.”

The Rule cap is applied after the Occurrences mode has selected candidate positions. For example, All occurrences with a Rule maximum of 3 changes at most the first three eligible occurrences selected for that Rule.

Global Request Ceiling

Under Settings > Runtime Safety, Maximum replacements per request is a hard total across all Rules for one frontend response. The current default is 10,000, and the setting is constrained to 1 through 100,000.

As Rules run, QCDR tracks the replacements already made. A later Rule receives only the remaining capacity. Reaching the global ceiling therefore protects the request even when several Rules individually allow many replacements.

How the Two Limits Interact

The effective number is whichever constraint becomes tighter first: the Rule's selected occurrences and per-Rule cap, or the remaining global request capacity. Neither setting makes an otherwise ineligible match eligible.

Recommended Use

  • Give broad text or markup Rules a modest per-Rule cap while proving the scope.
  • Keep the global ceiling high enough for legitimate site behavior but low enough to stop accidental runaway transformations.
  • Investigate an unexpectedly truncated Rule by checking both its per-Rule limit and the Runtime Safety total.

Related Runtime Safety

QCDR also has a maximum HTML response-size guard. Replacement ceilings are only one part of the runtime safety system; page/extension targeting, protected-area behavior, processing order, and fail-safe exception handling remain important.


Community Discussion

Want to compare workflows, share practical tips, or discuss how you use this QCDR feature? Visit the QC Dynamic Replacer Community. For private support, bug reports, account-specific issues, or feature requests, use the QuantaCade support system.