I have been getting the dreaded error below for quite a while.
Allowed memory size of 536870912 bytes exhausted (tried to allocate 347852816 bytes) at /var/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php#972
I have read many threads on potential solutions here, but have yet to make the slightest progress toward a solution. This is because I am a Linux idiot with zero expertise, yes, but it is also because there is (I guess?) no simple settings access through NC admin, nor no step-by-step guide for learners to how to edit config directly?
It seems strange that such a simple problem–namely, that more memory should be allocated to run NC correctly the next time it starts–has no straightforward solution through the admin interface? Or am I missing something? Please help me write this n00b how-to!
Of course, the obvious problem here is that I am unqualified as a Linux user or a NC CLI user. This is my failing, but also seems quite a high barrier to non-nerd adoption.
I can only speak to my experience, but I’ve never seen the one-line bash before, which is enough to make a little headway!
so two files found:
409:memory_limit = 512M
409:memory_limit = -1
I’m not sure these are the right file because I don’t know how I’d know that it “matches [my] web server”, but the first number looks like a good candidate.
When I attempt to edit the first one, it tells me no permission. This I have read about in other places, usually someone saying to “be root” which I’m fairly certain I am, it’s my NC admin user. So how to edit it is the next stuck.
Good question, I didn’t install from scratch (despite my madd skillz), used this, which doesn’t seem to mention nginx but the documentation isn’t that clear.
Regardless, I followed your instructions, used vim, had to up it three times, to 4GB??? before CardDav would work. Something is very funky there that it takes that much to serve 100 contacts or so plus a calendar… but now, thanks to you @irongate, it’s the kind of funky that works.
As penance, I will add a more thorough step-by-step this evening, and hopefully other equally lost souls will feel less so as I now do. Many thanks.