You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/07/22 10:44:12 UTC

DO NOT REPLY [Bug 45452] New: Tomcat - Restriction of 80 file opens?

https://issues.apache.org/bugzilla/show_bug.cgi?id=45452

           Summary: Tomcat - Restriction of 80 file opens?
           Product: Tomcat 5
           Version: Unknown
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: chrigoli@tripod.de


Hi

I've got a Java 1.5 Application to generate RSS Files. For each date I open an
existing RSS file and add a new entry to that file, afterwards I save and close
the file. That means when I have 100 dates to process, the RSS file will be
opened and saved 100 times.

The application is running without any problems under different users (root,
meier) when I start it from the console with "java myApp".
When I now start the application within mit servlet that is running on a Tomcat
5.0 Server, it is running without any problems but after date number 80 the
application is getting blocked. So after opening and writing the RSS file 80
times the application cannot open the RSS file anymore. 
The process is still running but the application is not able to open the RSS
file anymore. I also don't get any exception or error in my application log,
inside java or in the catalina.out log file. 

So I think it may be a problem with the tomcat user who is not allowed to read
and write the RSS file so many times. Is there any restriction for the tomcat
user for opening and writing files?

Thanks a lot in advance.

Regards
Christoph


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 45452] Tomcat - Restriction of 80 file opens?

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45452





--- Comment #1 from Julian Reschke <ju...@gmx.de>  2008-07-22 13:29:48 PST ---
Wild guess: doublecheck that you're actually closing the files (if you don't
call close on the FileInputStream, the file will stay open in the operating
system, and OS limits will apply).


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 45452] Tomcat - Restriction of 80 file opens?

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45452





--- Comment #2 from Chrigoli <ch...@tripod.de>  2008-07-23 03:34:33 PST ---
All FileInputStreams are correctly closed. When I check the files the process
has opened (ls /proc/#no/fd), the RSS file is only once (or nonce) opened. So
there is not a problem that the file stays open.
OS Limits are set to 1024, so that won't also not be the problem.

I also tried to run the java application directly with the tomcat user from a
console with java myapp, that run was successful. 

So there must be a restriction inside the tomcat environment.
In my web application I start the java app as follows:
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("java myapp");

Thanks for your help.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 45452] Tomcat - Restriction of 80 file opens?

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45452


Jonathan Leech <jl...@virtela.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jleech@virtela.net
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #3 from Jonathan Leech <jl...@virtela.net>  2008-07-23 08:56:29 PST ---
This is obviously not a Tomcat bug. You are not running the application the
same way when running from within Tomcat and standalone. The culprit here is
Sun Microsystems and their impossible to understand interface for rt.exec().
Every single developer on the planet makes the same mistake you did and doesn't
properly capture the output of the process. You've got a buffer, likely your
System.out or System.err, that fills up. Your app is blocked trying to write to
the buffer. There are tutorials / examples all over the web on how to properly
exec a process from Java.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org