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

Cannot enlarge memory arrays ERROR #65

Open
Mochlate opened this issue Jan 16, 2017 · 6 comments
Open

Cannot enlarge memory arrays ERROR #65

Mochlate opened this issue Jan 16, 2017 · 6 comments

Comments

@Mochlate
Copy link

I am getting this error and I have no idea where its coming from.

2017-01-16 17_43_39-logs viewer - my first project

@qeled
Copy link
Owner

qeled commented Jan 16, 2017

How many voice connections do you have? You shouldn't run into this error with internal encoder until maybe 100-150 streams, and if so - I highly suggest cleaning up inactive connections or not using pcm format with FFmpeg at all as it has too much performance overhead.

If you do have very small amount of connections spawned though, it may be a memory leak, but I highly doubt that this is the case.

@Mochlate
Copy link
Author

It appears to be happening when .VoiceConnections is only of length 10

@Mochlate
Copy link
Author

@qeled how can I begin to figure out what might be causing this problem. I can confirm that it happens below 20 people streaming audio at the same time.

@qeled
Copy link
Owner

qeled commented Apr 26, 2017

I've added an option to enable encoding using a native module through the FFmpeg player in the commit above. Do an npm install node-opus and add { ..., format: "pcm", encoderEngine: "native" } to the options.

But again, I don't recommend using the pcm format option and doing audio transcoding in the node process, you should be using { ..., format: "opus" } instead as this will eliminate the biggest bottleneck you are currently facing.

@Mochlate
Copy link
Author

I tried using opus and it did not seem to reduce cpu or ram usage at all

@qeled
Copy link
Owner

qeled commented Apr 26, 2017

If you have preencoded opus audio, optimize it further by using WebmOpusPlayer/OggOpusPlayer instead of transcoding every time through FFmpegEncoder.

Though those only accept node stream objects as source (like HTTP(S) responses, file streams, etc.), and you have to implement networking/IO handling yourself if you need something like connection resuming.

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

2 participants