db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject Re: Torque generator leaves too many files open
Date Sat, 05 May 2007 10:58:27 GMT
Two short remarks:
a) I see you use velocity 1.4. The standard Torque generator 3.2 uses 
velocity 1.3. I do not know whether this makes a difference, though.
b) I believe this is a texen [1] problem. I cannot see how to tell texen 
to close the file after generating, all we use is the standard
$generator.parse(...) call in the templates.

Are you going to take this to velocity ? If yes, please share any results 
of the discussion with us.

    Thomas

[1] http://velocity.apache.org/texen/releases/texen-1.0/. Was bundled 
within velocity until velocity 1.4


On Mon, 23 Apr 2007, Helge Weissig wrote:

> Thanks Alvaro! The error happens at the OM class generation stage (project-om 
> in the old-style ant builds of a turbine/torque project). As you may know, 4 
> files are generated per table in the schema. Since we have currently 268 
> tables, we exceed the default limit of 1024 open descriptors on linux IF the 
> files are left open. As suggested by Chris (thanks Chris!!), one can increase 
> that limit, but that does not explain the issue because we see a difference 
> on two linux systems with the same JDK, ant version, and max. descriptors 
> limit.
>
> On Apr 21, 2007, at 6:43 AM, Alvaro Coronel wrote:
>
>> Hello Helge
>>
>>  I did not understand clearly at what stage of building you get the error.
>>
>>  So this may or may not be relevant, but I once got rid of a "too many 
>> files open" error by bundling my .class files into a .jar file and placing 
>> it in the classpath.
>>
>>  I was also getting the error only when using Linux.
>> 
>> 
>> Helge Weissig <helgew@grajagan.org> wrote:
>>  Remember this anyone? Well, the problem is back and I am not any
>> smarter about it than I was last year.
>> 
>> Basically, I "solved" the issue below only on one single machine by
>> using jdk-1.5.0_07 instead of the gnu jdk. That was good enough then,
>> however, now I need to be able to compile our application (> 250
>> tables) on another machine and I just cannot figure out how to get
>> rid of the "Too many open files" error. I have tried everything I can
>> think of (jdk versions, ant versions, command line options for
>> java.vm.info and java.class.path since I saw some differences there),
>> alas, to no avail! Everything compiles fine on Windows and OS X, just
>> not on linux. It's not the descriptor limit as that is the same on
>> all boxes (1024) except for OS X where it is 256 only.
>> 
>> Any help/pointers would be greatly appreciated. I would be happy to
>> share the ant debug output with anyone willing to help.
>> 
>> thanks,
>> h.
>> 
>> 
>> 
>> On Apr 24, 2006, at 10:52 AM, Helge Weissig wrote:
>> 
>>> When running the torque generator for a good-sized turbine project,
>>> we run into the system limit of 1024 open file descriptors with the
>>> stack trace as below, which occurs in the torque-data-model target.
>>> lsof indicates that the process is keeping all {Base}Foo{Peer} and
>>> associated map classes open. We are still using the ant build based
>>> on the turbine TDK, so the previously suggested solutions do not
>>> seem to be applicable for us. Library versions are torque-gen-3.2
>>> and velocity-1.4. Any advise would be greatly appreciated. We would
>>> prefer to solve this without changing the OS limits. OS is FC4,
>>> kernel 2.6.15-1.1831_FC4smp. Java is gij version 4.0.2.
>>> 
>>> thanks,
>>> h.
>>> 
>>> PS: Sorry for the cross-post (since it seems a Velocity problem, I
>>> may even have to take it there).
>>> 
>>> java.io.FileNotFoundException: /home/helgew/work/webapps/test/WEB-
>>> INF/src/java/org/grajagan/test/om/OneOfManyFoosPeer.java (Too many
>>> open files)
>>> at java.io.FileOutputStream.open(Native Method)
>>> at java.io.FileOutputStream.(FileOutputStream.java:179)
>>> at java.io.FileOutputStream.(FileOutputStream.java:70)
>>> at java.io.FileWriter.(FileWriter.java:46)
>>> at org.apache.velocity.texen.Generator.getWriter
>>> (Generator.java:279)
>>> at org.apache.velocity.texen.Generator.parse(Generator.java:
>>> 383)
>>> at org.apache.velocity.texen.Generator.parse(Generator.java:
>>> 336)
>>> at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown
>>> Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke
>>> (DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:585)
>>> at org.apache.velocity.util.introspection.UberspectImpl
>>> $VelMethodImpl.invoke(UberspectImpl.java:267)
>>> at org.apache.velocity.runtime.parser.node.ASTMethod.execute
>>> (ASTMethod.java:197)
>>> at
>>> org.apache.velocity.runtime.parser.node.ASTReference.execute
>>> (ASTReference.java:175)
>>> at
>>> org.apache.velocity.runtime.parser.node.ASTReference.render
>>> (ASTReference.java:220)
>>> at org.apache.velocity.runtime.parser.node.ASTBlock.render
>>> (ASTBlock.java:55)
>>> at
>>> org.apache.velocity.runtime.parser.node.ASTIfStatement.render
>>> (ASTIfStatement.java:70)
>>> at org.apache.velocity.runtime.parser.node.ASTBlock.render
>>> (ASTBlock.java:55)
>>> at
>>> org.apache.velocity.runtime.parser.node.ASTIfStatement.render
>>> (ASTIfStatement.java:70)
>>> at org.apache.velocity.runtime.parser.node.ASTBlock.render
>>> (ASTBlock.java:55)
>>> at org.apache.velocity.runtime.directive.Foreach.render
>>> (Foreach.java:166)
>>> at
>>> org.apache.velocity.runtime.parser.node.ASTDirective.render
>>> (ASTDirective.java:114)
>>> at org.apache.velocity.runtime.parser.node.ASTBlock.render
>>> (ASTBlock.java:55)
>>> at org.apache.velocity.runtime.directive.Foreach.render
>>> (Foreach.java:166)
>>> at
>>> org.apache.velocity.runtime.parser.node.ASTDirective.render
>>> (ASTDirective.java:114)
>>> at org.apache.velocity.runtime.parser.node.SimpleNode.render
>>> (SimpleNode.java:230)
>>> at org.apache.velocity.Template.merge(Template.java:256)
>>> at org.apache.velocity.texen.Generator.parse(Generator.java:
>>> 426)
>>> at org.apache.velocity.texen.ant.TexenTask.execute
>>> (TexenTask.java:519)
>>> at org.apache.tools.ant.UnknownElement.execute
>>> (UnknownElement.java:275)
>>> at org.apache.tools.ant.Task.perform(Task.java:364)
>>> at org.apache.tools.ant.Target.execute(Target.java:341)
>>> at org.apache.tools.ant.Target.performTasks(Target.java:369)
>>> at org.apache.tools.ant.Project.executeTarget(Project.java:
>>> 1214)
>>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
>>> at org.apache.tools.ant.taskdefs.CallTarget.execute
>>> (CallTarget.java:106)
>>> at org.apache.tools.ant.UnknownElement.execute
>>> (UnknownElement.java:275)
>>> at org.apache.tools.ant.Task.perform(Task.java:364)
>>> at org.apache.tools.ant.Target.execute(Target.java:341)
>>> at org.apache.tools.ant.Target.performTasks(Target.java:369)
>>> at org.apache.tools.ant.Project.executeTarget(Project.java:
>>> 1214)
>>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
>>> at org.apache.tools.ant.UnknownElement.execute
>>> (UnknownElement.java:275)
>>> at org.apache.tools.ant.Task.perform(Task.java:364)
>>> at org.apache.tools.ant.Target.execute(Target.java:341)
>>> at org.apache.tools.ant.Target.performTasks(Target.java:369)
>>> at org.apache.tools.ant.Project.executeTarget(Project.java:
>>> 1214)
>>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
>>> at org.apache.tools.ant.taskdefs.CallTarget.execute
>>> (CallTarget.java:106)
>>> at org.apache.tools.ant.UnknownElement.execute
>>> (UnknownElement.java:275)
>>> at org.apache.tools.ant.Task.perform(Task.java:364)
>>> at org.apache.tools.ant.Target.execute(Target.java:341)
>>> at org.apache.tools.ant.Target.performTasks(Target.java:369)
>>> at org.apache.tools.ant.Project.executeTarget(Project.java:
>>> 1214)
>>> at org.apache.tools.ant.Project.executeTargets(Project.java:
>>> 1062)
>>> at org.apache.tools.ant.Main.runBuild(Main.java:673)
>>> at org.apache.tools.ant.Main.startAnt(Main.java:188)
>>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: torque-user-help@db.apache.org
>> 
>> 
>> 
>> 
>> ---------------------------------
>> Ahhh...imagining that irresistible "new car" smell?
>> Check outnew cars at Yahoo! Autos.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message