cschantz
|
1afe7c476a
|
Add comprehensive PHP metrics tracking documentation
DOCUMENTATION: Complete guide to PHP configuration hierarchy and metrics
CRITICAL ADDITIONS:
1. PHP Config Hierarchy (.user.ini > pool php.ini > global)
2. How to determine which config takes effect
3. 70+ PHP settings to track with explanations
COMPREHENSIVE METRICS COVERAGE:
**Memory Settings:**
- memory_limit, upload_max_filesize, post_max_size
- max_input_vars, realpath_cache_size
- Detection: memory exhausted errors, upload failures
**PHP-FPM Pool Settings (MOST CRITICAL!):**
- pm (static/dynamic/ondemand modes)
- pm.max_children, pm.start_servers, pm.min/max_spare_servers
- pm.max_requests, pm.process_idle_timeout
- request_terminate_timeout, request_slowlog_timeout
- Detection: max_children reached errors, slow logs
**OPcache (MASSIVE PERFORMANCE!):**
- opcache.enable, opcache.memory_consumption
- opcache.max_accelerated_files
- opcache.jit, opcache.jit_buffer_size (PHP 8+)
- Hit rate calculation, cache effectiveness
**Execution & Timeout:**
- max_execution_time, max_input_time
- default_socket_timeout
- Detection: timeout errors
**Session Management:**
- session.save_handler (files/redis/memcached)
- session.gc_maxlifetime
- Performance impact analysis
**Security Settings:**
- disable_functions, open_basedir
- display_errors (MUST be Off in production!)
- allow_url_include prevention
**APCu Cache:**
- apc.shm_size, apc.ttl
- User cache tracking
**Detection Commands:**
- Find all php.ini files affecting domain
- Get effective settings hierarchy
- Check opcache hit rates
- Find max_children errors
- Track slow requests
- Calculate memory per process
**Per-Domain Metrics Matrix:**
Complete YAML template showing all tracked metrics,
live stats, issue detection, and recommendations
This documentation enables intelligent optimization with
precise detection and actionable recommendations!
|
2025-12-02 19:37:24 -05:00 |
|