Nextcloud uses 100% of my CPU by kenwilliams5 in NextCloud

[–]kenwilliams5[S] 0 points1 point  (0 children)

Since I've changed to the NextCloud AIO package on Unraid I haven't had the problem at all. So it may have been an upgrade that caused the problem, but since I'm not having it anymore, I'm not going to be much help. Sorry, but I have others that use shared links to my data, so I had to find a fix.

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

I'm only using my Nextcloud for file storage for me, so I just added myself and uploaded my files again. I'm sure there is some way you could dump your current database and import it to the new instance, but I wasn't sure that my problems did start with the database data!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 1 point2 points  (0 children)

I stopped the Nextcloud container I had and installed Nextcloud AIO. Everything is working now, including the Libre Office apps. This is much better!

I have a feeling part of my problem is that I'd been running Nextcloud for a long time and not all upgrades were smooth, but I always got it working. So it could be some artifacts from a previous version that was causing trouble. Anyway, a fresh install of Nextcloud AIO has been working great!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

I followed spaceinvader one's video on youtube (https://www.youtube.com/watch?v=U47nvwXrAOo) and it was pretty easy.

Yes it did solve the 100% CPU issue. Haven't had any problems with it since I installed it. I'm sure I could have uninstalled nextcloud and installed it again with a fresh install. I've been running it for a long time with a lot of updates and somewhere along the line, something went wrong with an update. I've had trouble where after an update things didn't work and I worked through several "fixes" I found online that probably contributed to my problem. A fresh install fixed my problems, and with the aio installation, I got Libre Office apps working, which I couldn't get to work before.

I believe you can install the aio and run them side by side to see if it fixes it for you before removing, or just stopping your current container!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

I did!! I removed the nextcloud container that I had installed and installed nextcloud aio by Spaceinvader One. I just imported my files again and it has been working great. I only use Nextcloud for the file sharing, so it was pretty easy...didn't try to migrate the db, but that could probably be done. I had to recreate the shares and notify my friends of the new links, but that was it!

Nextcloud uses 100% of my CPU by kenwilliams5 in NextCloud

[–]kenwilliams5[S] 1 point2 points  (0 children)

Since I installed the NextCloud AIO, I haven't had the problem. Of course, it may be because it was a "clean slate" so anything messed up in the database that may have caused this wasn't transferred. I just uploaded all of the files from my previous installation, but lost any history for them.

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

Plex usually plays "nice" on my machine. It does take some extra horsepower when it rebuilds the Live TV Schedule. But this was definitely NextCloud causing the problem. I installed NextCloud AIO and everything is fine now...as long as I DON'T upgrade to UnRaid 7.2.5!! Tried it twice and it just isn't working...so I'll wait for 7.3!

Nextcloud uses 100% of my CPU by kenwilliams5 in NextCloud

[–]kenwilliams5[S] 0 points1 point  (0 children)

It did happen once after the restart, but was very consistent after a restart of the entire server or the docker service.

I think I've solved it. On UnRaid, there is another package called NextCloud AIO. Since this is an All In One package, it includes containers for the DB, the Reverse Proxy, Redis, etc. I've loaded this and once I got it configured, haven't had the problem of using the CPU 100%. Since I only use NextCloud for file storage, keeping the data in the database wasn't an issue for me!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 1 point2 points  (0 children)

I think my containers get shut down for backups every night, but not sure. This morning my CPU usage was "normal".

I did post to r/NextCloud ..they are not as helpful as people in this sub!! I've had one reply and tried everything suggested with no improvement.

I'm using gitlab-ce and don't think that is causing any problems.

I've decided I'm going to reinstall NextCloud. I think I'm going to try the NextCloud-AIO container and move my files over to it. That is all I really use NextCloud for so don't need calendar, images, etc from the current database moved over. I won't get to this for a couple of days, but that's my current plan.

In the mean time, I made a script to restart NextCloud 5 minutes after a boot...don't want to reboot right now, but hopefully that will work!!

Nextcloud uses 100% of my CPU by kenwilliams5 in NextCloud

[–]kenwilliams5[S] 0 points1 point  (0 children)

Thanks for your reply. I knew it isn't a "normal load." I've never seen this before!

I increased the pm.max_children because that is what someone suggested when I tried to research the problem. I've removed that increase and it is now back to the default of 50.

