iOS app activity causes server to crash

Hello - first, thanks for all your efforts with Nextcloud and the app. I’m impressed with how seamless everything generally is.

I wonder if anyone can help with an issue - essentially any access from Nextcloud iOS app ( from either iPhone 5S or SE, or iPad Air2) causes my self-hosted server (18.0.6 running on RPI 4) to crash.

Nextcloud works well through web interface and OSX sync app. I have also tried the android app which does not cause the issue.

The crash: load average goes north of 6 (sometimes into double digits), seems to be processor in %wa causing this increase. App shows timeout errors / doesn’t display contents of folders. Server log shows PHP memory exceeding limits (initially 512MB but exceeded 1GB also when I increased it). I switched off previews on the server to no avail.

It seems like the iOS app is doing something which is really taxing the server. Any ideas what I should do next in terms of troubleshooting?

Many thanks


From the logs, do you get any clues what the client is doing? Just uploading a lot of stuff?

Thanks for getting back.

I get more and faster queries when using the webpage (which works well without crashing) - there is less activity on apache2 log using the app (causing crashes and slow behaviour).

Looking at mariaDB log I get quite a few ‘aborted connection’ entries on both web and app. I have noticed InnoDB: page_cleaner: 1000ms intended loop took 181647ms

on mariaDB log using app - some similar entries using web but shorter times (6s as opposed to 180s)

I’m afraid I’m not at all familiar with SQL systems though so don’t know if this behaviour is ‘normal’ or not.



This is the io-wait, meaning your are limited by the read and write operations of your system. Good caching can improve this a lot. Do you use redis already, the database-caching (of your maria db) can change a lot. Depends a bit how much RAM you have…

I have APCu. The odd thing is performance is fine on the web interface. It’s just the app that causes a crash. I would have thought it wouldn’t make any difference what the client was if it was only down to read/write delays.

You may well have pointed me in the right direction. I tested the write speed of my SD card (class 10) and even with nothing running, it is around 4Mb/s which seems slow - my other Pi is writing about 10x as fast. Running the test (200mb file written with dd) pushes the %wa up to 50%.

I wonder if the problem is a slow SD card. I’m maybe not seeing this behaviour in web app due to it calling different sized and pre-made previews as opposed to mobile app triggering different sizes of preview.

I’ve ordered a supermegafast microSD and I’ll report back!

Thanks for help so far.

OK - so the iOS app was upgraded last week, and this appears to have solved the problem completely. With my existing SD card and the new fast one, performance is normal. I see a slightly higher %wa using the old card.

Unfortunately I can’t downgrade my iOS app to the earlier version to see if the card upgrade alone would have helped.

Thanks for all your help and suggestions.