-
Notifications
You must be signed in to change notification settings - Fork 85
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
Tomcat: Too many open files error #162
Comments
@cmdcolin It looks like it opens 1-3 files per track loaded and doesn't seem to increase (most of the time) and will eventually release the file handles. Loading the bam track (Forager RNA-Seq reads), I see that it loads around 14 . . . goes up to 20 or so and then plateaus. With 3 BAM files I got it to around 80-100 . . and it kind of maxed out (moving back and forth and changing groups). That being said, in the code there is this line . . can't but help to fix:
|
should probably call propertyFile.close() I wasn't sure whether we should put it in the try{} finally {} block or just manually close it |
Actually we should probably just load the file into memory so that it doesn't have to do that on every get request right? |
I think it is working now . . . It probably wouldn't hurt to have it in the init, but performance wise it doesn't make any difference and I am using the "request" explicitly. |
That is what I ended up doing. I had a note to do that eventually. Nathan
|
@cmdcolin If you think this fixed it I would say go ahead and close it. |
Thanks it seems to work so i'll close it for now
I would prefer this, it looks a little messy currently, so...whenever we get a chance in our copious amounts of free time...refactor it |
Reopen: I thought this was a fluke but the first time you open webapollo after a deploy, it returns
This is reproducable on two different servers but I haven't narrowed down the cause yet. |
Hmm . . do you have the trackList.json? It could be something introduced by the JBrowse Servlet, but I suspect its a faulty tracklist.json. I just tested this and it worked great. |
I'm fairly sure it is independant of trackList.json (i tested two different servers, local dev and production) and both have it It only happens the first time you access it, after that, presumably, the config.properties is initialized (since it is initialized within the GET request handler) For completeness though here is a basic trackList.json ==removed== Again, the error goes away after you refresh again |
I but it is having all of the asynchronous requests coming through. I guess we’ll have to move it to the init servlet method. Give me a few to fix this. Nathan
|
There were a few problems . . . and it was serendipity that it was working in the first place (properties was checking for a global, but assigning a local). Both of these are now fixed (doing in the init servlet). Let me know if it doesn’t fix it for you. Still not sure why it ended up working for me. Nathan
|
Looks good now |
If a bunch of tracks are opened at once, then many duplicate file handles are opened for config.properties, basically until it hits the system limit.
Normal operation: around 250 file handles open
After opening up about 10 bam tracks and scrolling around: over 800 file handles open, all duplicates of config.properties
It will just increase until the "too many open files error" or the garbage collector picks up the objects
The text was updated successfully, but these errors were encountered: