Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tomcat Problem

0 views
Skip to first unread message

vitya

unread,
May 17, 2001, 6:43:44 AM5/17/01
to
Hello!

I'm using Tomcat to run my servlets.

In my servlet , I create class - Listenner ( Thread subclass ) -
that open ServerSocket and listens to requests in the :
while( true )
{
connection = listenSocket.accept();
// When accepts the applet request opens another thread
to talk with it.
AppletsHandlerServer handleServer = new
AppletsHandlerServer( connection ,dbClient );
handleServer.start();
}

loop , then it create another class - Handler ( Thread
subclass ) that will talk with the clients.
The Listenner class also open JDBC connection to the Oracle and
then gives it to the Handler

My problem is that after some time that my servlet is running ,
and it can be 20 minutes up to 20 hours , my servlet got
folowwing exception:
java.lang.OutOfMemoryError
at java.lang.Thread.start(Native Method)
at
org.apache.tomcat.service.SimpleTcpEndpoint.processSocket
(SimpleTcpEn
dpoint.java:239)
at
org.apache.tomcat.service.SimpleTcpEndpoint.acceptConnections
(SimpleT
cpEndpoint.java:250)
at org.apache.tomcat.service.TcpListenerThread.run
(SimpleTcpEndpoint.jav
a:319)
at java.lang.Thread.run(Unknown Source)
Endpoint ServerSocket
[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] shutdown due t
o exception: java.lang.OutOfMemoryError

and then it crashs absolutely , so even all my computer
freezes , it also prints following message:
#
# An EXCEPTION_STACK_OVERFLOW exception has been detected in
native code outside
the VM.
# Program counter=0x5025c2c7
#

I need urgent help.
Do you think it is my bug or may be something else.
Thanks.Victor.

-KGB-

unread,
May 17, 2001, 7:08:21 AM5/17/01
to
Heya,
Sorry but i was getting help on another issue and there seems to be a large
number of queries regarding "Tomcat". Can someone please tell me basically
what it actually is?? I am a newbie i know...hehe...i am just curious...


Jon Skeet

unread,
May 17, 2001, 7:22:11 AM5/17/01
to

Tomcat is a servlet engine - see http://jakarta.apache.org/tomcat for
more details.

--
Jon Skeet - sk...@pobox.com
http://www.pobox.com/~skeet
If replying to the group, please don't mail me at the same time

Joergen Ramskov

unread,
May 17, 2001, 7:27:35 AM5/17/01
to

Chris

unread,
May 17, 2001, 8:43:44 AM5/17/01
to
Victor,

I don't understand why you are opening up a Socket to listen for request
within as servlet.

Surely a servlet would just be as adept to handle this?

Also I don't know how this would respond when Tomcat tries to shutdown the
servlet. Your Listenner class appears to have no way of shutting down - it
has no way of getting out of the while loop.

"vitya" <vityaN...@sun.partner.remarq.com.invalid> wrote in message
news:00000110...@usw-ex0108-192.remarq.com...

0 new messages