Needing to restart php5-fpm/MySql constantly; internal error 500
P.S. I can also provide other details if needed
Server is running Apache2, Php5-fpm (fastcgi), (2gb linode)
Apache/2.2.22 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.6
FPM SETTINGS
pm.max_requests = 200
pm = ondemand
pm.max_children =16
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 2
MySQL (my.cnf)
key_buffer = 64M
max_allowed_packet = 16M
thread_stack = 256K
thread_cache_size = 8
#CUSTOM ADJUSTMENTS
open_files_limit = 5000
query_cache_size=16M
tmp_table_size = 16M
max_heap_table_size = 16M
table_cache = 500
innodb_buffer_pool_size=512M
max_connections = 150
expire_logs_days = 10
max_binlog_size = 100M
MySqlTuner
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.44-0ubuntu0.12.04.1
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 257M (Tables: 706)
[--] Data in InnoDB tables: 1G (Tables: 953)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[!!] Total fragmented tables: 969
-------- Performance Metrics -------------------------------------------------
[--] Up for: 8h 43m 41s (2M q [93.855 qps], 29K conn, TX: 57B, RX: 731M)
[--] Reads / Writes: 84% / 16%
[--] Total buffers: 624.0M global + 2.8M per thread (150 max threads)
[OK] Maximum possible memory usage: 1.0G (51% of installed RAM)
[OK] Slow queries: 0% (0/2M)
[OK] Highest usage of available connections: 8% (13/150)
[OK] Key buffer size / total MyISAM indexes: 64.0M/17.8M
[OK] Key buffer hit rate: 99.9% (1M cached / 2K reads)
[OK] Query cache efficiency: 89.2% (2M cached / 2M selects)
[!!] Query cache prunes per day: 281907
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 66K sorts)
[!!] Temporary tables created on disk: 32% (10K on disk / 31K total)
[OK] Thread cache hit rate: 99% (18 created / 29K connections)
[!!] Table cache hit rate: 16% (500 open / 3K opened)
[OK] Open file limit used: 11% (551/5K)
[OK] Table locks acquired immediately: 99% (394K immediate / 394K locks)
[!!] InnoDB data size / buffer pool: 1.2G/512.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
query_cache_size (> 16M)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
table_cache (> 500)
innodb_buffer_pool_size (>= 1G)