Jump to content

Emby slow with new items at start


MikeyMan

Recommended Posts

dcook

Are you using mapped drive letters?

They don't always reconnect and when they do often not right at boot.  

If you are using Drive mappings, you should change to UNC path.

Link to comment
Share on other sites

MikeyMan

im using usn paths.

 

there does seem to be something in the order of the services being run.

would also explain that on reboot it does work.

 

now i have to find a way to start emby after the network is running.

tried a delayed start and that also works, but is too slow.

Link to comment
Share on other sites

MikeyMan

After some further testing, it seems that we indeed have found the reason for the issue. Now looking for a solution.

 

I've tried the delayed start as posted yesterday. But that takes much too Long.

Even tried some registry fixes i found online to decrease the waiting time. But that doesn't seem to do anything.

 

Also tried adding some dependencies to the service, to no avail.

 

My Nas is always on, so the Connection shouldn't be a problem.

 

Any other ideas? In my opinion the fact that the network isn't available yet could be handled more elegantly by emby.

 

Btw, was just thinking, could it be that you have Made emby server quicker to start in the past that caused the issue?

Link to comment
Share on other sites

MikeyMan

update: after adding lanmanworkstation as dependency, i no longer see the errors.

however, the scan is not started at boot yet. will fiddle arouns further.

Link to comment
Share on other sites

To be honest, I am guessing that it probably is running, but we need to find out why you don't think that it is. Please make sure to attach complete server logs when reporting issues. Thanks.

Link to comment
Share on other sites

MikeyMan

The reason i think it is not Running is that i don't see the media scan Running.

 

When i manually (Re)start the service or have it start delayed, i do see the scan.

 

Will post logs when i get Home.

Link to comment
Share on other sites

MikeyMan
Too bad; i see the same error in the logfile:2016-06-25 15:25:23.9450 Error LibraryMonitor: Error in Directory watcher for: \\NAS\Film	*** Error Report ***	Version: 3.0.5972.0	Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service	Operating system: Microsoft Windows NT 6.2.9200.0	Processor count: 4	64-Bit OS: True	64-Bit Process: True	Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server	Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe	De opgegeven netwerknaam is niet langer beschikbaar	System.ComponentModel.Win32Exception	No Stack Trace Available	2016-06-25 15:25:23.9450 Info LibraryMonitor: Stopping directory watching for path \\NAS\Film2016-06-25 15:25:23.9450 Info LibraryMonitor: Disabling realtime monitor to prevent future instability2016-06-25 15:25:23.9450 Error LibraryMonitor: Error in Directory watcher for: \\NAS\Concerten	*** Error Report ***	Version: 3.0.5972.0	Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service	Operating system: Microsoft Windows NT 6.2.9200.0	Processor count: 4	64-Bit OS: True	64-Bit Process: True	Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server	Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe	De opgegeven netwerknaam is niet langer beschikbaar	System.ComponentModel.Win32Exception	No Stack Trace Available	2016-06-25 15:25:23.9450 Info LibraryMonitor: Stopping directory watching for path \\NAS\Concerten2016-06-25 15:25:23.9450 Error LibraryMonitor: Error in Directory watcher for: \\NAS\Series	*** Error Report ***	Version: 3.0.5972.0	Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service	Operating system: Microsoft Windows NT 6.2.9200.0	Processor count: 4	64-Bit OS: True	64-Bit Process: True	Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server	Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe	De opgegeven netwerknaam is niet langer beschikbaar	System.ComponentModel.Win32Exception	No Stack Trace Available	2016-06-25 15:25:23.9450 Info LibraryMonitor: Stopping directory watching for path \\NAS\Series

Actually these are the first log-lines in the log.

I'll look into adding some more dependencies so that Emby can start later in the process.

Edited by MikeyMan
Link to comment
Share on other sites

MikeyMan

Update; added the NAS to the hosts file and tried to map to an ip-address instead of UNC, no luck so far.

 

Think i have to look into some sort of script to ping the NAS first or something.

Edited by MikeyMan
Link to comment
Share on other sites

MikeyMan

Been fiddling around with some scripting. Does seem to work better now.

 