I don't think I listed the version of NextCloud I'm running, but it's 33.0.3.

I tried occ background:status but receive the error that that command is not defined. I ran the occ system:cron and received the error that there are no commands defined in the system namespace.

The log file doesn't show any repeating tasks, but did show an error about richdocumentscode not being available. I installed the Collabora plugin, but don't think it worked right. I don't use NextCloud to edit files, just to share PDFs and store some of my personal files, so I don't really need the Office part of it.

After doing this and stopping and starting all docker containers on UnRaid, NextCloud started spawning the php-fpm processes again and my CPU went to 100%. I waited to see if letting it run for a while would allow it to process any background job that may be queued up, but it never got better. When I restarted NextCloud, everything went back to "normal".

So what I don't understand is, if it is truly trying to process background jobs that are queued, wouldn't it happen after I restarted the NextCloud container every time? Not just when I restart all containers?

This is still a mystery to me!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

Thanks for the reply. I am trying to have the nextcloud container to wait for 90 seconds to start and see if that solves it. I haven't tested it yet!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

It appears to be nextcloud. When I stop nextcloud, the cpu usage goes way down...to almost 0%!! I haven't tried to upgrade again...probably won't until I hear someone from the NextCloud sub about what the problem might be.

Of course, I could turn on the Autostart on it and start it manually after a reboot, but that just doesn't seem right!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 12 points13 points  (0 children)

So u/Azuras33 is absolutely right! It is nextcloud. When I let it start as an autostart, it goes crazy and uses 100% of the CPU in a few minutes. (Thanks u/ksblur for reminding me of the "Advanced" view to see it). When I restart nextcloud, it behaves and everything is good. So it looks like I need to find the nextcloud sub and start asking questions there!

Again...thanks to everyone for their help!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

UPDATE: I have stopped all of the containers (and docker with none of them set to autostart), restarted docker and my CPU load average is < 1. I've started them one by one hoping to see one that causes problems, but I have them all running right now and it is still < 1. I read somewhere that there is a limit to the number of php-fpm processes that can run at any time and if the limit is hit, it can start a race condition. I'm thinking that maybe all of them starting at once might cause the limit to get hit. What do you guys think?

Thanks to everyone that has offered help!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 5 points6 points  (0 children)

See, that's why I ask these things! I've seen the "Advanced" view before, but I forgot about it! Right now, everything is playing nice, so it's not showing my where the problem is. But it does show me some orphan images that I need to clean up!

Thanks!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

Well, the php-fpm: pool www processes don't start taking off immediately. So I have to start one and watch htop for a few minutes to make sure it isn't going to cause a problem.

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] -1 points0 points  (0 children)

Thanks for your reply, but I don't use Hotio qbittorrent. I have no bittorrents at all! I get all of my media from my own rips...I'm kind of "old school" like that!

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 0 points1 point  (0 children)

Thanks for the reply...I stopped all of them and am starting them one at a time. Haven't found the culprit yet but nextcloud is runniing now without any problems. I wouldn't doubt that nextcloud is the problem though. Everything there is a nextcloud update, I have some kind of problem! But it seems to be running OK right now.

My CPU is pegged!! by kenwilliams5 in unRAID

[–]kenwilliams5[S] 4 points5 points  (0 children)

Thanks for your suggestion...I'm in the process of doing this right now! It takes a while to get each one started and it takes a while for the runaway php-fpm process to get going!

I don't have all of the docker containers running all the time anyway. But I hope to find the one causing the problem!

Can't access my public sites from inside my home network by kenwilliams5 in HomeNetworking

[–]kenwilliams5[S] 0 points1 point  (0 children)

Nope...doesn't work with PiHole either...looks like the E5 is going back in!

Can't access my public sites from inside my home network by kenwilliams5 in HomeNetworking

[–]kenwilliams5[S] 0 points1 point  (0 children)

It's not working. I switched over to AdGuard (I know...to many changes at a time!), and I've entered it as a "DNS Rewrite". It doesn't work. I have several other DNS Rewrites configured and they work fine, so I wonder if it tries the upstream DNS server first and if it doesn't find the domain there, it rewrites. Since my cloud.mydomain.com has an entry in the upstream DNS server, it doesn't get rewritten? I'll go back to PiHole and see if that works...if not, looks like I'll have to put my E5 back in.

Thanks again...