PHP_FCGI_MAX_IDLE_TIMEOUT environment variabile option for php-cgi
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.2k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 103
Mô tả
Description
I'm writing an "external" multiplatform php fastcgi process manager in golang for the caddy webserver, something like php-fpm but using the php-cgi executable in fastcgi mode;
while implementing it using socket passing to be faster simpler and have zero-copy between processes
i've found that i wanted to add an option in my process manager analogous to php-fpm pm.process_idle_timeout to free memory when the server load is low and to avoid eventual memory leaks
I've thinked about how to implement this feature for a while in a way that does not require modifying php-cgi itself, but without finding a solution that allowed to keeping zero-copy socket passing.
The proposal is to add an environment variabile option that instruct php-cgi processes to self terminate after a certain amount of time if no requests are received, something like the already existing PHP_FCGI_MAX_REQUESTS that already aligns with php-fpm pm.max_requests.
Eventually having millisecond granularity unlike second granularity only like in pm.process_idle_timeout will be a plus.
That Is... Hoping i'm not missing something obviuos and that the proposal make sense.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng việc xem xét vòng đời của tiến trình FastCGI php-cgi và tùy chọn PHP_FCGI_MAX_REQUESTS hiện có, vì không có tệp nguồn hoặc bài kiểm thử nào được nêu tên. Xác định cách cấu hình và đo thời gian chờ khi không hoạt động, sau đó bổ sung phạm vi kiểm thử cho thấy một tiến trình không hoạt động sẽ kết thúc trong khi một tiến trình đang nhận yêu cầu vẫn hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- c
- Lĩnh vực
- backend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100