Sync on iOS doesn’t clean up the storage correctly

I’ve been working with an issue around storage management on iOS.

I’m fairly sure that sync loses files(tv shows) which have been synced and they are allocated into space but can’t be seen, synced or deleted thus space is lost until plex is removed from iPad completely.

Here the screenshot of my sync at the start.

The next screenshot is the available tv shows. Note NO Castle Which was listed in the sync.

Next is my storage space on the iPad.

Sowing the usage of 72gb.

Now the app is deleted via settings and space is released.

Now plex is reloaded and tv shows re synced as a new client.

Finally with original shows.

And screenshot using the space.

Therefore I’d LOST r40gb of space. Can we figure out why plex iOS client loses space, please?

Any reply to this? I am experiencing the same thing. Was happening with iOS 11 and now iOS 12.

Yes, There happens to three different posts about this, I’m on all three of them now and we’re got the development team engaged, now just to work out whats happening.

Thanks for the report!

I think your hunch is correct @systemshark: used storage in the app is calculated by checking the file size of the items in the database of the Plex Media Server that lives inside the app, instead of checking the size of the actual files. Therefore, sounds like we’re probably not cleaning the database properly and therefore getting wrong storage usage numbers.

I’m a bit concerned about this:

I’m fairly sure that sync loses files(tv shows) which have been synced and they are allocated into space but can’t be seen

Do you mean files that you never deleted and the app should have never deleted went missing?

For anyone having this issue, please use the option in the navigation menu → Help & Support → Debugging → Share Debug Data to share your app logs with us.

Hi Sergious87

Do you mean files that you never deleted and the app should have never deleted went missing?

Yes.

If you look at screen shots numbers 1 it shows 4 episodes of castle are synced to the iPad.
But in screenshot 2 plex doesn’t show the episodes are available to be watched. (And I can’t find them on the device other than sync)

It something which has happened to me a few times, because I update my synced content daily. It’s means that I see episodes go missing. Aka they appear in sync but not on the tv show.

Hi Sergio87

On the space replication. It would make more sense to work on actual used file sizes. But I suspect we’re talk about a few mbytes different. But everything helps.

My working assumption is that when it loses a file which has been synced that’s what does the damage to replicated space as it’s consumed.

I wish I’d sent you the debug and logs from when I did the screenshots.
I did send the buddybuild logs but the complete ones would have been better.

I think it’s a bit more complicated than that, I’m afraid :cry: But I’m not the Sync expert of the team :sweat_smile:

I’d love to understand how could those files be deleted :neutral_face: And anyway, if you delete all synced content (or any item FWIW) from the app, even if the files don’t exist, in theory those entries should be deleted from the database, and therefore that should fix the space issue :disappointed: Not sure what’s preventing the app from cleaning up the database in those situations, I’ll check with the team.

Thanks again for your help!!

Hi. For me it’s much more likely the database on iOS which plex uses is corrupted. It doesn’t seem to matter what I do to release the space, iOS thinks it’s allocated and used by plex. I’m of course guessing but that’s what it feels like.

For me it’s something like this which causes the ‘loss of space’

Hi @sergiou87

Right I think I have an example of this issue on my iPhone. (it’s audiobook based but) I have files in Sync which don’t appear in the Plex Client. I’ve also got a set of logs from the device in verbose mode for you.

Log Files

PlexDebugInfo-systemshark-5.2-14611 (2018-07-23 14.34.38 0100).zip (967.1 KB)

Sync View within Plex Client

And I can’t select LocalDevice/LocalHost. The client thinks it doesn’t have any content synced.

Right now I have 174Mb of Data which synced but the client can’t access it.

Finally Screen shot is the Settings->General->Storage-> showing usage.

Hi @sergiou87

Something very strange going on. I’ve lost files from my sync, I’m playing Atlantis, but as you will on my buddyBuild post, it’s missing. however looking at the PMS service which everything is synced from my ipadpro is appearing at two different devices. Honestly, I only have Plex Beta client loaded.)

This confirms the sync view on the ipadpro, but the second view is my device which appears to have been created twice. The second via the shows, which I’m lossing… Also it’s worth noting that Timeless is on both for example, which explains where my storage space has gone.

Also I sent a PMS error as after a recent build it forced all my files to resync, perhaps this is where the abandoned client was created,

Missing Files via Server Sync view… Notice it’s saying this device hasn’t synced or been seen for a month.

My PMS Server Logs.

Plex Media Server Logs_2018-07-29_20-42-52.zip (3.6 MB)

Plex IOS client

PlexDebugInfo-systemshark-5.2-14611 (2018-07-23 08.12.40 0100).zip (1.3 MB)

Thanks @systemshark! Sorry for the late response, I’ve been out for a few weeks. I’ll share those logs with the team and see if we can understand what’s happening.

Folks, Latest update of PMS server have caused a total re-sync of the machine/server and thus the ipad

Thus everything needs to resync before I leave again. It’s only a hour before I walk out the door so I’m less than excited.

Everything is being reprocessed from the Server and the IOS client now, things it had downloaded, now need to re-synced again.

And I’m down to 23Gb of ‘space’ I started with 112Gb of space. It the same old shows etc. so again it’s resyncinc.

I’m going to tag @sergiou87 to get this noticed again.

Plex Media (2.3 MB)
PlexDebugInfo-systemshark-5.5-15079 (2018-09-23 09.17.31 0100).zip (748.6 KB)

Yep me too…at least you noticed before you walked out the door. I only noticed when I switched to the terrible ‘view offline’ on an airplane… the deign sucks so bad… this bug makes it worse.

Yep. I’ve been there too. Hence why I check before I leave. It finally finished 2 minutes after the airport taxi arrived to collect me.

I have this topic flagged since I travel a lot and use the syncing feature a bunch. Since just reading these latest messages, I went to see if I needed to resync and when I check, everything is fine on my device. I hit the “Sync” button and it says “Updating” for about 3 seconds and then says “Complete”.
I wonder why there is a difference and hope they get it fixed. I hate inconsistencies!!

If it helps, I am on Windows with PMS 1.13.5.5332 and it shows no new server version available but your screenshot shows there is an update to 1.13.8.5395 so we must be different in some way. Also, my ipad is on iOS 12

Good luck!

Hi rbeatse.

I’m on the beta for plex server too so this release will be made to the normal channel in a couple of week I would expect.

And I’m running the beta plex client on a ios12 beta.

So everything is beta releases.

Thanks for the heads up, @systemshark (and sorry to hear about those problems :cry:)

I’ll let the Sync team know about this.

Hi

The issue was because you appear to have two different instances of Plex Media Server - one you run as a service and one you run (for a short while / or accidentally ) that is outside the service.

There were two different machine identifiers for Plex Media Server Erica
I suspect you have multiple windows accounts

Could you search HKEY_USERS in the registry for aab891d690eee5689969f525025ec3f2410261ce to see where it is being picked up from. You may know already. I see you have now signed out that server instance from plex.tv but the damage was already done

Your live server that runs as a service has an id starting with 8c4a5