master
vlab 4 years ago
parent
commit
09fee07810
  1. 106
      nextcloud.md

106
nextcloud.md

@ -1,6 +1,62 @@
# Full Memory issue
# Tasks
## occ command access
If your Nextcloud web app show you the following message, it can be an full memory issue.
If the docker container is already running, you can use occ directly:
```
compose exec -u www-data nextcloud /var/www/html/occ --help
```
In some cases, a bug in docker will prevent this last command from running, returning
```
unable to find user www-data: no matching entries in passwd file
```
if this is the case, you can use:
```
compose exec -u 33 nextcloud /var/www/html/occ --help
```
## Access to configuration
### With occ command
All parameters from the configuration can be set via command line through the `occ` command.
You can use the `occ` command on myc hosts as described [here](https://git.myceliandre.fr/Myceliandre/myc-manage/wiki/nextcloud#disk_full), for general information on the `occ` command on the nextcloud documentation you can check [there](https://docs.nextcloud.com/server/17/admin_manual/configuration_server/occ_command.html).
### access to config.php
All parameters are available in the `config.php` file located in `/srv/datastore/config/nextcloud/var/www/html/config/config.php`.
## Getting logs
There are 2 location worth checking
### Stdout/stderr of docker container
Issuing this command via SSH on the host will give you a live access to the stdout/stderr of the nextcloud container.
```
compose logs -f --tail=200 nextcloud
```
Exit with `Ctrl-C`
### JSON logs
To read them easily, you might need to install `jq` before:
```
apt-get install -y --force-yes jq
```
Then you can
```
tail -f /srv/datastore/data/nextcloud/var/lib/nextcloud/data/nextcloud.log | jq
```
# Troubleshooting
## Internal Server Error
Upon connection with a browser on the url served by nextcloud, if you received
```
Internal Server Error
The server encountered an internal error and was unable to complete your request.
@ -8,27 +64,46 @@ Please contact the server administrator if this error reappears multiple times,
More details can be found in the server log.
```
To confirm it, look at the Nextcloud logs:
You'll need to get more info in the server logs:
This can be:
- [Disk full issue](https://git.myceliandre.fr/Myceliandre/myc-manage/wiki/nextcloud#disk_full)
## Disk Full
### Symptoms
- probable `Internal Server Error` message upon access with a browser on the url server by nextcloud. ([Internal Server Error section](https://git.myceliandre.fr/Myceliandre/myc-manage/wiki/nextcloud#internal_server_error))
- in the docker container logs (see [Getting log section](https://git.myceliandre.fr/Myceliandre/myc-manage/wiki/nextcloud#getting_logs)) you'll notice this message
```
Sabre/DAV/Exception/InsufficientStorage: Insufficient space in [directory path], xxxxxx required, YYYYYYY availaible
```
- a simple `df -h /` should confirm you that you are running quite low on disk space
- if you run other services on the same host, they might have already crashed also (check your `odoo` service for instance, by using your browser to check the availability of the served URL).
### Resolution
You must find where the disk space is used:
* it is global on the nextcloud database ?
* is it due to a specific user ?
User files disk usage:
```
compose logs nextcloud
du -sh /srv/datastore/data/nextcloud/var/lib/nextcloud/data/* | sort -h
```
You should be able to see logs with errors like:
More precisely, their trashbin disk usage:
```
Sabre/DAV/Exception/InsufficientStorage: Inssufficient space in [directory path], xxxxxx required, YYYYYYY availaible
du -sh /srv/datastore/data/nextcloud/var/lib/nextcloud/data/*/files_trashbin | sort -h
```
In that case, you must find where the memory issue is :
* it is global on the nextcloud database?
* is it due to a specific user?
Thanks to the command `du -sch *` find the biggest repositories, and identify the issue.
### Trashbin issue:
#### Trashbin issue
Nextcloud has a specific way to manage the deletion of files and repositories, explained here: https://docs.nextcloud.com/server/stable/user_manual/files/deleted_file_management.html?highlight=trash
If the memory issue is due to the trashbin folder full of old deleted file, you can start by deleteing them to free the memory and make the application available again for the users.
If the disk space issue is due to the trashbin folder full of old deleted file, you can start by deleteing them to free the memory and make the application available again for the users.
You can also modify the trashbin configuration, in the `config.php` file, with the parameter `trashbin_retention_obligation'.
@ -37,4 +112,3 @@ Example:
'trashbin_retention_obligation' => 1,3,
```
Here the deleted files are kept at least 1 day, and up to 3 days, if the quota of deleted files is not exceeded (if exceeded, they will be deleted sooner).
Loading…
Cancel
Save