Loading.... for a long time

Ok, the problem seems to be that it takes a long time for the guide data to transfer from the DVR to the ATV.

I tried hitting this URL from my laptop:

http://10.0.1.19:8089/devices/132251E8/guide?time=1488156071&duration=10800

It look about 60 seconds for the JSON file to return in the browser. The JSON file is about 2.1 MB.

Cool thanks.

Can you SSH in and run these commands:

cd /mnt/HD/HD_a2/Nas_Prog/ChannelsDVR/channels-dvr/data
du -sh *.airings

4.5G USA-VA65087-X.airings

Yikes, okay.

I was working on some improvements to the guide database last week, which should be ready this week sometime. Should reduce the size of the database on disk which will in turn make fetching guide data a lot faster.

1 Like

Thanks. Is there anything I can do in the meantime to mitigate this?

When I look int the folder ‘USA-VA65087-X.airings/store’, there are hundreds of 2MB files (i.e. 142424.ldb).

Many of them are timestamped from today, although they go back a week or so.

You can try this:

  • Turn off the DVR (from WD app manager)
  • Delete the airings directory (rm -rf USA-VA65087-X.airings)
  • Start DVR again

It will re-download the guide data on start. When the guide is done downloading, check the size on disk again and see how long that guide request takes.

Yay! After taking those steps, the JSON file takes only 5 seconds to retrieve via the browser (and the app loads much faster).

Thanks again! Looking forward to the fix…

I’m having the same issue with long load times. I have QNAP-451. I trired following steps above but didn’t find the airings directory.

Appreciate any help.

On the QNAP, the files live under:

/share/CACHEDEV1_DATA/.qpkg/ChannelsDVR/channels-dvr/data

OK. I stopped service on qnap. Removed the file. Started the service. Now I get a page cannot be found error when I try to go back to web viewer. What did I mess up?

Hard to say without knowing what commands you ran…

Sounds like maybe the service isn’t starting up correctly. You could check the channels-dvr.log to see if there’s an error message.

2017/02/28 16:08:40 [SYS] Starting Channels DVR v2017.01.20.0217 (linux-x86_64) in /share/CACHEDEV1_DATA/.qpkg/ChannelsDVR/channels-dvr/data
2017/02/28 16:08:40 [HDR] Found 1 devices
2017/02/28 16:08:41 [ERR] bonjour: Failed to bind to udp6 port: listen udp6 [ff02::]:5353: socket: address family not supported by protocol
2017/02/28 16:08:41 [SYS] Bonjour service running for dvr-inganas.local. [10.0.1.9]
2017/02/28 16:08:42 [SYS] Started HTTP Server
panic: invalid page type: 3: 10

goroutine 1 [running]:
panic(0xad4e60, 0xc4204bfb80)
/home/vagrant/go/src/runtime/panic.go:500 +0x1a1
github.com/boltdb/bolt.(*Cursor).search(0xc42038fb18, 0xc4204bfb40, 0x4, 0x8, 0x3)
/home/vagrant/channels-server-x86_64/.go/src/github.com/boltdb/bolt/cursor.go:256 +0x429
github.com/boltdb/bolt.(*Cursor).seek(0xc42038fb18, 0xc4204bfb40, 0x4, 0x8, 0x0, 0x0, 0xc4204b73e0, 0x0, 0x0, 0x0, …)
/home/vagrant/channels-server-x86_64/.go/src/github.com/boltdb/bolt/cursor.go:159 +0xb1
github.com/boltdb/bolt.(*Bucket).CreateBucket(0xc42042b358, 0xc4204bfb40, 0x4, 0x8, 0xc42038fc00, 0xc42038fc00, 0x6708d9)
/home/vagrant/channels-server-x86_64/.go/src/github.com/boltdb/bolt/bucket.go:172 +0x124
github.com/boltdb/bolt.(*Bucket).CreateBucketIfNotExists(0xc42042b358, 0xc4204bfb40, 0x4, 0x8, 0xc42038fc60, 0x4528d3, 0xc42038fc30)

rm -rf USA-MN55419-X.airings

This is what I ran.

Not sure what happened, but your database has become corrupted.

Try this:

cd /share/CACHEDEV1_DATA/.qpkg/ChannelsDVR/channels-dvr/data
mv recorder.db recorder.db.old
mv settings.db settings.db.old

Then start the DVR, and visit http://x.x.x.x:8089/restore to find and restore a recent backup.

Thanks. This got it working again. Load times seem much better too.

1 Like

This bug has been fixed in v2017.03.01.2225. Thanks for reporting!

Just updated and tested.

The guide data seems to load in 10-20 seconds now, rather than 1+ minute. Huge improvement!

That said, the app is still just spinning at startup for that 10-20 seconds. Is there any way to have the Channels app open while the guide data is still loading in the background?

Do you shut off the Apple TV? The app should load much more quickly after initial launch… like if you leave the app and come back to it, how long does it take?

1 Like

Sorry, disregard.

I did some more scientific testing on all ATVs. On first launch (after reboot) the app takes 12 seconds to load. On subsequent opening of the app it’s almost instantaneous.

We have made further improvements to startup time in v2.1.26, now available on the App Store. In our tests its about 2x faster.