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 (2.25.9.2 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

Richard

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.

Cheers

Richard

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.