# Upgrade issues to 21.0.1

**URL:** <https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066>\
**Category:** ℹ️ Support\
**Tags:** update\_problems, nc21\
**Created:** [April 9, 2021, 9:16am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066 "2021-04-09T09:16:54Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![balkonien](https://help.nextcloud.com/user_avatar/help.nextcloud.com/balkonien/32/27660_2.png) [@balkonien](https://help.nextcloud.com/u/balkonien)\
**Post date:** [April 9, 2021, 9:16am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/1 "2021-04-09T09:16:54Z")

</div>

Dear nextcloud community. I did an upgrade to my nc instance today from 20.0.8 to 21.0.1.

I found the source of this behaviour. I thought the upgrade would be to 20.0.9 but unfortunately it was to 21.0.1

> <https://github.com/nextcloud/server/issues/26470>
>
> How to use GitHub
> Please use the 👍 reaction to show that you are affected by the same issue.
> Please don't comment if...

Unfortunately the `occ upgrade` hangs until it is killed by the kernel:

I give you the STDOUT of a recurrent occ upgrade:

```auto
sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 21.0.1.

Update to Nextcloud 21.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-21.0.1.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] 
Killed

Keep maintenance mode active? [y/N] y
Maintenance mode kept active

```

[/details]

Nextcloud version : 21.0.1  
Operating system and version: Debian Buster (up to date)  
Apache or nginx version: Apache/2.4.38 (Debian)  
PHP version: PHP 7.3.27-1~deb10u1 (cli) (built: Feb 13 2021 16:31:40) ( NTS )

Apache Error:

```auto
[php7:error] [pid 18126] [client 2.206.161.85:36466] PHP Fatal error: Uncaught Error: Class 'Exception' not found in /var/www/nextcloud/remote.php:46\nStack trace:\n#0 {main}\n thrown in /var/www/nextcloud/remote.php on line 46

```

My instance is not reachable right now and I don’t know what to do.

---

<div class="post-metadata">

**Author:** ![Charles\_Williams](https://help.nextcloud.com/user_avatar/help.nextcloud.com/charles_williams/32/33782_2.png) [@Charles\_Williams](https://help.nextcloud.com/u/Charles_Williams)\
**Post date:** [April 9, 2021, 11:45am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/2 "2021-04-09T11:45:56Z")

</div>

As an extra bonus. If you are using shared Calendars I would NOT upgrade anyway unless you want to fix your broken installation afterwards. They still have a major bug in Caldav support that they keep ignoring and breaks shared calendars.

---

<div class="post-metadata">

**Author:** ![palto42](https://help.nextcloud.com/user_avatar/help.nextcloud.com/palto42/32/4606_2.png) [@palto42](https://help.nextcloud.com/u/palto42)\
**Post date:** [April 9, 2021, 7:41pm UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/3 "2021-04-09T19:41:39Z")

</div>

Maybe same issue as here [https://help.nextcloud.com/t/server-not-responding-after-nextcloud-upgrade-20-0-0-9-to-21-0-1/](https://help.nextcloud.com/t/server-not-responding-after-nextcloud-upgrade-20-0-0-9-to-21-0-1/) ?

---

<div class="post-metadata">

**Author:** ![raid1](https://help.nextcloud.com/letter_avatar/raid1/32/6_22734026db12803ebb3e059622ac3534.png) [@raid1](https://help.nextcloud.com/u/raid1)\
**Post date:** [April 9, 2021, 9:29pm UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/4 "2021-04-09T21:29:04Z")

</div>

Do you have any details? Or links to issues?  
I’d like to find out more about this before upgrading my server…

Thanks!

---

<div class="post-metadata">

**Author:** ![andrimont](https://help.nextcloud.com/letter_avatar/andrimont/32/6_22734026db12803ebb3e059622ac3534.png) [@andrimont](https://help.nextcloud.com/u/andrimont)\
**Post date:** [April 9, 2021, 11:31pm UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/5 "2021-04-09T23:31:17Z")

</div>

I think that you should wait for an update, or at least have a solid backup.

---

<div class="post-metadata">

**Author:** ![raid1](https://help.nextcloud.com/letter_avatar/raid1/32/6_22734026db12803ebb3e059622ac3534.png) [@raid1](https://help.nextcloud.com/u/raid1)\
**Post date:** [April 9, 2021, 11:51pm UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/6 "2021-04-09T23:51:30Z")

</div>

Sorry, this might sound rude but it’s not important what _you_ or Charles\_Williams _think_.  
He claimed that there is a bug but I don’t find any evidence or bug reports for it.

So please give us some more details (best option: open an issue) or please don’t say such things.

---

<div class="post-metadata">

**Author:** ![mind-overflow](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mind-overflow/32/36983_2.png) [@mind-overflow](https://help.nextcloud.com/u/mind-overflow)\
**Post date:** [April 10, 2021, 6:43am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/7 "2021-04-10T06:43:36Z")

</div>

I have been updating between stable and beta versions for years, and never had this kind of issue. Yesterday, I attempted an upgrade from 20.0.8 to 21.0.1, and my server is now dead and unresponsive. And it has been for the past 9 hours, causing a severe outage and downtime, including other services hosted on the same server.

All I can say is: I started an upgrade from the admin panel, waited a few minutes (backing up, downloading, etc). Then, I decided to keep going with the web interface, and waited for about half an hour on the Nextcloud spinning wheel. After that time, the update failed with “integrity check” errors, and the server died. Refreshing the page did nothing, and that’s the last time I had news from my server.

All I can show is this: my CPU usage before and after attempting the update.

 ![image](https://help.nextcloud.com/uploads/default/original/3X/4/0/40b1c1eb3d6b46710e941f5899381b998942ba40.png)

I would also show RAM and swap, but the hosting company’s control panel does not show them, and I can’t access Grafana - but I’d be more than happy to share any needed info.

I can also show this, however:

 ![image](https://help.nextcloud.com/uploads/default/original/3X/e/8/e86ffaea1b7e8fe46f16298226b3acd92aa9de2d.png)

---

<div class="post-metadata">

**Author:** ![mind-overflow](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mind-overflow/32/36983_2.png) [@mind-overflow](https://help.nextcloud.com/u/mind-overflow)\
**Post date:** [April 10, 2021, 8:29am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/8 "2021-04-10T08:29:12Z")

</div>

Update (i can’t post more than 2 media): here’s how Grafana looked.

 ![image](https://help.nextcloud.com/uploads/default/original/3X/d/7/d76adde2c85ea39a8d8a76e77db1d41128ea235f.png)

---

<div class="post-metadata">

**Author:** ![Bibo-Joshi](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bibo-joshi/32/36989_2.png) [@Bibo-Joshi](https://help.nextcloud.com/u/Bibo-Joshi)\
**Post date:** [April 10, 2021, 8:41am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/9 "2021-04-10T08:41:24Z")

</div>

Hi. Similar problem here. Leaving a comment to bump the thread 🙆🏼‍♂️

---

<div class="post-metadata">

**Author:** ![raid1](https://help.nextcloud.com/letter_avatar/raid1/32/6_22734026db12803ebb3e059622ac3534.png) [@raid1](https://help.nextcloud.com/u/raid1)\
**Post date:** [April 10, 2021, 10:28am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/10 "2021-04-10T10:28:14Z")

</div>

@mind-overflow Unfortunately you overlooked that I responded to the post of @Charles_Williams. He claimed that there are problems with “shared Calendars” without giving any details. So you are accusing me of things that I never wrote. That’s what I would call rude. ☹

You however are talking about the problem of the original poster which I had also and that’s why I looked at this thread. What might help you also: do a search for “APCu”.

I removed the line from my config:  
‘memcache.local’ =\> ‘\OC\Memcache\APCu’,

Alternatively you can add this line to /etc/php/7.3/mods-available/apcu.ini :  
apc.enable\_cli=1

My server is up and running again (after a long outage also) _sigh_

I would appreciate an apology…

---

<div class="post-metadata">

**Author:** ![mind-overflow](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mind-overflow/32/36983_2.png) [@mind-overflow](https://help.nextcloud.com/u/mind-overflow)\
**Post date:** [April 10, 2021, 10:42am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/11 "2021-04-10T10:42:25Z")

</div>

Ok. I unfortunately have no great way to prove this, but here’s what I did.

I restored 20.0.8 from the /data/updater-xxxxxxx/backups/ folder. I used rsync

```auto
rsync -Aaxv /var/www/nextcloud/data/updater-xxxxxxx/backups/nextcloud-20.0.8.1-xxxxxxxx /var/www/nextcloud/

```

(be careful with the correct folder names).

Then, without touching the database, I restarted everything. I visited the Nextcloud URL on the browser, and I logged in. After logging in, I got an internal server error.

I looked into the Nextcloud log (`/var/www/nextcloud/data/nextcloud.log`), and I saw an error about missing database tables.

My intuition was that, probably, the database was updated to the 21.0.1 format. So, I did this:

- I went into the nextcloud/updater/ directory.
- I ran the updater manually.

```auto
sudo -u www-data php updater.phar

```

It went fairly smoothly, downloaded a bunch of stuff and moved it in place. Then it asked

```auto
Should the "occ upgrade" command be executed? [Y/n]

```

I said “yes”. The update process started, and it showed a bunch of “repair steps”. Nice.  
At the end, there was a final step, where the server died on me last time:

```auto
2021-04-10T09:25:32+00:00 Starting code integrity check...

```

At this point, I launched a parallel SSH terminal and launched `htop`, to monitor resources usage.

The Nextcloud `cron.php` script was launcher once, and taking up about 6GBs of RAM. After 3/4 minutes, it was spawned ANOTHER time, and started taking up RAM and CPU. I killed both of them, and RAM usage dropped to 2GB. The update script did not fail however, saying that “integrity check” was passed. (I doubt it, as I literally killed the script that was checking for it - but it doesn’t mean it failed either). After that, Nextcloud was responsive again, on latest version 21.0.1.

```auto
2021-04-10T09:30:30+00:00 Finished code integrity check
2021-04-10T09:30:31+00:00 Update successful
2021-04-10T09:30:31+00:00 Maintenance mode is kept active
2021-04-10T09:30:31+00:00 Resetting log level

```

Skipping integrity check is not a good thing nor a good practice, but it is what it is. It never happened to me in the past that the integrity check would take up so many resources.

---

<div class="post-metadata">

**Author:** ![mind-overflow](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mind-overflow/32/36983_2.png) [@mind-overflow](https://help.nextcloud.com/u/mind-overflow)\
**Post date:** [April 10, 2021, 10:50am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/12 "2021-04-10T10:50:54Z")

</div>

I am terribly sorry. I removed the _triggered_ parts from my message and I’d like to apologize for it. I absolutely confused the two people and mentally connected your message to the wrong one.  
Hope I haven’t ruined your day.

_Btw, I don’t understand. Why should I remove APCu from my Nextcloud config? It wasn’t there to begin with, but the Nextcloud docs suggested enabling it, if I’m not wrong._

---

<div class="post-metadata">

**Author:** ![raid1](https://help.nextcloud.com/letter_avatar/raid1/32/6_22734026db12803ebb3e059622ac3534.png) [@raid1](https://help.nextcloud.com/u/raid1)\
**Post date:** [April 10, 2021, 3:22pm UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/13 "2021-04-10T15:22:50Z")

</div>

Apology accepted. 🙂

This was my first failed update since my migration from owncloud to nextcloud. All the previous ones went really smooth. I hope the NC guys will come back to the usual quality next time.

If the APCu line wasn’t in your config then your exact bug might be different than mine. I added that line 1-2 years ago after the admin page suggested that. In the meantime there was a php upgrade on my Debian machine which lead to the missing apc.enable in the php config.

I hope your NC instance is stable now again. Mine seems to be. Calendars work as before.  
Haven’t seen the promised big speed improvement yet but didn’t do any real tests so it might be there. 🙂

---

<div class="post-metadata">

**Author:** ![mind-overflow](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mind-overflow/32/36983_2.png) [@mind-overflow](https://help.nextcloud.com/u/mind-overflow)\
**Post date:** [April 10, 2021, 4:34pm UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/14 "2021-04-10T16:34:32Z")

</div>

Thank you.

Actually, I haven’t been clear - the APCu line _is_ and already was in my Nextcloud config file, as suggested by the manual, but the `apc.enable_cli=1` was not in my `apcu.ini` file. I was just wondering why that entry would be needed, as the manual didn’t say anything about it - or, why would I need to disable APCu cache, since the manual suggests the opposite.

---

<div class="post-metadata">

**Author:** ![raid1](https://help.nextcloud.com/letter_avatar/raid1/32/6_22734026db12803ebb3e059622ac3534.png) [@raid1](https://help.nextcloud.com/u/raid1)\
**Post date:** [April 10, 2021, 5:34pm UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/15 "2021-04-10T17:34:42Z")

</div>

Actually I cannot remember what or who told me to add that php config line.  
But someone did. 🙂 And it worked.

---

<div class="post-metadata">

**Author:** ![palto42](https://help.nextcloud.com/user_avatar/help.nextcloud.com/palto42/32/4606_2.png) [@palto42](https://help.nextcloud.com/u/palto42)\
**Post date:** [April 10, 2021, 6:14pm UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/16 "2021-04-10T18:14:56Z")

</div>

I solved the issues with the changed apc settings, but I didn’t changed it globally but only in cront jobs as described in [[NC 21] OCC Update error: allowed memory size exhausted · Issue #25742 · nextcloud/server · GitHub](https://github.com/nextcloud/server/issues/25742#issuecomment-783774547)

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 13, 2024, 9:09am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/17 "2024-12-13T09:09:11Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 13, 2024, 9:09am UTC](https://help.nextcloud.com/t/upgrade-issues-to-21-0-1/113066/18 "2024-12-13T09:09:12Z")

</div>


