![]() ![]() Try_files $uri $uri/ /index.php?q=$uri&$args # PHP only, required if PHP was built with -enable-force-cgi-redirect My fastcgi_params fastcgi_param QUERY_STRING $query_string įastcgi_param REQUEST_METHOD $request_method įastcgi_param CONTENT_TYPE $content_type įastcgi_param CONTENT_LENGTH $content_length įastcgi_param SCRIPT_NAME $fastcgi_script_name įastcgi_param DOCUMENT_URI $document_uri įastcgi_param DOCUMENT_ROOT $document_root įastcgi_param SERVER_PROTOCOL $server_protocol įastcgi_param SERVER_SOFTWARE nginx/$nginx_version ![]() # Load config files from the /etc/nginx/conf.d directory #access_log /var/log/nginx/access.log main '"$http_user_agent" "$http_x_forwarded_for"' '$status $body_bytes_sent "$http_referer" ' Log_format main '$remote_addr - $remote_user "$request" ' #error_log /var/log/nginx/error.log info #error_log /var/log/nginx/error.log notice # Main Module - directives that cover basic functionality # More information about the configuration options is available on # This is the main Nginx configuration file. Is this an nginx configuration or php-fpm issue, or it's just a matter of needing to add one or two more nodes? The whole websites gets about 2.1 million requests a day balanced over the (2) nodes. Why are the cores spiking and holding the load. I am running a worpdess site on each node, basically each node runs an identical copy of the same wordpress PHP code.Įverything is running as it should but the load on the CPU is very high, we are averaging the following load on the nodes: Each of the nodes have (4) dedicated cores. (2) - 2GB nodes each running Nginx + php-fpm + APC and connected to yet another instance of mySQL running on a dedicated machine over a local IP address. (1) - One load balancer doing a round robin with least connections to the following two nodes ![]() In the script „apc.I am reaching out for some help here, I have spent quite a few hours on this site searching the posts and also on google trying to see what the issue may be and trying to solve my problem without much success. If we want to look at the „User Cache Entries“, we have to replace the default password in the script „apc.php“: sudo nano /var/www/html/nextcloud/apc.php Then call the script in our domain via our browser, call : We can verify the success with a php script that we have to load in our webspace cd /var/www/html/nextcloud Next we restart Apache2 and php-fpm (if used): sudo systemctl restart php7.x-fpm Here we adjust the values „memcache.distributed“ and „memcache.local“ as follows: 'memcache.distributed' => '\\OC\\Memcache\\APCu', Now we have to teach Nextcloud to work with the APCu, we adapt the config.php: sudo nano /var/www/html/nextcloud/config/config.php Then we install PHP-APCu sudo apt install php-apcuĭepending on the version, edit the php.ini (replace the x with the version here)įor php-fpm: sudo nano /etc/php/7.x/fpm/php.iniįor php-apache-modul: sudo nano /etc/php/7.x/apache2/php.iniĪnd enter the following values: apc.enabled=1 To make this available after each reboot, we edit the file /etc/fstab: sudo nano /etc/fstabĪnd we add the following line: ramfs /tmp/apc ramfs defaults 0 0Īs always, we bring our system up to date: sudo apt -y update & apt -y upgrade & apt -y full-upgrade Condition is, of course, enough RAM in the system.įor this purpose, we create a RAM disk under /tmp/ before we start: sudo mkdir /tmp/apcĪnd mount this disk: sudo mount -t ramfs ramfs /tmp/apc If you have big but slow disks like me, you can work with a RAM disk. Depending on the version we replace the „x“ in the commands. Today we want to optimize our Nextcloud installation with PHP-APCu, it does not matter which Nextcloud or PHP7 version we use. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |