0

After a few seconds any cached data in Zend OpCache and APCu is lost.

Detail: 1. Got a Plesk 12.0.18 server running on CentOS with virtual hosts (Apache, nginx sandwich). 2. Compiled php 5.5.17 and 5.6.1 and installed according Plesk KB including handlers. 3. all is looking fine in Plesk 4. configured caches (Zend OpCache and APCu)

Symptom: Caches are loaded and work if I directly reload a page (no browser cache used). After a few seconds (5 -30 seconds) the caches are empty and gone.

Add: in htop I see a "php-cgi" running with the vhost user-id. As soon as this php-cgi dies, the cache is lost. So basically I assume the whole php environment is "killed" together with the php-cgi process.

Questions: - what can I do to have those sessions persistent? - I have several vhosts, all Wordpress with the same theme. Is there a way to have caches interact over vhosts to further optimize operation? - since my sites are similar, yet have different user amounts, Id like to configure all caches to work accross vhosts especially on the cache settings (saw that one site takes app. 85 - 117 MB Cache) so app 1GB total cache sounded ok to me for 10 WP sites. Is it possible and reasonable to configure one cache for all? If not any additional advice?

TIA kbi

kbi_user
  • 1
  • 2

1 Answers1

0

The underlying issue is simple: in cgi and fcgi environments the php environment containing the cache is killed after a short ttl. Only options are usage of mod apache or php-fpm.

Yet in plesk running php as mod apache runs into permission problems, where the virtual host runs as :psacln and php as apache:apache. This issue is persistent up to Plesk 12.0.18.

Solution: upgrade the system php environment and run php via nginx as php-fpm. Configuring nginx consistently with apache .htaccess for eg. gmetrix can be tricky, but is possible.

kbi_user
  • 1
  • 2