Why. The APPLE_PROXY_HOST forward runs before the notice is stored. It has no timeout and no error handling, so when the forward target is down, every Apple notice throws: Apple gets a 500, and nothing is stored, queued or sent to AppsFlyer.
That has been happening on cdlbackend since 2025-06-16. It forwards to analytics.mapo.la/webhooks/13/apple, which no longer answers. The last row in cdlmapola.apple_notifications is 2025-06-16 14:11:52, and laravel.log shows about 130 cURL error 28: Failed to connect to analytics.mapo.la port 443 errors a day. dmvbackend's configmap forwards to the same dead host (/webhooks/42/apple), so it is most likely in the same state.
What changes.
The forward waits at most proxy_timeout seconds (new config key, env APPLE_PROXY_TIMEOUT, default 5) for both connect and response.
If the forward fails, a warning is logged and the backend carries on with its own processing as before.
Deployments without APPLE_PROXY_HOST are unaffected.
Tested on the live cdl pod's PHP 7.4 / Laravel 7.30.6, with the patched classes loaded in memory (no files changed in the pod):
dead host analytics.mapo.la: the warning was logged and the code reached its own processing after 5.02 s
live host analytics2.appchair.com/apple_notification/prep.cdl/: 200, reached own processing after 0.3 s
It only takes effect in a deployment once its image is rebuilt (composer dev-master).
**Why.** The `APPLE_PROXY_HOST` forward runs before the notice is stored. It has no timeout and no error handling, so when the forward target is down, every Apple notice throws: Apple gets a 500, and nothing is stored, queued or sent to AppsFlyer.
That has been happening on cdlbackend since 2025-06-16. It forwards to `analytics.mapo.la/webhooks/13/apple`, which no longer answers. The last row in `cdlmapola.apple_notifications` is 2025-06-16 14:11:52, and laravel.log shows about 130 `cURL error 28: Failed to connect to analytics.mapo.la port 443` errors a day. dmvbackend's configmap forwards to the same dead host (`/webhooks/42/apple`), so it is most likely in the same state.
**What changes.**
1. The forward waits at most `proxy_timeout` seconds (new config key, env `APPLE_PROXY_TIMEOUT`, default 5) for both connect and response.
2. If the forward fails, a warning is logged and the backend carries on with its own processing as before.
3. Deployments without `APPLE_PROXY_HOST` are unaffected.
**Tested** on the live cdl pod's PHP 7.4 / Laravel 7.30.6, with the patched classes loaded in memory (no files changed in the pod):
- dead host `analytics.mapo.la`: the warning was logged and the code reached its own processing after 5.02 s
- live host `analytics2.appchair.com/apple_notification/prep.cdl/`: 200, reached own processing after 0.3 s
It only takes effect in a deployment once its image is rebuilt (composer `dev-master`).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The APPLE_PROXY_HOST forward runs before the notice is stored, with no
timeout and no error handling. When the target is down, every notice
throws, Apple gets a 500 and nothing is stored or sent to AppsFlyer.
cdlbackend (analytics.mapo.la/webhooks/13) and dmvbackend (/42) have
been in that state since 2025-06-16.
Now the forward waits at most proxy_timeout seconds (APPLE_PROXY_TIMEOUT,
default 5) and a failure is only logged as a warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
warren
requested review from rjgonzale 2026-11-17 07:05:17 +00:00
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why. The
APPLE_PROXY_HOSTforward runs before the notice is stored. It has no timeout and no error handling, so when the forward target is down, every Apple notice throws: Apple gets a 500, and nothing is stored, queued or sent to AppsFlyer.That has been happening on cdlbackend since 2025-06-16. It forwards to
analytics.mapo.la/webhooks/13/apple, which no longer answers. The last row incdlmapola.apple_notificationsis 2025-06-16 14:11:52, and laravel.log shows about 130cURL error 28: Failed to connect to analytics.mapo.la port 443errors a day. dmvbackend's configmap forwards to the same dead host (/webhooks/42/apple), so it is most likely in the same state.What changes.
proxy_timeoutseconds (new config key, envAPPLE_PROXY_TIMEOUT, default 5) for both connect and response.APPLE_PROXY_HOSTare unaffected.Tested on the live cdl pod's PHP 7.4 / Laravel 7.30.6, with the patched classes loaded in memory (no files changed in the pod):
analytics.mapo.la: the warning was logged and the code reached its own processing after 5.02 sanalytics2.appchair.com/apple_notification/prep.cdl/: 200, reached own processing after 0.3 sIt only takes effect in a deployment once its image is rebuilt (composer
dev-master).🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.