-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes (7947M) > maxPhysicalBytes (7756M) #1383
Comments
Yes, we can set the |
Ok, can I ask why the memory will increase when using this? |
What do you mean? If you're using an algorithm that needs that amount of memory, then you'll need to let it use that much memory. |
We used grabber and recorder to segment audios. The qps is about 40 per second. After few hour, the memory will increase from 2G to almost 8G. Is there any possible reason for this? |
Using If using |
Ok, thanks |
Hi~ |
Are you still getting OutOfMemoryError? |
After setting properties "maxPhysicalBytes" and ”maxBytes”, there was no OutOfMemoryError when using 8G. But the memory will still grow slowly untill out of memory of jvm. |
Could you provide a small code snippet to reproduce this issue? |
There is a problem with the mechanism of javacpp free memory, which can not be released immediately as jvm, especially in high concurrency and high throughput scenarios. Because javacpp maintained a memory block of its own, the mechanism had problems. |
@szlzhm That's what PointerScope is for, see above. |
…nd `FFmpegFrameRecorder` to deallocate quickly temporary buffers (issue #1383)
I've added PointerScope inside the methods of FFmpegFrameGrabber and FFmpegFrameRecorder in commit 28b90ef. Please give it a try with the snapshots: http://bytedeco.org/builds/ |
I think I've fixed all the memory leaks occurring in |
Ok! I will try this later. Thank you very much |
I try to use this in build.gradle, but it cannot build with the errors below for example:
|
My build.gradle is like this: dependencies { |
The snapshots are a bit broken right now. |
@wyh0919 Ok, the snapshots have been fixed. Please try it again that way with Gradle, it should work now. |
Fixes included in JavaCV 1.5.4. Enjoy! |
Hello,
I got this error when using javacv to segment audios. And then it cannot work any more. The CPU memory is 16G, it occured when I used about 10G memory.
I have noted the similar issues, but I have already used version 1.5.2.
Is there any way to increase the maxPhysicalBytes? or some other ways to solve this?
The text was updated successfully, but these errors were encountered: