Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS causes error if scanning large amount of files #32

Open
peterssonanton opened this issue Dec 20, 2018 · 5 comments
Open

TLS causes error if scanning large amount of files #32

peterssonanton opened this issue Dec 20, 2018 · 5 comments

Comments

@peterssonanton
Copy link

peterssonanton commented Dec 20, 2018

Using TLS command causes some clients to disconnect from the caspar server. For example a node server using casparcg-connection (https://www.npmjs.com/package/casparcg-connection).

The issue seems to be caused by this line in media-scanner/src/app.js :33
const rows = await recursiveReadDirAsync(config.paths.template)

There seems to be some sort of timeout when it has to scan a lot of files and causes a socket disconnect, but still returns status OK.

Possibly related error message:
errormediascanner4

We use several node services like this and all disconnect at the same time when this error occurs, not just the one sending the command (caspar client works though).

To reproduce:

  • Add lots of files to casparcg templates path (30,000 +)
  • Use a node service with casparcg-connection package to connect to the server
  • Call TLS
  • Watch service disconnect
@ronag
Copy link
Member

ronag commented Dec 20, 2018

This is why this was moved out of CasparCG server. This way of listing files does simply not work when you have thousands of files... I would suggest you implement your own node service and perform listing through e.g. HTTP instead of through CasparCG.

@ronag
Copy link
Member

ronag commented Dec 20, 2018

Or... don't have soo many files in the templates folder

@dotarmin
Copy link
Contributor

@peterssonanton Add lots of files to casparcg templates path (30,000 +)

Why having that much templates? I'm not sure we have that much. But this could also be the same problem with issue #30 on the other hand. We have to look into this.

Good job @peterssonanton

@peterssonanton
Copy link
Author

Its not all templates, but many of our servers are configured to use the caspar root folder as templates path, so the media scanner has to scan all those files including media, images and whatever.

@taurojo
Copy link

taurojo commented Oct 18, 2020

I have exactly the same problem.
When scanning a network drive it generates the same problem and cannot detect or access the network folder.
We have the entire repository in the same folder and subfolders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants