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

NioIoHandler Too many open files #338

Open
rpx99 opened this issue Nov 28, 2024 · 3 comments
Open

NioIoHandler Too many open files #338

rpx99 opened this issue Nov 28, 2024 · 3 comments

Comments

@rpx99
Copy link

rpx99 commented Nov 28, 2024

I think the stream need to be closed , c.f. this question?

stream.close();

Root cause:

java.nio.file.FileSystemException: robert2/channel_1/channel_1_911.dat: Too many open files
     at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
     at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
     at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
     at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:261)
     at java.base/java.nio.file.Files.newByteChannel(Files.java:379)
     at java.base/java.nio.file.Files.createFile(Files.java:657)
     at deployment.demo.war//org.eclipse.store.afs.nio.types.NioIoHandler$Default.specificCreate(NioIoHandler.java:320)
     at deployment.demo.war//org.eclipse.store.afs.nio.types.NioIoHandler$Default.specificCreate(NioIoHandler.java:81)
     at deployment.demo.war//org.eclipse.serializer.afs.types.AIoHandler$Abstract.create(AIoHandler.java:681)
     at deployment.demo.war//org.eclipse.serializer.afs.types.AIoHandler$Abstract.ensureExists(AIoHandler.java:720)
     at deployment.demo.war//org.eclipse.serializer.afs.types.AWritableFile.ensureExists(AWritableFile.java:103)
     at deployment.demo.war//org.eclipse.serializer.afs.types.AFile.lambda$ensureExists$0(AFile.java:148)
     at deployment.demo.war//org.eclipse.serializer.afs.types.AFS.applyWriting(AFS.java:130)
     at deployment.demo.war//org.eclipse.serializer.afs.types.AFS.applyWriting(AFS.java:117)
     at deployment.demo.war//org.eclipse.serializer.afs.types.AFile.ensureExists(AFile.java:148)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageFileManager$Default.createNewStorageFile(StorageFileManager.java:506)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageFileManager$Default.createNextStorageFile(StorageFileManager.java:578)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageFileManager$Default.checkForNewFile(StorageFileManager.java:572)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageFileManager$Default.storeChunks(StorageFileManager.java:607)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageChannel$Default.storeEntities(StorageChannel.java:592)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageRequestTaskStoreEntities$Default.internalProcessBy(StorageRequestTaskStoreEntities.java:73)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageRequestTaskStoreEntities$Default.internalProcessBy(StorageRequestTaskStoreEntities.java:40)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageChannelTask$Abstract.processBy(StorageChannelTask.java:244)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageChannel$Default.work(StorageChannel.java:453)
     at deployment.demo.war//org.eclipse.store.storage.types.StorageChannel$Default.run(StorageChannel.java:536)
     at java.base/java.lang.Thread.run(Thread.java:1583)
@rpx99
Copy link
Author

rpx99 commented Nov 28, 2024

Here is the log.txt.
I have 165 .dat files in channel 1.
Will delete the complete store and start over.

@zdenek-jonas
Copy link
Contributor

zdenek-jonas commented Nov 28, 2024

Run ulimit -aS and check the open files limit. If it is too low, you need to increase it or allow some time for the Housekeeping Process to clean up the files.

Another option is to refer to the [Housekeeping configuration documentation](https://docs.eclipsestore.io/manual/storage/configuration/housekeeping.html).

The default limit on many Linux machines is 1024, which is insufficient for data-intensive applications.

@rpx99
Copy link
Author

rpx99 commented Nov 28, 2024

Thanks for your hints. I think I have 512. Doing a bit of testing here.

How to get out of this situation once it happened? Seems the existing store cannot recover from the situation of too many open files? Increase limits?

It's great to have the options you mentioned!

Is it possible to make the store cope with the resources given, i.e. adapt to it automatically?

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