# What is a Recursive Trigger and how does it cause the Maximum trigger depth exceeded (limit: 16) error?

**Topic:** Apex Trigger · **Difficulty:** Medium · **Asked at:** Accenture, Wipro, EY · **Tags:** apex-trigger, trigger, recursion

Read it on the site: https://www.forcechallenges.com/interview-questions/what-is-a-recursive-trigger-and-how-does-it-cause-the-maximum-trigger-depth-exceeded-limit-16-error

## Answer

A recursive trigger is one whose logic performs DML that causes the same trigger (or another trigger that updates back) to fire again, repeatedly.

Example: an after update trigger on Account updates Accounts, which fires the after update trigger again, and so on. Salesforce allows trigger nesting only up to depth 16; beyond that it throws `Maximum trigger depth exceeded` and rolls back the transaction.

Prevent it with a static Set of processed Ids, by checking that field values actually changed, or by moving same-record changes into before triggers.

---
Source: ForceChallenges · last updated 2026-10-21
