Re: init called multiple times
Mark Galbreath <[email protected]> Tue, 24 Aug 2004 11:25:41 -0400
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <[email protected]> |
You should not be using JRun 3.1 - it has a notorious memory leak. upgrade to 4.0 Mark Mary Collamore wrote: >We are using JRun 3.1 on Windows 2000, and have a servlet that runs a web >questionnaire. It instantiates a class (once) for the session, which looks >up datasource for pooled connection to db. When the user presses "next" >after each question, the servlet is called again as the action for >the "next" (submit) button. In effect, posting to itself. For each >question, the servlet tells the datasource to grab a conn, record answer, >get next question from database, and then closes it (returns to pool). > >The servlet class implements SingleThreadModel, so I understand that JRun >may make more than one copy when service is needed by more than one user. >But the most users I have ever noted at one time is 3, and I often see in >event log that "init" is called multiple times in a row, sometimes as many >as 10 - 18, within seconds of each other. Each time init is called, there >is also request for new connection from the pool. This seems to loosely >correalate with other errors, such as multiple blocks of "Connection reset >by peer: >JVM_recv in socket input stream read [java.net.SocketException: >Connection reset by peer: JVM_recv in socket input stream read]..." > >I do not understand why "init" is being called so many times, and if this >is leading to the multiple "connection reset by peer statements", socket >closed, and other strange errors I see in event log. They do all seem to >happen around the same time. It is not consistent, as at other times I see >init being called maybe 1-3 times as users log on, with no problems. Could >a firewall at a user's site issue be causing any of this? > >I would appreciate any thoughts about what might be causing init to be >called so many times in a row. > >Thanks in advance, Mary > >___________________________________________________________________________ >To unsubscribe, send email to [email protected] and include in the body >of the message "signoff SERVLET-INTEREST". > >Archives: http://archives.java.sun.com/archives/servlet-interest.html >Resources: http://java.sun.com/products/servlet/external-resources.html >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > > > ___________________________________________________________________________ To unsubscribe, send email to [email protected] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html