Opened 16 years ago

Closed 16 years ago

#971 closed enhancement (invalid)

Be able to upgrade BASE without restarting Tomcat

Reported by: base Owned by: everyone
Priority: minor Milestone:
Component: install Version:
Keywords: Cc:

Description

I just upgraded our dev server (system info below)

Version  	BASE 2.6.2pre (build #4204; schema #52)
Web server 	Apache Tomcat/5.5.20
Database Server 	MySQL 5.0.21-max-log
Database Dialect 	org.hibernate.dialect.MySQLInnoDBDialect
JDBC Driver 	com.mysql.jdbc.Driver (version 5.0)
Java runtime 	Java(TM) SE Runtime Environment (1.6.0-b105), Sun Microsystems Inc.
Operating system 	Linux amd64 2.6.16.54-0.2.5-smp
Memory 	Total: 304.4 MB
Free: 185.4 MB
Max: 910.3 MB

and found that yet again I need to restart tomcat to get the new version working. I know the installation/upgrade instructions say that I should restart, but it would be really nice not to have to.

Here's the workflow I would like to use

  1. unpack bin package to /usr/local/base-2.y (ours is patched and already configured)
  1. stop currently running base2 in tomcat manager
  1. clear the tomcat temporary data/cache rm -rf /usr/local/tomcat/work/Catalina/localhost/base2/*
  1. run updatedb.sh and updateindexes.sh
  1. update soft link
    cd /usr/local
    rm base2  (which used to point to base-2.x)
    ln -s base-2.y base2
    

meanwhile, in /usr/local/tomcat/webapps the link from base2 to /usr/local/base2/www does not change.

  1. start base2 from the tomcat manager

I find that after this tomcat hangs completely (all webapps) and needs a kill -9 to stop it.

Perhaps one has to delete the /usr/local/tomcat/webapps/base2 symlink, let tomcat acknowledge this, then create a new link (directly /usr/local/base-2.y/www). I haven't tried this but will do next time.

Any thoughts?

Change History (2)

comment:1 by base, 16 years ago

I just stopped base2 in tomcat manager, deleted the /usr/local/tomcat/webapps/base2 link and then made a new one directly to /usr/local/base-2.y/www. Tomcat recognises this and loads it. I did not clean out any work directories.

On accessing the base2 homepage I get this error:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.servlet.jsp.JspTagException: PermGen space
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:839)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
	org.apache.jsp.main_jsp._jspService(main_jsp.java:429)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:72)

root cause

javax.servlet.ServletException: PermGen space
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
	org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:602)
	net.sf.basedb.clients.web.taglib.Body.doStartTag(Body.java:280)
	org.apache.jsp.main_jsp._jspService(main_jsp.java:191)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:72)

root cause

java.lang.OutOfMemoryError: PermGen space
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	java.net.URLClassLoader.access$000(URLClassLoader.java:56)
	java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	java.security.AccessController.doPrivileged(Native Method)
	java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
	org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
	org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:602)
	net.sf.basedb.clients.web.taglib.Body.doStartTag(Body.java:280)
	org.apache.jsp.main_jsp._jspService(main_jsp.java:191)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

After a few page reloads, the whole server is frozen (other webapps too).

comment:2 by Nicklas Nordborg, 16 years ago

Resolution: invalid
Status: newclosed

This is problem with Tomcat.

Note: See TracTickets for help on using tickets.