Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak #3991

Closed
cbrace opened this issue Mar 22, 2017 · 3 comments
Closed

memory leak #3991

cbrace opened this issue Mar 22, 2017 · 3 comments

Comments

@cbrace
Copy link

cbrace commented Mar 22, 2017

Hi all,

I am encountering a memory leak on my NextCloud installation. With NC active, it is consuming all swap space.

Steps to reproduce

  1. login to server with ssh, start top, order by size
  2. six or so httpd threads start growing in size, eventually consuming all available memory.
  3. I disable NC in vhosts.conf, and the issue stops

Server configuration

Operating system:
FreeBSD 11.0 RELEASE p8

Web server:
apache v2.4.5

Database:
mysql v5.6.35

PHP version:
v5.6.30
Nextcloud version: (see Nextcloud admin page)
11.0.2

Updated from an older Nextcloud/ownCloud or fresh install:
update

Where did you install Nextcloud from:
freebsd port

App list Files Activity Gallery Contacts Calendar Notes Tasks

The content of config/config.php:

Config report

Insert your config.php content here
(Without the database password, passwordsalt and secret)

'516ae6f15e855', 'passwordsalt' => 'XXX', 'datadirectory' => '/mnt/disk10/data', 'dbtype' => 'mysql', 'version' => '11.0.2.7', 'dbname' => 'owncloud', 'dbhost' => '127.0.0.1', 'dbtableprefix' => 'oc_', 'dbuser' => 'owncloud', 'dbpassword' => 'XXX', 'installed' => true, 'maintenance' => false, 'theme' => '', 'forcessl' => true, 'trusted_domains' => array ( 0 => 'lim.nl', 1 => 'cbrace.nl', ), 'mail_from_address' => 'root', 'mail_smtpmode' => 'smtp', 'mail_smtphost' => '127.0.0.1', 'mail_smtpport' => 10026, 'mail_domain' => 'cbrace.nl', 'secret' => 'XXX', 'logfile' => '/var/log/nextcloud.log', 'logtimezone' => 'Europe/Amsterdam', 'trashbin_retention_obligation' => '180, auto', 'overwrite.cli.url' => '/nextcloud', 'overwritewebroot' => '/nextcloud', 'loglevel' => 0, 'memcache.local' => '\\OC\\Memcache\\APCu', );
**Are you using external storage, if yes which one:** local/smb/sftp/... No **Are you using encryption:** yes/no No **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... No
@tflidd
Copy link
Contributor

tflidd commented Mar 25, 2017

Can you share how much memory is used by each process and how much memory you have in total?
Do you just connect the clients and do you have a lot of activity (up/downloads)?

@cbrace
Copy link
Author

cbrace commented Mar 29, 2017

My instance of nextcloud is running on a 1GB VPS.

Typically I see six httpd threads using around 300M apiece, which start consuming more and more memory as soon as a desktop client is connected.

No desktop clients connected = no issues

I now have a bash script which restarts apache24 when swap use reaches 90%.

When a nextcloud desktop client is connected to the server, the httpd processes immediately start growing to consume ALL swap, and the script restarts apache every 4-7 minutes.

So, for the time being, I sync and then immediately disconnect.

My server syncs files for a small number of clients -- just three desktops -- but a large number of files, around 500GB in total, of which only a tiny number change at a given time.

If I can supply additional information, just let me know.

@MorrisJobke
Copy link
Member

If you run apache and mod_php a memory leak usually can't cause this issue. Mostly memory leaks only affect php-fpm. We have several instances running with php-fpm and can't see any trouble there.

If your memory get used extensively you maybe want to reduce the apache workers to fit into ram. Beside that we can't do much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants