[ NextCloud ] [ 21.0.3] OwnCloud Fork

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
User avatar
QNAP_Stephane
Experience counts
Posts: 4802
Joined: Wed Mar 27, 2013 1:00 am

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by QNAP_Stephane »

seems it doesn kill the process...

did you try restart your NAS
---------------------------------------------------------------------------------------------------------------------------

Find all QPKG in the MyQnap.org repository https://www.myqnap.org
join our discord server for any inquiry related to qpkg - https://discord.gg/4fPxHSWKQW

----------------------------------------------------------------------------------------------------------------------------
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by raidforsaving »

FYI, for anyone having memory leak issues, I found the following change fixed it for me. I'm usinq QApache 2.4.39 and Nextcloud 16 (non-qpkg). My Qapache is only for Nextcloud, and I have a small personal instance only used for file storage.

UPDATE: I've settled on using the new values below. If you have ideas on making them better please let me know. The defaults are not acceptable.

Proof of memory leak and fix in place:
https://i.imgur.com/MDpMS2I.png

In my Nextcloud/httpd.conf I edited the following section at the bottom.

I lowered many of the values.

Original config:

Code: Select all

# event MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestWorkers: maximum number of worker threads
# MaxConnectionsPerChild: maximum number of connections a server process serves
#                         before terminating
<IfModule mpm_event_module>
    StartServers             3
    MinSpareThreads         75
    MaxSpareThreads        250
    ThreadsPerChild         25
    MaxRequestWorkers      400
    MaxConnectionsPerChild   0
</IfModule>
New config 1 - led to app error - AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

Code: Select all

<IfModule mpm_event_module>
    StartServers             2
    MinSpareThreads         10
    MaxSpareThreads        25
    ThreadsPerChild         15
    MaxRequestWorkers      30
    MaxConnectionsPerChild   50
</IfModule>
New config 2:

Code: Select all

<IfModule mpm_event_module>
    StartServers              2
    MinSpareThreads          30
    MaxSpareThreads         100
    ThreadsPerChild          15
    MaxRequestWorkers       120
    MaxConnectionsPerChild   50
</IfModule>
Last edited by raidforsaving on Sun Feb 23, 2020 2:46 am, edited 1 time in total.
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by raidforsaving »

Has anyone performed this db format change successfully on QNAP? It enables 4-byte character support in the DB.

https://docs.nextcloud.com/server/16/ad ... pport.html
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
purezerg
Getting the hang of things
Posts: 58
Joined: Wed Nov 18, 2009 7:41 pm

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by purezerg »

raidforsaving wrote: Sat Dec 28, 2019 2:04 am Has anyone performed this db format change successfully on QNAP? It enables 4-byte character support in the DB.

https://docs.nextcloud.com/server/16/ad ... pport.html
i too asked this a while ago.
purezerg
Getting the hang of things
Posts: 58
Joined: Wed Nov 18, 2009 7:41 pm

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by purezerg »

Slight change of topic from mem hog to cron..
anyone knows how to enable webcron or cron? i checked crontab. the command line is in there but NC will say "last job execution ran xxx minutes ago. Something seems wrong"
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by raidforsaving »

purezerg wrote: Tue Dec 31, 2019 10:58 pm Slight change of topic from mem hog to cron..
anyone knows how to enable webcron or cron? i checked crontab. the command line is in there but NC will say "last job execution ran xxx minutes ago. Something seems wrong"
Read this for directions on QNAP.

https://wiki.qnap.com/wiki/Add_items_to_crontab
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
purezerg
Getting the hang of things
Posts: 58
Joined: Wed Nov 18, 2009 7:41 pm

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by purezerg »

correct me if i'm wrong.
5 * * * * /share/CACHEDEV1_DATA/.qpkg/Qapache/bin/php -f /share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/cron.php

is this correct?
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by raidforsaving »

oo dang. Mine is now commented out. Odd. They may have changed their handling of crontab.

I manually uncommented mine and changed it to every 15 minutes.
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by raidforsaving »

purezerg wrote: Wed Jan 01, 2020 1:49 am correct me if i'm wrong.
5 * * * * /share/CACHEDEV1_DATA/.qpkg/Qapache/bin/php -f /share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/cron.php

is this correct?
Here is my exact syntax:

Code: Select all

*/15  *  *  *  * /share/CACHEDEV1_DATA/.qpkg/Qapache/bin/php -f /share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/cron.php
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
mitch569
New here
Posts: 9
Joined: Thu May 02, 2019 6:36 pm

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by mitch569 »

raidforsaving wrote: Wed Jan 01, 2020 4:21 am oo dang. Mine is now commented out. Odd. They may have changed their handling of crontab.

I manually uncommented mine and changed it to every 15 minutes.
Yea I noticed mine hadn’t ran in a while. It was commented out also.
Weird
User avatar
OneCD
Guru
Posts: 12146
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by OneCD »

raidforsaving wrote: Wed Jan 01, 2020 4:21 am oo dang. Mine is now commented out. Odd. They may have changed their handling of crontab.
mitch569 wrote: Wed Jan 01, 2020 5:16 am Yea I noticed mine hadn’t ran in a while. It was commented out also.
Is QNAP's Malware Remover installed? I think Malware Remover disables entries it doesn’t recognise.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
mitch569
New here
Posts: 9
Joined: Thu May 02, 2019 6:36 pm

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by mitch569 »

OneCD wrote: Wed Jan 01, 2020 5:30 am
raidforsaving wrote: Wed Jan 01, 2020 4:21 am oo dang. Mine is now commented out. Odd. They may have changed their handling of crontab.
mitch569 wrote: Wed Jan 01, 2020 5:16 am Yea I noticed mine hadn’t ran in a while. It was commented out also.
Is QNAP's Malware Remover installed? I think Malware Remover disables entries it doesn’t recognise.
Yea I installed Malware Remover not long ago.
Is there anyway to add exceptions?
User avatar
OneCD
Guru
Posts: 12146
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by OneCD »

Sorry, I don’t know. :(

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
purezerg
Getting the hang of things
Posts: 58
Joined: Wed Nov 18, 2009 7:41 pm

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by purezerg »

something new just cropped up in the log..

-------------------------------
Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this.
mounts.storage_id
mounts.root_id
mounts.mount_id
------------------------------
how do you guys solve this?
raidforsaving
Easy as a breeze
Posts: 279
Joined: Mon Jul 14, 2014 9:14 am

Re: [ NextCloud ] [ 17.0.1 ] OwnCloud Fork

Post by raidforsaving »

purezerg wrote: Thu Jan 02, 2020 3:56 pm something new just cropped up in the log..

-------------------------------
Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this.
mounts.storage_id
mounts.root_id
mounts.mount_id
------------------------------
how do you guys solve this?
# Perform PATH change to add in Qapache dir :
echo $PATH
export PATH=/share/CACHEDEV1_DATA/.qpkg/Qapache/bin:$PATH
cd /share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/
chmod +x occ

# Enable maintenance mode
./occ maintenance:mode --on

# How to run occ commands from the nextcloud dir:
/opt/Qapache/bin/php occ db:add-missing-indice
/opt/Qapache/bin/php occ db:convert-filecache-bigint

# Disable maintenance mode
./occ maintenance:mode --off

# Undo PATH change:
export PATH=<YOUR ORIGINAL PATH VALUE>
Model name: TS-653D
Firmware version: 4.5.3.1697 build 20210611
Volumes: EXT4, Encrypted volume
Previous: TS-651 dead by CPU bug
Post Reply

Return to “Community Apps”