Skip to content

Commit

Permalink
occ: enable apc
Browse files Browse the repository at this point in the history
Avoid memory exausted error when occ is executed.
There are 2 possibile causes:
- loglevel is set to 0
- apc is disabled

See also nextcloud bug nextcloud/server#25274
  • Loading branch information
gsanchietti committed Jun 16, 2021
1 parent e20ff3f commit 757522c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion root/etc/e-smith/events/actions/nethserver-nextcloud-conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function OCC
params=$@;
source /opt/rh/rh-php73/enable
cd /usr/share/nextcloud/
TERM=dumb runuser -s /bin/bash apache -c "php -dmemory_limit=512M ./occ $params"
TERM=dumb runuser -s /bin/bash apache -c "php -d memory_limit=1024M -d apc.enable_cli=1 ./occ $params"
}

exitOnError () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ our @system_groups;
sub OCC
{
my $params = join(" ", @_);
system("TERM=dumb su - apache -s /bin/bash -c \"source /opt/rh/rh-php73/enable; cd /usr/share/nextcloud/; php -dmemory_limit=512M occ $params\"");
system("TERM=dumb su - apache -s /bin/bash -c \"source /opt/rh/rh-php73/enable; cd /usr/share/nextcloud/; php -d memory_limit=1024M -d apc.enable_cli=1 occ $params\"");
}

sub _cb_group_push
Expand Down

0 comments on commit 757522c

Please sign in to comment.