Custom Snippet crashing when parsing heavy multi-line webhook payloads from external automation runtimes?

Hi everyone,
I am currently working on a custom backend module in MODX Revolution 3 to collect and display diagnostic reports for our development team, and I am running into a tough caching and parsing issue with incoming webhooks. We have automated scripts routing data from deltaexector com to keep our team updated on build stability, but the custom snippet I wrote to process these payloads keeps throwing fatal PHP execution timeout errors.

The primary issue is that the raw data coming from our testing suite includes a lot of unescaped brackets, special layout symbols, and multi-line strings that MODX natively interprets as potential injection attempts or chunk tags. When the webhook hits our gateway page, the parser goes into an infinite loop trying to sanitize the text array, which completely locks up the resource rendering and spikes our server memory usage. Connected to this processing failure, I am also running into a related bug where trying to log these errors directly into the MODX system log via $modx->log() truncates the stack trace entirely if a user triggers the script via the delta executor app interface on their mobile testing layout. I have attempted to pre-filter the raw payload using htmlspecialchars and even tried disabling the MODX parser on the specific gateway resource using a clean plugin hook, but the system still struggles to handle the high-frequency stream smoothly. Has anyone here successfully built a web hook receiver or a telemetry dashboard inside MODX that handles complex external scripting syntax or raw terminal outputs? I would really appreciate any advice on how to bypass the standard content parsing loop for specific incoming POST requests without compromising the overall security configuration of our site.

The standard parsing loop only affects things that MODX renders out, not data pushed to it. Is your ingress supposed to echo the data out again? If not, then I’m not sure how you’re running into parsing issues.

If you’re willing to show how [part of] your code runs we may be able to pinpoint what’s going wrong.

Maybe instead of using a snippet, you could create a custom PHP file for the webhook, that loads MODX externally. This gives you more control over what exactly gets executed, and you still have access to the MODX functionality.