Files
Siro/docker/php/www-pool.conf
T
Hamza-AyedandClaude Opus 5 e106d2df4e توجيه error_log لمخرج الحاوية — كنا نشخّص الأعطال عمياناً
www-pool.conf كان يوجّه slowlog إلى /proc/self/fd/2 لكن لا شيء لـ error_log،
فكل رسائل error_log() في الباك إند تُبتلع ولا يظهر أي سطر في:
    docker compose logs php

والباك إند مليء بها ويعتمد عليها في التشخيص: [accept_ride] و [FCM_DEBUG]
(يطبع حمولة FCM ورد Google كاملاً) و 📲 [FCM_RESULT] و [SOCKET_DEBUG] و
[SSRF_BLOCKED] و [SOCKET_BLOCKED].

النتيجة العملية أن سبب فشل الإشعارات كان يمكن قراءته في سطر واحد من رد
Google (UNREGISTERED / INVALID_ARGUMENT / 403) بدل الاستنتاج من الكود.

catch_workers_output=yes ينقل stdout/stderr للعمّال، و decorate_workers_output=no
يمنع بادئات الضجيج، وphp_admin_value[error_log] يثبّت المسار على fd/2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 01:30:03 +03:00

22 lines
1.0 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
; حوض fpm مضبوط لصندوق مشترك 6 أنوية / 12GB (حصة الحاوية 2GB)
; قانون Little: ‏170 rps × ‏0.05 ثانية ≈ 9 طلبات متزامنة فقط — 48 عاملاً فيها هامش واسع
[www]
pm = dynamic
pm.max_children = 48
pm.start_servers = 8
pm.min_spare_servers = 4
pm.max_spare_servers = 16
pm.max_requests = 1000
pm.status_path = /status
slowlog = /proc/self/fd/2
request_slowlog_timeout = 3s
; ‏توجيه error_log إلى مخرج الحاوية — بلا هذه الأسطر تُبتلع كل رسائل
; ‏error_log() في الكود ولا يظهر شيء في `docker compose logs php`، والباك إند
; ‏مليء بها: [accept_ride] و [FCM_DEBUG] و 📲 [FCM_RESULT] و [SOCKET_DEBUG].
; ‏كنّا نشخّص أعطال الإشعارات استنتاجاً من الكود بدل قراءة سبب الرفض من Google.
catch_workers_output = yes
decorate_workers_output = no
php_admin_value[error_log] = /proc/self/fd/2
php_admin_flag[log_errors] = on