What does message meam:java.lang.OutOfMemoryError: unable to create new native thread
#1
When I click "search & scrape..." messages like this one all the time occur:
Image

Image
Code:
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.addWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
    at org.tinymediamanager.core.threading.TmmTaskManager.addMainTask(TmmTaskManager.java:205)
    at org.tinymediamanager.ui.movies.actions.MovieSelectedScrapeAction.processAction(MovieSelectedScrapeAction.java:74)
    at org.tinymediamanager.ui.actions.TmmAction.actionPerformed(TmmAction.java:35)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

How could one avoid that? Scraping (even of a single movie) is not possible anymore.

And after scraping of about 2000 movies before most of the images of them are not shown. How could I make the program to show / download them?
#2
as it might be obvious: you have been hit by an out of memory error...
the library size has been grown so much that Java cant allocate more memory for further tasks; you should increase your memory settings a bit (not to ne maximum since that could prevent tmm from starting) and try again.
You find the setting in the general settings section
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#3
I have 8 GB RAM.
Quote:you should increase your memory settings a bit (not to ne maximum since that could prevent tmm from starting) and try again.
It was set to 1280 at the beginning. Increasing does not help, the same error again. Respectively finally the program does not start anymore. How can I get it starting again?

Anything else I could do (besides of buying more RAM or such)? May be shrink the library? There are not that many movies, series I would think.
#4
(2019-10-29, 22:59)Pega Wrote: I have 8 GB RAM.
Quote:you should increase your memory settings a bit (not to ne maximum since that could prevent tmm from starting) and try again.
It was set to 1280 at the beginning. Increasing does not help, the same error again. Respectively finally the program does not start anymore. How can I get it starting again?

Anything else I could do (besides of buying more RAM or such)? May be shrink the library? There are not that many movies, series I would think.  

Hi, I had similar with 4000 films 300 video-ts, 2000 series and I have 16gb of Ram. My workaround was to have several smaller folders each with its own set of TMM files
#5
Hello!
Quote:I had similar with 4000 films 300 video-ts, 2000 series and I have 16gb of Ram.
Oh dear! So I am lost, I have 10.000 films and 10.000 episodes (you mean episodes, or?) in the library with only 8 GB RAM. And there are 9.000 movies and 20.000 or so episodes still to be scraped.
Quote:My workaround was to have several smaller folders each with its own set of TMM files
Each movie here has a single folder. What do you mean by "several smaller folders" and own set...? So how does your folder structure look like?
#6
(2019-10-29, 23:56)Pega Wrote: Hello!
Quote:I had similar with 4000 films 300 video-ts, 2000 series and I have 16gb of Ram.
Oh dear! So I am lost, I have 10.000 films and 10.000 episodes (you mean episodes, or?) in the library with only 8 GB RAM. And there are 9.000 movies and 20.000 or so episodes still to be scraped.
Quote:My workaround was to have several smaller folders each with its own set of TMM files
Each movie here has a single folder. What do you mean by "several smaller folders" and own set...? So how does your folder structure look like? 

I am a newbie to kodi so have not converted all my media library, but discovered that TMM uses base memory so I suspect its a 32 bit app. I am using a 38TB DAS non-Raid setup with one folder per 3TB HDD and follow the kodi standard https://kodi.wiki/view/Naming_video_files/TV_shows
#7
So you have 3 TB of movies in one folder. And various 3 TB folders with movies. And each movie is in a single folder in the 3TB folder? How many movies / movie folders do you have in the 3 TB folders?
#8
a) tmm is not 32 bit application -> it completely depends on the java version you have installed. If you have java 32 bit installed, the max memory you can use is rather _low_ (~1.5gb). I always suggest our users to use a 64 bit Java version! If you have still a 32bit Java version, you should consider re-installing a 64bit java
b) try to split tmm into 2 instances (movies & tv shows)
c) I have tested tmm with a rather big lib (~20k episodes) and it played well.. I suspect there must be a memory leak in the scraping process. But this needs to be analyzed deeply
d) the memory settings are written into the file extra.txt; if you remove the line in this file, tmm starts with the default memory settings (or you could adopt the value in there)

furthermore the oracle java runtime has a poor memory management which can lead you to stop running tmm without any hint Sad
there is another java out there, but without the nice file/directory chooser dialogs.. you may try this, but be aware that until 3.1 you get ugly file/directory open dialogs
https://adoptopenjdk.net/?variant=openjd...ant=openj9
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#9
(2019-10-30, 02:03)Pega Wrote: So you have 3 TB of movies in one folder. And various 3 TB folders with movies. And each movie is in a single folder in the 3TB folder? How many movies / movie folders do you have in the 3 TB folders?

I'm still building the library - so its Work in Progress, like you. 1 folder per drive and don't forget 3TB is the unformatted size, plus I am trying to leave a 365gb space for defrag

How many per folder depends on show duration (number of seasons)

I have 16gb memory but this makes no difference 
"mlaggner" that is useful information, thank you

I have great success with shows, though films do scrape  - have problem with multi-part cd1 cd2 cd3, it doesn't follow kodi standard
#10
Where / how can one verify it is the 64bit version:
Image

Quote: b) try to split tmm into 2 instances (movies & tv shows)
At the moment I have about half (or less) of the series, movies I have in the library. So this meant I had to split it four times (or even more)?

d) Thank goodness, now TMM starts again.

Quote: furthermore the oracle java runtime has a poor memory management which can lead you to stop running tmm without any hint Sad
But why at all does one use such poor java when it does not work correctly, obviously?

Quote:there is another java out there, but without the nice file/directory chooser dialogs.. you may try this, but be aware that until 3.1 you get ugly file/directory open dialogs
Cannot remember to ever have seen such file/directory chooser dialogs. When are such ugly dialogs shown? 3.1? Here is shown a newer version(?):
Image

Quote:I'm still building the library - so its Work in Progress, like you. 1 folder per drive and don't forget 3TB is the unformatted size, plus I am trying to leave a 365gb space for defrag

How many per folder depends on show duration (number of seasons)

Very sorry, I cannot understand what that means. Each movie is in a single folder in the 3TB folder? How many movies / movie folders do you have in the 3 TB folders?

Quote: I have 16gb memory but this makes no difference
For what?
#11
(2019-10-30, 11:02)Pega Wrote: Where / how can one verify it is the 64bit version:
Image
Quote:b) try to split tmm into 2 instances (movies & tv shows)
At the moment I have about half (or less) of the series, movies I have in the library. So this meant I had to split it four times (or even more)?

d) Thank goodness, now TMM starts again.
Quote:furthermore the oracle java runtime has a poor memory management which can lead you to stop running tmm without any hint Sad
But why at all does one use such poor java when it does not work correctly, obviously?
Quote:there is another java out there, but without the nice file/directory chooser dialogs.. you may try this, but be aware that until 3.1 you get ugly file/directory open dialogs
Cannot remember to ever have seen such file/directory chooser dialogs. When are such ugly dialogs shown? 3.1? Here is shown a newer version(?):
Image
Quote:I'm still building the library - so its Work in Progress, like you. 1 folder per drive and don't forget 3TB is the unformatted size, plus I am trying to leave a 365gb space for defrag

How many per folder depends on show duration (number of seasons)

Very sorry, I cannot understand what that means. Each movie is in a single folder in the 3TB folder? How many movies / movie folders do you have in the 3 TB folders?
Quote:I have 16gb memory but this makes no difference
For what?       

mlaggner has established the Java installed cannot access more than 2gb so a 64-bit version is required

See here https://java.com/en/download/faq/java_win64bit.xml 

It says here The information on this page is intended for users of a 64-bit Windows operating system.
You can check if you are running 64-bit Windows before downloading 64-bit Java for Windows using the following link.

Problem is TMM selects 32-bit Java on install?
#12
Thank you very much and very sorry, but I absolutely cannot understand the context.

Logout Mark Read Team Forum Stats Members Help
What does message meam:java.lang.OutOfMemoryError: unable to create new native thread0