OpCache + PHP-FPM: used > available memory

shadowq

Verified User
Joined
Dec 5, 2010
Messages
97
Not really a DA problem, but thought someone could help me out here.

I've got a VPS with 16GB of RAM. I've allocated 4GB of RAM to OpCache. However, when it gets to the point of all the 4GB of RAM being used up, it just continues on adding files to the cache. I just had free_memory as -1239219293. Yet it hadn't triggered a restart (and cache_full = false still).

Furthermore, I have a problem where a page load on any of the sites hosted on the VPS will just sit and wait. It may load if you wait 30+ seconds, or a simply refresh/re-click and it will load instantly. I'm trying to figure out why it's happening, but feel it may be to do with the lack of free_memory for OpCache.

Does anyone have any ideas?
Thanks in advance!
Jarrod.

OpCache Configuration
Code:
opcache.enable	true
opcache.enable_cli	true
opcache.use_cwd	true
opcache.validate_timestamps	true
opcache.inherited_hack	true
opcache.dups_fix	false
opcache.revalidate_path	false
opcache.log_verbosity_level	1
opcache.memory_consumption	4096.00 MB
opcache.interned_strings_buffer	64
opcache.max_accelerated_files	41999
opcache.max_wasted_percentage	0.05
opcache.consistency_checks	0
opcache.force_restart_timeout	60
opcache.revalidate_freq	60
opcache.preferred_memory_model	
opcache.blacklist_filename	
opcache.max_file_size	102400
opcache.error_log	
opcache.protect_memory	false
opcache.save_comments	true
opcache.load_comments	true
opcache.fast_shutdown	true
opcache.enable_file_override	false
opcache.optimization_level	4294967295
 
Alrighty, I've figured out that a cache reset triggered by opcache_reset() makes the available/used numbers freak out, and sends it into the negative (despite it not actually using that much). This can be fixed by a service restart for php-fpm55.

Hmmm...!
 
No one has any ideas for me? The occasional "cache miss" (or whatever it may be) is quite annoying and unprofessional.
 
Back
Top