From fda64d48c94c97c30899cc515cea54bd17819a7d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 15 Jan 2021 11:53:10 +0100 Subject: [PATCH] Adjust more php versions Signed-off-by: Joas Schilling --- admin_manual/installation/server_tuning.rst | 84 ++++++------ .../issues/general_troubleshooting.rst | 128 +++++++++--------- 2 files changed, 106 insertions(+), 106 deletions(-) diff --git a/admin_manual/installation/server_tuning.rst b/admin_manual/installation/server_tuning.rst index a95b739c2..bb450677f 100644 --- a/admin_manual/installation/server_tuning.rst +++ b/admin_manual/installation/server_tuning.rst @@ -11,14 +11,14 @@ benefits. Reducing system load -------------------- -High system load will slow down Nextcloud and might also lead to other unwanted -side effects. To reduce load you should first identify the source of the problem. +High system load will slow down Nextcloud and might also lead to other unwanted +side effects. To reduce load you should first identify the source of the problem. Tools such as htop, iotop, `netdata `_ or `glances `_ -will help to identify the process or the drive that slows down your system. First -you should make sure that you installed/assigned enough RAM. Swap usage should be -prevented by all means. If you run your database inside a VM, you should not -store it inside a VM image file. Better put it on a dedicated block device to +will help to identify the process or the drive that slows down your system. First +you should make sure that you installed/assigned enough RAM. Swap usage should be +prevented by all means. If you run your database inside a VM, you should not +store it inside a VM image file. Better put it on a dedicated block device to reduce latency due to multiple abstraction layers. .. _caching: @@ -26,15 +26,15 @@ reduce latency due to multiple abstraction layers. Caching ------- -Caching improves performance by storing data, code, and other objects in memory. +Caching improves performance by storing data, code, and other objects in memory. Memory cache configuration for the Nextcloud server must be installed and configured. See :doc:`../configuration_server/caching_configuration`. Using MariaDB/MySQL instead of SQLite ------------------------------------- -MySQL or MariaDB are preferred because of the `performance limitations of -SQLite with highly concurrent applications +MySQL or MariaDB are preferred because of the `performance limitations of +SQLite with highly concurrent applications `_, like Nextcloud. See the section :doc:`../configuration_database/linux_database_configuration` for how to @@ -42,12 +42,12 @@ configure Nextcloud for MySQL or MariaDB. If your installation is already runnin SQLite then it is possible to convert to MySQL or MariaDB using the steps provided in :doc:`../configuration_database/db_conversion`. -In smaller installations you might not want to set up a separate cache. However -you can still tune your database. The following example is suited for a database -smaller than 1GB. MySQL will consume up to 1GB of RAM for caching. Please make -sure that your system has sufficient free RAM after the change, so that it does -not start to use your swap partition, when it receives a burst of requests. In -the given example your ``/etc/mysql/conf.d/mysql.cnf`` might contain the +In smaller installations you might not want to set up a separate cache. However +you can still tune your database. The following example is suited for a database +smaller than 1GB. MySQL will consume up to 1GB of RAM for caching. Please make +sure that your system has sufficient free RAM after the change, so that it does +not start to use your swap partition, when it receives a burst of requests. In +the given example your ``/etc/mysql/conf.d/mysql.cnf`` might contain the following lines. (beware that this is the block for mysqld not mysql) .. code:: ini @@ -59,7 +59,7 @@ following lines. (beware that this is the block for mysqld not mysql) Using Redis-based transactional file locking -------------------------------------------- -File locking is enabled by default, using the database locking backend. This +File locking is enabled by default, using the database locking backend. This places a significant load on your database. See the section :doc:`../configuration_files/files_locking_transactional` for how to configure Nextcloud to use Redis-based Transactional File Locking. @@ -67,34 +67,34 @@ configure Nextcloud to use Redis-based Transactional File Locking. SSL / encryption app -------------------- -SSL (HTTPS) and file encryption/decryption can be offloaded to a processor's -AES-NI extension. This can both speed up these operations while lowering -processing overhead. This requires a processor with the `AES-NI instruction set +SSL (HTTPS) and file encryption/decryption can be offloaded to a processor's +AES-NI extension. This can both speed up these operations while lowering +processing overhead. This requires a processor with the `AES-NI instruction set `_. -Here are some examples how to check if your CPU / environment supports the +Here are some examples how to check if your CPU / environment supports the AES-NI extension: -* For each CPU core present: ``grep flags /proc/cpuinfo`` or as a summary for - all cores: ``grep -m 1 '^flags' /proc/cpuinfo`` If the result contains any - ``aes``, the extension is present. +* For each CPU core present: ``grep flags /proc/cpuinfo`` or as a summary for + all cores: ``grep -m 1 '^flags' /proc/cpuinfo`` If the result contains any + ``aes``, the extension is present. -* Search eg. on the Intel web if the processor used supports the extension - `Intel Processor Feature Filter - `_ You may set a filter by +* Search eg. on the Intel web if the processor used supports the extension + `Intel Processor Feature Filter + `_ You may set a filter by ``"AES New Instructions"`` to get a reduced result set. - -* For versions of openssl >= 1.0.1, AES-NI does not work via an engine and - will not show up in the ``openssl engine`` command. It is active by default - on the supported hardware. You can check the openssl version via ``openssl + +* For versions of openssl >= 1.0.1, AES-NI does not work via an engine and + will not show up in the ``openssl engine`` command. It is active by default + on the supported hardware. You can check the openssl version via ``openssl version -a`` - -* If your processor supports AES-NI but it does not show up eg via grep or + +* If your processor supports AES-NI but it does not show up eg via grep or coreinfo, it is maybe disabled in the BIOS. - -* If your environment runs virtualized, check the virtualization vendor for + +* If your environment runs virtualized, check the virtualization vendor for support. - + Enable HTTP2 for faster loading ------------------------------- @@ -108,11 +108,11 @@ You can check if your application already uses HTTP2 or not by running the simpl Tune PHP-FPM ------------ -If you are using a default installation of php-fpm you might have noticed -excessive load times on the web interface or even sync issues. This is due -to the fact that each simultaneous request of an element is handled by a -separate PHP-FPM process. So even on a small installation you should allow -more processes to run. For example on a machine with 4GB of RAM and 1GB of +If you are using a default installation of php-fpm you might have noticed +excessive load times on the web interface or even sync issues. This is due +to the fact that each simultaneous request of an element is handled by a +separate PHP-FPM process. So even on a small installation you should allow +more processes to run. For example on a machine with 4GB of RAM and 1GB of MySQL cache following values in your ``www.conf`` file should work: .. code:: ini @@ -122,8 +122,8 @@ MySQL cache following values in your ``www.conf`` file should work: pm.start_servers = 12 pm.min_spare_servers = 6 pm.max_spare_servers = 18 - -Depending on your current PHP version you should find this file e.g. under ``/etc/php/7.2/fpm/pool.d/www.conf`` + +Depending on your current PHP version you should find this file e.g. under ``/etc/php/7.4/fpm/pool.d/www.conf`` Enable PHP OPcache ------------------ diff --git a/admin_manual/issues/general_troubleshooting.rst b/admin_manual/issues/general_troubleshooting.rst index a1ef9ade2..e5ef2883e 100644 --- a/admin_manual/issues/general_troubleshooting.rst +++ b/admin_manual/issues/general_troubleshooting.rst @@ -2,22 +2,22 @@ General troubleshooting ======================= -If you have trouble installing, configuring or maintaining Nextcloud, please +If you have trouble installing, configuring or maintaining Nextcloud, please refer to our community support channels: * `The Nextcloud Forums`_ The Nextcloud forums have a `FAQ page`_ where each topic corresponds to typical mistakes or frequently occurring issues -* The Nextcloud IRC chat channel ``irc://#nextcloud@freenode.net`` on +* The Nextcloud IRC chat channel ``irc://#nextcloud@freenode.net`` on freenode.net, also accessible via `webchat`_ -Please understand that all these channels essentially consist of users like you -helping each other out. Consider helping others out where you can, to contribute -back for the help you get. This is the only way to keep a community like +Please understand that all these channels essentially consist of users like you +helping each other out. Consider helping others out where you can, to contribute +back for the help you get. This is the only way to keep a community like Nextcloud healthy and sustainable! -If you are using Nextcloud in a business or otherwise large scale deployment, +If you are using Nextcloud in a business or otherwise large scale deployment, note that Nextcloud GmbH offers commercial support options. Bugs @@ -28,8 +28,8 @@ If you think you have found a bug in Nextcloud, please: * Search for a solution (see the options above) * Double-check your configuration -If you can't find a solution, please use our `bugtracker`_. You can generate a -configuration report with the :ref:`occ config command +If you can't find a solution, please use our `bugtracker`_. You can generate a +configuration report with the :ref:`occ config command `, with passwords automatically obscured. .. _the Nextcloud Forums: https://help.nextcloud.com @@ -42,7 +42,7 @@ configuration report with the :ref:`occ config command General troubleshooting ----------------------- -Check the Nextcloud :doc:`../installation/system_requirements`, especially +Check the Nextcloud :doc:`../installation/system_requirements`, especially supported browser versions. When you see warnings about ``code integrity``, refer to :doc:`code_signing`. @@ -50,59 +50,59 @@ When you see warnings about ``code integrity``, refer to :doc:`code_signing`. Disable 3rdparty / non-shipped apps ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -It might be possible that 3rd party / non-shipped apps are causing various -different issues. Always disable 3rd party apps before upgrades, and for +It might be possible that 3rd party / non-shipped apps are causing various +different issues. Always disable 3rd party apps before upgrades, and for troubleshooting. Please refer to the :ref:`apps_commands_label` on how to disable an app from command line. Nextcloud logfiles ^^^^^^^^^^^^^^^^^^ -In a standard Nextcloud installation the log level is set to ``Normal``. To find -any issues you need to raise the log level to ``All`` in your ``config.php`` -file, or to **Everything** on your Nextcloud Admin page. Please see -:doc:`../configuration_server/logging_configuration` for more information on +In a standard Nextcloud installation the log level is set to ``Normal``. To find +any issues you need to raise the log level to ``All`` in your ``config.php`` +file, or to **Everything** on your Nextcloud Admin page. Please see +:doc:`../configuration_server/logging_configuration` for more information on these log levels. -Some logging - for example JavaScript console logging - needs debugging -enabled. Edit :file:`config/config.php` and change ``'debug' => false,`` to +Some logging - for example JavaScript console logging - needs debugging +enabled. Edit :file:`config/config.php` and change ``'debug' => false,`` to ``'debug' => true,`` Be sure to change it back when you are finished. -For JavaScript issues you will also need to view the javascript console. All -major browsers have developer tools for viewing the console, and you +For JavaScript issues you will also need to view the javascript console. All +major browsers have developer tools for viewing the console, and you usually access them by pressing F12. -.. note:: The logfile of Nextcloud is located in the data directory +.. note:: The logfile of Nextcloud is located in the data directory ``nextcloud/data/nextcloud.log``. .. _label-phpinfo: - + PHP version and information ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -You will need to know your PHP version and configurations. To do this, create a -plain-text file named **phpinfo.php** and place it in your Web root, for -example ``/var/www/html/phpinfo.php``. (Your Web root may be in a different -location; your Linux distribution documentation will tell you where.) This file +You will need to know your PHP version and configurations. To do this, create a +plain-text file named **phpinfo.php** and place it in your Web root, for +example ``/var/www/html/phpinfo.php``. (Your Web root may be in a different +location; your Linux distribution documentation will tell you where.) This file contains just this line:: -Open this file in a Web browser by pointing your browser to +Open this file in a Web browser by pointing your browser to ``localhost/phpinfo.php``: .. figure:: ../images/phpinfo.png -Your PHP version is at the top, and the rest of the page contains abundant -system information such as active modules, active ``.ini`` files, and much more. -When you are finished reviewing your information you must delete -``phpinfo.php``, or move it outside of your Web directory, because it is a +Your PHP version is at the top, and the rest of the page contains abundant +system information such as active modules, active ``.ini`` files, and much more. +When you are finished reviewing your information you must delete +``phpinfo.php``, or move it outside of your Web directory, because it is a security risk to expose such sensitive data. Debugging sync issues ^^^^^^^^^^^^^^^^^^^^^ -.. warning:: The data directory on the server is exclusive to Nextcloud and must +.. warning:: The data directory on the server is exclusive to Nextcloud and must not be modified manually. Disregarding this can lead to unwanted behaviors like: @@ -110,7 +110,7 @@ Disregarding this can lead to unwanted behaviors like: * Problems with sync clients * Undetected changes due to caching in the database -If you need to directly upload files from the same server please use a WebDAV +If you need to directly upload files from the same server please use a WebDAV command line client like ``cadaver`` to upload files to the WebDAV interface at: ``https://example.com/nextcloud/remote.php/dav`` @@ -123,20 +123,20 @@ Some common problems / error messages found in your logfiles as described above: * ``SQLSTATE[HY000] [1040] Too many connections`` -> You need to increase the connection limit of your database, please refer to the manual of your database for more information. -* ``SQLSTATE[HY000]: General error: 5 database is locked`` -> You're using +* ``SQLSTATE[HY000]: General error: 5 database is locked`` -> You're using ``SQLite`` which can't handle a lot of parallel requests. Please consider converting to - another database like described in + another database like described in :doc:`../configuration_database/db_conversion`. * ``SQLSTATE[HY000]: General error: 2006 MySQL server has gone away`` -> Please refer to :ref:`db-troubleshooting-label` for more information. * ``SQLSTATE[HY000] [2002] No such file or directory`` -> There is a problem - accessing your SQLite database file in your data directory - (``data/nextcloud.db``). Please check the permissions of this folder/file or + accessing your SQLite database file in your data directory + (``data/nextcloud.db``). Please check the permissions of this folder/file or if it exists at all. If you're using MySQL please start your database. -* ``Connection closed / Operation cancelled`` -> This could be caused by wrong - ``KeepAlive`` settings within your Apache config. Make sure that - ``KeepAlive`` is set to ``On`` and also try to raise the limits of +* ``Connection closed / Operation cancelled`` -> This could be caused by wrong + ``KeepAlive`` settings within your Apache config. Make sure that + ``KeepAlive`` is set to ``On`` and also try to raise the limits of ``KeepAliveTimeout`` and ``MaxKeepAliveRequests``. * ``No basic authentication headers were found`` -> This error is shown in your ``data/nextcloud.log`` file. Some Apache modules like ``mod_fastcgi``, ``mod_fcgid`` @@ -151,29 +151,29 @@ Troubleshooting Web server and PHP problems Logfiles ^^^^^^^^ -When having issues the first step is to check the logfiles provided by PHP, the +When having issues the first step is to check the logfiles provided by PHP, the Web server and Nextcloud itself. -.. note:: In the following the paths to the logfiles of a default Debian - installation running Apache2 with mod_php is assumed. On other Web servers, +.. note:: In the following the paths to the logfiles of a default Debian + installation running Apache2 with mod_php is assumed. On other Web servers, Linux distros or operating systems they can differ. * The logfile of Apache2 is located in ``/var/log/apache2/error.log``. -* The logfile of PHP can be configured in your ``/etc/php5/apache2/php.ini``. +* The logfile of PHP can be configured in your ``/etc/php/7.4/apache2/php.ini``. You need to set the directive ``log_errors`` to ``On`` and choose the path to store the logfile in the ``error_log`` directive. After those changes you need to restart your Web server. -* The logfile of Nextcloud is located in the data directory +* The logfile of Nextcloud is located in the data directory ``/var/www/nextcloud/data/nextcloud.log``. Web server and PHP modules ^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. note:: Lighttpd is not supported with Nextcloud, and some Nextcloud features +.. note:: Lighttpd is not supported with Nextcloud, and some Nextcloud features may not work at all on Lighttpd. -There are some Web server or PHP modules which are known to cause various -problems like broken up-/downloads. The following shows a draft overview of +There are some Web server or PHP modules which are known to cause various +problems like broken up-/downloads. The following shows a draft overview of these modules: 1. Apache @@ -183,11 +183,11 @@ these modules: * mod_security * mod_reqtimeout * mod_deflate -* libapache2-mod-php5filter (use libapache2-mod-php5 instead) -* mod_spdy together with libapache2-mod-php5 / mod_php (use fcgi or php-fpm +* libapache2-mod-php*filter (use libapache2-mod-php7.4 instead) +* mod_spdy together with libapache2-mod-php5 / mod_php (use fcgi or php-fpm instead) * mod_dav -* mod_xsendfile / X-Sendfile (causing broken downloads if not configured +* mod_xsendfile / X-Sendfile (causing broken downloads if not configured correctly) 2. NginX @@ -205,25 +205,25 @@ these modules: Troubleshooting WebDAV ---------------------- -Nextcloud uses SabreDAV, and the SabreDAV documentation is comprehensive and +Nextcloud uses SabreDAV, and the SabreDAV documentation is comprehensive and helpful. -.. note: Lighttpd is not supported on Nextcloud, and Lighttpd WebDAV does not +.. note: Lighttpd is not supported on Nextcloud, and Lighttpd WebDAV does not work with Nextcloud. See: * `SabreDAV FAQ `_ -* `Web servers `_ (Lists lighttpd as not +* `Web servers `_ (Lists lighttpd as not recommended) -* `Working with large files `_ (Shows a PHP +* `Working with large files `_ (Shows a PHP bug in older SabreDAV versions and information for mod_security problems) -* `0 byte files `_ (Reasons for empty files on the +* `0 byte files `_ (Reasons for empty files on the server) -* `Clients `_ (A comprehensive list of WebDAV +* `Clients `_ (A comprehensive list of WebDAV clients, and possible problems with each one) -* `Finder, OS X's built-in WebDAV client - `_ +* `Finder, OS X's built-in WebDAV client + `_ (Describes problems with Finder on various Web servers) There is also a well maintained FAQ thread available at the `ownCloud Forums @@ -247,7 +247,7 @@ URLs: | Those need to be redirecting your clients to the correct endpoints. If Nextcloud -is running at the document root of your Web server the correct URL is +is running at the document root of your Web server the correct URL is ``https://example.com/remote.php/dav`` for CardDAV and CalDAV and if running in a subfolder like ``nextcloud``, then ``https://example.com/nextcloud/remote.php/dav``. @@ -270,7 +270,7 @@ document root of your Web server and add the following lines:: Make sure to change /nextcloud to the actual subfolder your Nextcloud instance is running in. -If you are running NGINX, make sure ``location = /.well-known/carddav {`` and ``location = /.well-known/caldav {`` are properly configured as described in :doc:`../installation/nginx`, adapt to use a subfolder if necessary. +If you are running NGINX, make sure ``location = /.well-known/carddav {`` and ``location = /.well-known/caldav {`` are properly configured as described in :doc:`../installation/nginx`, adapt to use a subfolder if necessary. Now change the URL in the client settings to just use: @@ -312,8 +312,8 @@ it is likely caused by one of the following reasons: Using Pound reverse-proxy/load balancer As of writing this Pound doesn't support the HTTP/1.1 verb. - Pound is easily `patched - `_ + Pound is easily `patched + `_ to support HTTP/1.1. Misconfigured Web server @@ -336,8 +336,8 @@ Unofficially moving the data directory can be done as follows: 7. Restart apache .. warning - However this is not supported and you risk breaking your database. - + However this is not supported and you risk breaking your database. + For a safe moving of data directory, supported by Nextcloud, recommended actions are: 1. Make sure no cron jobs are running