DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15667>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15667 Memory management Summary: Memory management Product: Tomcat 4 Version: 4.0.4 Final Platform: PC OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, Product: Java Web Application Operating system: Windows NT/2000 server, Linux, FreeBSD Web Server: IIS, Apache etc Application server: Tomcat 3.2.4+ Database server: MySQL 3.23.49, MS-SQL, Oracle etc Java Architecture: JSP (presentation) + Java Bean (Business logic) We have been facing the following problem for quite some time now. As more and more people are visiting and browsing the site, the Java.exe/Tomcat.exe size keeps growing and finally we end up with "Out of memory" error. Even if we leave the server inactive for hours, the memory doesn't get released and the only option is to restart the Tomcat server. We have posted this problem in many forums and in the Tomcat bug database also (both 3.* and 4). But we didn't get any solutions and also we were told that the problem could lie with our application. Since our application has to run on any application server, we have our own implementation of Database connection pooling. The following part of the code we used to close the idle connections. private synchronized void removeConnection(Connection f_obj_conn)throws Exception { f_obj_conn.close(); f_obj_conn = null; } But, we found that only the database connections got closed which we verfied with both MS-SQL and MYSQL. However, the memory allocated to the connection objects never got released, neither the heap memory allocated nor the process memory (Tomcat.exe). Now, after removing all the idle connections, we have tried "System.gc();" and found that both the heap and the process memory are being released promptly. Is it the right way to do? Should the same not happen automatically? Will it have any effect on the performance? thanks in advance, Srikanth. S. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>