@echo off
set host=NAS


:TEST
   (ping -n 1 %host% >nul ) && goto :START
   timeout /t 1 > nul
goto :TEST




:START
net start emby


exit

is the code i use.

 

I don't see any error with the connection now. I also don't see a log for the libary monitor to run.

And also, after boot the library scan isn't running.

 

Log posted at: 

 

https://gist.githubusercontent.com/MikeyMan83/a36ee0b39b5d3f2b55328a2b1606ff67/raw/40794e7532d0b9023a5e1d6a59d2bfa9d1b81235/embylog

 

 

Link to comment
Share on other sites

are you sure that's a complete startup log and doesn't have content manually removed? it doesn't look complete to me. thanks.

Link to comment
Share on other sites

MikeyMan

Not sure that it's complete, but I am sure I haven't removed anything.

 

Copied one whole logfile.

I have debug loggin on at the moment. Would it help if I turn it off?

Link to comment
Share on other sites

No, that's fine. startup tasks only trigger when emby server actually starts. not when you start your machine, or wake it from sleep. this doesn't look like an emby server startup to me.

Link to comment
Share on other sites

MikeyMan

What I've done; i've shut down the pc around 9:45.

 

Then i've booted at 14:39. The server was started, since it is running now :)

 

Although I must say that the log looks different than some I've seen in the past.

 

I've gone to: Help - Logs and copied the top file.

Link to comment
Share on other sites

MikeyMan

And another logfile:

 

https://gist.github.com/MikeyMan83/c1e14a357f31cd836dcccab3599c7ad9

 

Shut down at 18:xx, booted at 21:xx.

No cuts in between.

 

Whats going on with the log?  :(

 

The script above is running at startup to start the service.

 

After a manual stop/start, i get the following log:

https://gist.github.com/MikeyMan83/c6df91917d348dc6d7ccc255b157a73f

 

That looks better.

What's the difference in startup procedure?

Edited by MikeyMan
Link to comment
Share on other sites

MikeyMan

Had another look at the logs from today. It seems that the errors are still there:

2016-07-03 22:36:30.0774 Debug SessionManager: Disposing session controller WebSocketController2016-07-04 19:34:13.6777 Error LibraryMonitor: Error in Directory watcher for: \\10.0.0.4\Concerten	*** Error Report ***	Version: 3.0.5972.0	Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service	Operating system: Microsoft Windows NT 6.2.9200.0	Processor count: 4	64-Bit OS: True	64-Bit Process: True	Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server	Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe	De opgegeven netwerknaam is niet langer beschikbaar	System.ComponentModel.Win32Exception	No Stack Trace Available	2016-07-04 19:34:13.6777 Error LibraryMonitor: Error in Directory watcher for: \\10.0.0.4\Film	*** Error Report ***	Version: 3.0.5972.0	Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service	Operating system: Microsoft Windows NT 6.2.9200.0	Processor count: 4	64-Bit OS: True	64-Bit Process: True	Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server	Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe	De opgegeven netwerknaam is niet langer beschikbaar	System.ComponentModel.Win32Exception	No Stack Trace Available	2016-07-04 19:34:13.6777 Info LibraryMonitor: Stopping directory watching for path \\10.0.0.4\Concerten2016-07-04 19:34:13.6777 Info LibraryMonitor: Stopping directory watching for path \\10.0.0.4\Film2016-07-04 19:34:13.6777 Error LibraryMonitor: Error in Directory watcher for: \\10.0.0.4\Series	*** Error Report ***	Version: 3.0.5972.0	Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service	Operating system: Microsoft Windows NT 6.2.9200.0	Processor count: 4	64-Bit OS: True	64-Bit Process: True	Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server	Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe	De opgegeven netwerknaam is niet langer beschikbaar	System.ComponentModel.Win32Exception	No Stack Trace Available	2016-07-04 19:34:13.6777 Info LibraryMonitor: Stopping directory watching for path \\10.0.0.4\Series2016-07-04 19:34:15.6933 Debug NetworkManager: Querying interface: LAN-verbinding. Type: Ethernet. Status: Up2016-07-04 19:34:15.6933 Debug NetworkManager: Querying interface: Loopback Pseudo-Interface 1. Type: Loopback. Status: Up2016-07-04 19:34:15.6933 Debug NetworkManager: Querying interface: LAN-verbinding* 2. Type: Tunnel. Status: Down2016-07-04 19:34:15.6933 Debug NetworkManager: Querying interface: isatap.{87645AF7-2792-44D4-9D34-E2E155589167}. Type: Tunnel. Status: Down

It does say that a tunnel is down. However, the ping has already been succesfully performed. :?

Link to comment
Share on other sites

MikeyMan

As stated above; i've tried adding a script that only starts emby service when there's a succesful ping to the NAS.

Link to comment
Share on other sites

Since you're running as a windows service, you also need to make sure the account that the windows service runs under has access to those folders. That could be another variable. Unfortunately beyond that this is purely environmental so I can't necessarily answer questions about your network setup. For example, I believe you when you say you've done that ping test, but the operating system is still telling Emby Server that the location cannot be accessed. I cannot tell you why that is happening because that is specific to your environment. I can only relay the information we are given when we try to access it.

Link to comment
Share on other sites

MikeyMan

I understand that it's quite a difficult situation... 

Being a bit of a nerd, this causes all kinds of internal error in my head ;)

 

