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
High memory usage #194
Comments
I have applied these settings :
and it seems to be working. For an unknown reason, the commands on the readme did not set the settings to config.php and I think occ was not using them as a result. I'll confirm later on when all of the data have been processed. |
I have the same problem, high memory usage, even corrupted few php files trying to kill the process, had to reinstall php. I had many segmentation fault errors, after reinstalling php i am fine with that. But still limiting memory to 512 or leaving it -1 on cli/php.ini nothing helps. Had many tries, maybe 100s, still either process is killed for high memory usage or halts until max execution time. Using nextcloud 19, but i don't think it is related to it, it simply using too much memory to handle such process. Any idea how can I use this? it is only for 50G photos, i have done this before on version 18.3 nextcloud. I have to redo it now because new hard rive etc...but i am not able to. Please advice. Thanks |
@fate8383 Try the settings I've posted above, they work. It's been 2 days and it is processing fine for now, no sign of high memory usage. But this issue should not be closed like this, because the problem is present when not modifying the default settings. |
i have already made those changes, still no help. now have installed zram increased all swap and zram to be able to finish it. it is using all of the allocated rams in swap and zram. there is definitely some memory leak or something. |
I think that I'm running into the same issue. . php config: |
There is no solution, I split into folders my images and I go folder by folder to create previews. ...generate-all --path=‘path/to/file’ |
Hi, same here. I'm facing this issue after upgrading from NC18 to NC19. Not sure if i got an update of preview generator with that, cause im using the docker image of NC and this switched from18 to 19 including the installed apps. |
yeah definitely something with v18 to v19 update caused this. app is not updated for v19, it just uses the same settings for v18...I hope and wish the owner looks at it and updates if possible. |
Here's a part of the output of dmesg -T | grep -i "killed process"
It really looks like that the php process is using too much memory. |
here is my workaround |
This is nothing the app can fix. The app just asks the server to generate the previews while it iterates over the folders. |
@rullzer The problem is still existing. I'm trying now on a brand new installation and the same problem happens. |
Problem exists for me aswell |
Fresh install using docker -- Issue still exists for me. when running this command: php -d memory_limit=-1 occ preview:generate-all it simply runs until all of my memory is overwhelmed and the system crashes. |
I have something that worked for me, and am sharing it here -- it's not a fix. I run a SBC (Rockpro64) with 4G of ram, so I always need to be careful with memory lest I use more than physical and then start swapping = system halt due to waiting on storage = bad. :) I did these things:
My experience just by watching htop and the progress is this:
It is almost like it's not clearing out memory fast enough when processing images and builds up until it overruns the system... So here's my final -- a never-ending loop because the script will not regenerate for files that already have images.. I also lowered the available memory so that I could run my other containers:
This will run until it dies, and then start again in 5 seconds, forever.. so every few hours I will check on it until it finally finishes all the thumnails and then never run it again.. I tend to get between 1-3 minutes per process needing to be restarted and it has no problems with whatever file it died at the last time in the next run.. so, looking good for me for the last 2 hours. |
I'm not saying it can't happen. I'm saying it is not this app that is causing it. |
I'm trying to generate previews for 3.3TB of data. I ran
./occ preview:generate-all -vvv
and this process is using a lot of RAM, and eventually exits by its own.NextCloud is running in a container using the official Docker image.
What should I do to complete the process and generate all previews ?
The text was updated successfully, but these errors were encountered: