-
Notifications
You must be signed in to change notification settings - Fork 49
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
Verifying a bag throws an exception: Unable to create new native threads #121
Comments
When instantiating BagVerifier I am now using Executors.newSingleThreadExecutor(). It fixed the issue. |
For a large bag you may want to use @acdha does |
That's exactly what I was wondering — as long as someone can override it for unusual cases, the CPU count seems like a reasonable default. |
Yup, they are able to because a different user asked to be able to finely tune that threadpool. That's why there are 4 different constructors on that class, to be able to override various parts of it or keep the defaults. |
Yeah, I figure there are a few cases where someone would need to change that value but it really does seem like most of them would be edge cases. |
When submitting an issue please include:
Please format it in the given when then style
For example (from link above):
Given
When
Then
Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)
at gov.loc.repository.bagit.verify.PayloadVerifier.checkAllFilesListedInManifestExist(PayloadVerifier.java:146)
at gov.loc.repository.bagit.verify.PayloadVerifier.verifyPayload(PayloadVerifier.java:103)
The exception is thrown in method "checkAllFilesListedInManifestExist(Set files)" in file PayloadVerifier.java in line
this.executor.execute(new CheckIfFileExistsTask(file, missingFiles, latch));
when a new task isto be executed on executor.
When checking the thread creation limit on mac It was 709.
The text was updated successfully, but these errors were encountered: