Open sumeetpareek opened 11 years ago
I had installed APC on the web-01 server (ssh -i /home/batuk/.ssh/aap-prod2.pem ubuntu@54.251.248.135'
) first.
But this is the server where we have the NFS mounted filesystem that syncs when there are file changes on the other server web-02 (ssh -i /home/batuk/.ssh/aap-prod2.pem ubuntu@54.251.248.135'
) and I had no permissions to write in the webroot. > Which is something that I needed to test the apc.php file and figure what configurations are being used and change them according to our need.
Proceeding with the other server now.
When checking APC usage here - http://www.aamaadmiparty.org/apc.php I noticed that varnish was caching this file. I have excluded this file to be cached from varnish by updating the settings as below
# Do not cache these paths.
if (req.url ~ "^/status\.php$" ||
req.url ~ "^/update\.php$" ||
req.url ~ "^/apc\.php$" ||
req.url ~ "^/admin$" ||
req.url ~ "^/admin/.*$" ||
req.url ~ "^/flag/.*$" ||
req.url ~ "^.*/ajax/.*$" ||
req.url ~ "^.*/ahah/.*$") {
return (pass);
}
This is only done on web2 server and needs to be done on all other varnish-fied servers
The PHP memory used as seen by turning on the devel module settings, and check for AUTH users from admin login, is -
Home page = 83 MB
Inner news page = 77 MB
These values are too huge and just not acceptable. We need to bring them down my cleaning the modules - #19 and other steps.
For now, I am setting the APC cache size at 64M and proceeding.
The APC settings we are using now are as below
extension=apc.so
apc.enabled=1
apc.enable_cli=1
apc.shm_segments=1
apc.shm_size=64M
apc.stat=1
apc.ttl=7200
apc.user_ttl=7200
apc.gc_ttl=7200
apc.max_file_size=1M
apc.num_files_hint=1000
Install and configure APC on both the servers currently in use