Re: tomcat/linux question
This is not a solution to the problem. I have another question. On the tomcat, The sessions are stored in a hashtable. Does't that provide synchronization?? anil Gary Lawrence Murphy wrote: > This also sounds like perhaps a dead-lock where you have static data > that is being shared between two sessions. For example, if you have > an iterator over some list in one session while another session > modifies the list, the iterator will be in deep trouble. > > When the second user locks, does the first user still complete their > session? Another scenario is where you might lock an object or method > to give one session write permission, but the object is not unlocked; > the second (and subsequent) sessions are seized waiting for the lock > to clear. > > Be very careful when using "synchronized" methods, and work through > each to see if you can give your servlets a finer synchronization > through "synchronized" blocks of code within multithreaded methods. > There is a thread-safe wrapper for the container classes (see the API > docs) but be aware that this does not prevent trouble, it just ensures > your app will abort quickly when a problem arises. >
Re: tomcat/linux question
> "O" == Oki DZ <[EMAIL PROTECTED]> writes: O> Dante le Poole wrote: >> Also, as soon as more than one single user is using my webapp, >> the jvm hangs and no-one can access anymore servlets or >> jsp-pages! All I can do is kill the jvm and restart tomcat, but >> as soon as more than one user accesses it it dies again. O> Examine that your system has enough swap space. This also sounds like perhaps a dead-lock where you have static data that is being shared between two sessions. For example, if you have an iterator over some list in one session while another session modifies the list, the iterator will be in deep trouble. When the second user locks, does the first user still complete their session? Another scenario is where you might lock an object or method to give one session write permission, but the object is not unlocked; the second (and subsequent) sessions are seized waiting for the lock to clear. Be very careful when using "synchronized" methods, and work through each to see if you can give your servlets a finer synchronization through "synchronized" blocks of code within multithreaded methods. There is a thread-safe wrapper for the container classes (see the API docs) but be aware that this does not prevent trouble, it just ensures your app will abort quickly when a problem arises. -- Gary Lawrence Murphy <[EMAIL PROTECTED]> TeleDynamics Communications Inc Business Innovations Through Open Source Systems: http://www.teledyn.com "Computers are useless. They can only give you answers."(Pablo Picasso)
Re: tomcat/linux question
Dante le Poole wrote: > Also, as soon as more than one single user is using my webapp, the > jvm hangs and no-one can access anymore servlets or jsp-pages! All I > can do is kill the jvm and restart tomcat, but as soon as more than > one user accesses it it dies again. Examine that your system has enough swap space. Oki
Re: tomcat/linux question
Dante, >When tomcat starts, the jvm creates a child-process. the child process >then creates up to 19 child-processes itself. Each of these processes >is taking the same amount of memory, i.e. 14MB! This is ridiculous, my >app is a small one and there is no way it could demand that much memory. >With 20 processes demanding 14MB of memory its bringing my 256MB machine >down to its knees. Pretty much all of this 14MB is *shared*. This means alle these processes use the same, single 14MB. Type 'free' to see how much memory is really used or free. Bye, Edwin Martin.
tomcat/linux question
Hi, I have strange things happening when running tomcat 3.2.1 on linux on sun 1.2 jdk. When tomcat starts, the jvm creates a child-process. the child process then creates up to 19 child-processes itself. Each of these processes is taking the same amount of memory, i.e. 14MB! This is ridiculous, my app is a small one and there is no way it could demand that much memory. With 20 processes demanding 14MB of memory its bringing my 256MB machine down to its knees. Also, as soon as more than one single user is using my webapp, the jvm hangs and no-one can access anymore servlets or jsp-pages! All I can do is kill the jvm and restart tomcat, but as soon as more than one user accesses it it dies again. Can anyone shed some light on this? I don't know enough about java on linux to know where to look. Thanx, Dante