The DataContext grows with every action, so you should acvoid using a DataContext too long.
I had an OutOfMemory processing a lot of data in a batch. I thought it would be a good idea to have only 2 context ... the first for reading ... the second for writing. I changed writing to take a new context after 100 commits and the outOfMemory was never seen again.
I don't know, if your problem may be caused that way, but perhaps you can optimize something.
cayenne-use..bjectstyle.org schrieb am 24.10.05 11:50:17:
>
>
> Hi there,
>
> I'm using cayenne (don't know which version) with Java 5 and Tomcat 5.5 in a servlet environment to access a MS SQL 2000 database over a LAN network. The servlets takes a xml files as input and calls a SQL procedure which takes the file as argument, parse the file and write the content into the database. The procedure uses a cursor so I think, the execution time of that procedure is not the best.
>
> Some times, mostly at weekend, the servlet is very heavenly called. A lot of files are posted and also a lot database queries are made. After a while I get an OutOfMemory exception in Java and I have to restart Tomcat. Of course I'm not sure, if is it a cayenne probleme. But maybe someone else had have this problem or know of it.
>
> Here's an except of the tomcat log:
>
> 2005-10-23 04:42:54,109 [DEBUG] org.objectstyle.cayenne.event.EventManager.Event dispatch error, ignoring.
> java.lang.OutOfMemoryError: Java heap space
>
> 2005-10-23 04:51:59,343 [ERROR] struts.actions.portal.OutputGenAction.callFormEventMethod: Error calling: efbChartGenEvent>
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> Caused by: java.lang.OutOfMemoryError: Java heap space
>
>
> I see also a lot of database exceptions:
>
> 2005-10-23 01:50:26,390 [ERROR] org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/DataLoggerGate].Servlet.service() for servlet DataLoggerGate threw exception
> base.exception.SystemErrorException: :
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
>
> 2005-10-23 01:50:27,921 [INFO ] org.objectstyle.cayenne.access.QueryLogger.*** error.
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>
> 2005-10-23 01:50:27,921 [ERROR] DataLoggerGate.doPost: >
> base.exception.SystemErrorException: :
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
>
> Thanks for any suggestion
> Lothar
>
> __________________________________________________________________________
> Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!
> Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131
>
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
This archive was generated by hypermail 2.0.0 : Wed Oct 26 2005 - 07:07:59 EDT