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

Remove APCu and replace with Redis instead #2040

Merged
merged 4 commits into from
Jul 2, 2021
Merged

Remove APCu and replace with Redis instead #2040

merged 4 commits into from
Jul 2, 2021

Conversation

enoch85
Copy link
Member

@enoch85 enoch85 commented Jul 2, 2021

Fix #2039

@szaimen
Copy link
Collaborator

szaimen commented Jul 2, 2021

Shouldn't we fix this in old installations via the update script, too? I have the feeling that this will fix some issues in the future, too...

@szaimen
Copy link
Collaborator

szaimen commented Jul 2, 2021

Question is then if switching from apcu to redis during the update will produce some issues itself...

Signed-off-by: enoch85 <github@hanssonit.se>
@enoch85
Copy link
Member Author

enoch85 commented Jul 2, 2021

Question is then if switching from apcu to redis during the update will produce some issues itself...

We have to test this before of course.

I will fire up the latest release now just to see if it works. Can you do the same please? @szaimen

@szaimen
Copy link
Collaborator

szaimen commented Jul 2, 2021

What is still missing, afaics is switching from 'memcache.local' => '\\OC\\Memcache\\APCu', to 'memcache.local' => '\\OC\\Memcache\\Redis', in the config.php file during the update script...

nextcloud_update.sh Outdated Show resolved Hide resolved
@enoch85
Copy link
Member Author

enoch85 commented Jul 2, 2021

Tested and works!

@enoch85 enoch85 merged commit 13a6fe1 into master Jul 2, 2021
@delete-merged-branch delete-merged-branch bot deleted the apcu-rm branch July 2, 2021 11:28
@enoch85
Copy link
Member Author

enoch85 commented Jul 2, 2021

Tested on multiple instances now, all is good. Nice!

@matthieu-labas
Copy link

I wanted to comment on issue #2039 but it's locked so I figured I can say it here: it can work with APCu if you add a --define apc.enable_cli=1 to the php command line, whatever it is (in my case it was the cron).

From https://help.nextcloud.com/t/occ-wont-run-with-memcache-apcu/119724/3:

sudo -u www-data php --define apc.enable_cli=1 -f "/opt/nextcloud/cron.php"

@enoch85
Copy link
Member Author

enoch85 commented Jun 14, 2022

@matthieu-labas I'm sure it works, but now we decided to not use it. We have been running Redis successfully for years, and then one of the core devs told us that APCu is better to run for local cache (yes it felt snappier) but then the major bug happened where it just stopped working (Nextcloud bug).

In other words, APCu as cache doesn't feel reliable, and we don't want to maintain something that is broken in Nextcloud, and constantly come up with workarounds to fix it. Redis on the other hand never failed, there are 0 bug reports regarding it, and we made this VM since 2016.

@matthieu-labas
Copy link

@enoch85 I'm sure Redis works fine too ;) but I already had APCu installed after I had many system problems with Redis so I thought I'd drop a line here for those like me :)

@enoch85
Copy link
Member Author

enoch85 commented Jun 14, 2022

If you had issues with Redis, I really think you should try this: https://github.com/nextcloud/vm/blob/master/addons/redis-server-ubuntu.sh ;)

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

Successfully merging this pull request may close these issues.

Memcache \OC\Memcache\APCu not available for local cache
3 participants