What i still can't wrap my head around is:

- I was working perfectly without any environmental changes

- When i manually start the service, all is well (with same credentials)

- When i start the service delayed, all is well (albeit very much delayed)

 

I'll have a go at building in another delay for the service to start.

 

Still think it could do with a more decent error handling or retry count or something from Emby server itself.

Edited by MikeyMan
Link to comment
Share on other sites

efigalaxie

The specified network name is no longer available

 

- for whatever reason, the shares, the pointers to your NAS are not solid in the OS. 

 

BTW - in a system where there are very few users and you are the admin...UNC or Mapped drives - Who cares??? 

 

In a large organization, UNC paths are better. 

 

I haven't looked into this as I am at work, but if the scan routine is a service, just do a schedule, a cron in Linux parlance.

 

If you have a certain behavior from the software and then the behavior changes, something HAS caused that change. Either something within the system has changed or the software has changed.

 

The people trying to help you want the complete log, not just what you think is relevant. They want that log delivered to them in a particular way. Why not just do as they ask??

 

 

To clarify for everyone, this is what is being said.

 

The OP - Used to have a library update scan occur upon start of Emby after booting the OS. This happened without him doing anything other than starting Emby after booting the OS.

This is no longer occurring. The OP want's to know why.

 

The Emby Admins are implying that the functionality to which the OP refers NEVER EXISTED at all.

 

At this point, the objective is to get the behavior the OP desires.

 

If the library scan is a service or anything that can be referenced by 'Task Scheduler' in Windows, then create a task - with the trigger as startup - with a 5, 10, 15 minute delay. The delay can be whatever you like.

 

Here is a suggestion. Delete all your paths whether UNC or Mapped. Reboot. Recreate. See what happens 

Link to comment
Share on other sites

MikeyMan

Nice little rant you wrote there, thanks ;) (Just kidding)

 

 

I'll have a look at the shares, maybe that will work a little faster at boot. Not a fan perse, but could give it a try.

 

I do agree there seems to have been a change in the environment. However, nothing I have control over has.

- The HTPC is dedicated for Emby use, and is only booted/used to watch media.

- The Synology has been the same for years

- The network hasn't changed.

 

So if anything has changed, it could be a Windows or Synology Update or an update/change in Emby.

 

 

Do have some points i have to disagree on though.

- The functionality I describe and have experienced, ís actually there. When I start the service manually after boot, or start with a delay at boot (service or program). It does exactly what i described: It starts to scan at start and enables the directory watcher. So the objective is at that point, to get back to where i was (A situation that is logically possible).

- I have shared multiple full logs through GIST. Only; there were some that were incomplete for some reason. At times i've posted some excerpts, but not to 'stress the process'.

 

Things i'll try now; add a delay to the batch, and/or try shares instead of UNC.

Edited by MikeyMan
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...