fix: reduce memory_limit to 256M and configure PHP-FPM process management settings

This commit is contained in:
hamed
2026-07-08 17:54:20 +03:30
parent c6fa92b9a4
commit a5460cbaa9
15 changed files with 563 additions and 458 deletions
+3 -1
View File
@@ -1,5 +1,7 @@
; Production PHP settings for ClinicPro on Coolify
memory_limit = 1024M
; 256M is ample for API requests (uploads are capped at 32M below); the old 1024M
; let a single leaky/looping request eat a quarter of a small VPS before dying.
memory_limit = 256M
upload_max_filesize = 16M
post_max_size = 32M
max_execution_time = 60
+11
View File
@@ -5,3 +5,14 @@
; wrong environment. Keep the container env so compose-provided vars reach PHP.
[www]
clear_env = no
; Process manager: bounded pool + child recycling. Without pm.max_requests the
; default children live forever and slow PHP memory leaks accumulate for hours
; until the host OOMs (the messenger workers already recycle hourly; this gives
; FPM the same hygiene).
pm = dynamic
pm.max_children = 8
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 4
pm.max_requests = 500