----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Just a follow up to this - based on suggestions, this immediate problem was
solved by setting this directive in jserv.conf:

ApJServVMTimeout 120

which allows MyLongRunningClass to properly execute and load the application
initialization stuff.

This raises one additional problem and one additional question:

1. problem:  jserv itself cannot execute any other servlets while
MyLongRunningClass is being executed - is this by design?  is there any
work-around to this?  it wouldn't be acceptable to have a 2+ minute delay on
ALL servlets each time jserv is re-started.

2. question: the fact that this works differently on NT than it does on
HP-UX - is that a bug, or just an un-documented feature?

Thanks again,
Kevin


> ----------
> From:         Austin, Kevin[SMTP:[EMAIL PROTECTED]]
> Reply To:     Java Apache Users
> Sent:         Saturday, November 18, 2000 2:24 PM
> To:   '[EMAIL PROTECTED]'
> Subject:      Apache JServ: servlets.startup - differences between NT and
> HP-UX
> 
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
> 
> My configuation is:
> Apache/1.3.12 and ApacheJServ/1.1 on a HP-UX box, and also a WinNT4.0 box.
> 
> I'd like code to be executed on server startup.  This code connects to a
> database, and loads some application initialization stuff.  It takes about
> 90 seconds to two minutes to run.
> 
> In my zone.properties file, I've added:
> 
> servlets.startup=MyLongRunningClass
> 
> in MyLongRunningClass.java, there is an init method as follows:
> 
>   public void init(ServletConfig config) throws ServletException {
>     super.init(config);
> 
>     myLongRunningMethod();
>   }
> 
> on the NT4 box, this method is executed fine, and the initialization stuff
> works just fine.  On the HP-UX box, I'm not having any luck.  The
> jserv.log
> file reports that the class is in fact being init-ed:
> 
> <servletLog> MyLongRunningClass: init
> 
> In my mod_jserv.log file, the following is being reported:
> 
> (INFO) wrapper: Java VM spawned (PID=27055, PPID=26758)
> (INFO) wrapper: Java VM not responding (PID=26758) [timeout]
> (EMERGENCY) ajp12: ping: no reply (-1) Please make sure that the
> wrapper.classpath is pointing to the correct version of ApacheJServ.jar
> (INFO) wrapper: Java VM restarting (PID=26758)
> (INFO) wrapper: Java VM died 10 times in a row with less than 120 seconds
> between successive failures, setting delay to 300 seconds before
> restarting.
> Check the Apache error log and the Apache JServ log files for more
> details;
> for maximum log information be sure to enable the Apache  JServ log file
> in
> the main jserv properties file by: setting the  'log' property to true,
> the
> 'log.file' property to a file writable  by the uid as whom Apache JServ is
> run, and by enabling log channels  using the 'log.channel.*' properties)
> 
> this cycle continues for at least a half-hour, with each time the delay
> between sucessive failures increasing.
> 
> If I comment out the servlets.startup directive from my zone.properties
> file, Jserv runs just fine on the HP-UX box.
> 
> Any suggestions for how to make MyLongRunningClass work on the HP-UX box?
> 
> Thanks in advance,
> Kevin
> 
> 
> 
> 
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search Archives: 
> <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
> 
> 


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to