Xenforo on load balance with opcache

Salamanca

Active member
Hi,

We're using a number of Windows 2019 IIS10 servers for a HTTP load balance.
All files are retrieved from a single SMB server, so all files are the same for all nodes.

We're also using Wincache (only for file system cache) & Opcache.

My question is this: on previous applications that we used, there were several occasions where we had to use opcache.blacklist, do exclude certain directories from being cached. It created problems with the load balance, as a file that was generated for one node may not have been valid for another node.

So, are there directories that we should exclude for Xenforo? for example, temp directories that Xenforo uses to store cached results or code?

Thanks
Alex
 
Hi,

We have come across a problem with this configuration indeed, which I suspect is related to opcache. We randomly get this error for example:

Code:
Class 'XF\Mvc\Entity\Repository' not found

After IISRESET everything is ok, until it happens again.

This is our opcache config:

Code:
[OPCACHE]
zend_extension = "php_opcache.dll"
opcache.memory_consumption=256
opcache.cache_id=node1
opcache.error_log="D:\temp\php\opcache.log"
opcache.validate_timestamps=1
opcache.revalidate_freq=30
opcache.interned_strings_buffer=32
opcache.save_comments=0
opcache.max_file_size=0
opcache.file_update_protection=2
;opcache.file_cache_consistency_checks=0 // not used
;opcache.file_cache="D:\temp\php\opcache_filecache" // not used
opcache.max_accelerated_files=10000
opcache.log_verbosity_level=4
opcache.blacklist_filename= "D:\inetpub\wwwroot\******.com\conf\opcache\opcache-blacklist.txt"
opcache.enable_cli=1
opcache.max_wasted_percentage=10

Any idea what could cause this?

We added D:\inetpub\wwwroot\*******.com\forum\src\XF\Repository\ to the opcache-blacklist.txt file to check if it fixes the problem.

Thanks
Alex
 
Back
Top Bottom