In T154558 several changes to Piwik were performed manually to mitigate various problems:
- SET GLOBAL max_connections 300 to the mysql instance (apache error logs for no more connections to use)
- disabled apache mod_deflate (probably this one wasn't needed)
- bump to 256M memory_limit in /etc/piwik/global.ini.php and /etc/php5/apache2/php.ini
- set bulk_requests_use_transaction=0 to /etc/piwik/global.ini.php (https://github.com/piwik/piwik/issues/6398#issuecomment-91093146) that was causing entries in the apache error log for locks already in use.
- Bump the maximum Apache connections allowed (hence the number of processes due to mpm_prefork) from 150 to 250, reducing also the churn due to process kill/re-spawn with MaxSpareServers set to 150 as well (and Min to 50):
# prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxRequestWorkers: maximum number of server processes allowed to start # MaxConnectionsPerChild: maximum number of requests a server process serves <IfModule mpm_prefork_module> # prev: 5 StartServers 250 # prev: 5 MinSpareServers 50 # prev: 10 MaxSpareServers 250 # prev: 150 MaxRequestWorkers 250 MaxConnectionsPerChild 0 </IfModule> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
What would be needed:
- Puppetization of the above fixes.
- Refactor of piwik's role code into modules and profile for a better maintenance over time.
Security upgrades will be handled in T158322
Database improvements will be handled in T164073