You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Marcin_K <mk...@gmail.com> on 2013/06/20 10:51:45 UTC
Re: Embedded ejbd server blocks access
Hello Romain,
after longer time of test, finally I have some results. Now, I'm sure that
the problem with client-server communication is not caused by network
problem. All the server services (like FTP) are available, while the access
to the ejbd is blocked. I used JMX (as You proposed) in order to get some
additional information from OpenEJB server when the access to the ejbd was
blocked. Aa You mentioned, it seems that the stateless/tasteful stuff is not
linked to this issue. I checked all the StatelessSessionBeans and the
associated Pools. In almost all cases the InstancesActive value is correct
and there is still a free room for new instances. There is one interesting
thing regarding the ejbd thread pool. It looks like this:
/QueueSize: 40
ActiveCount: 300
CorePoolSize: 300
PoolSize: 300
CompletedTaskCount: 5805
LargestPoolSize: 300
TaskCount: 6145/
The "ejbd.threads" is set to 300. It seems that after some time (depends on
client activity), the ejbd threads are not freed from the pool and the queue
is getting bigger. That is why, the clients are not able to get access to
the server. Additionally, I checked all the active threads. All the ejbd
threads (ejbd 0 .... ejbd 299) were in RUNNABLE state.
Do You have any idea, what may cause such situation and how to prevent it? I
already know, that after restarting the OpenEJB and the thread pool:
/serviceManager.stop();
ServicePool incoming = SystemInstance.get().getComponent(ServicePool.class);
ThreadPoolExecutor threadPool = incoming.getThreadPool();
threadPool.shutdown();
incoming.stop();
serviceManager.init();
serviceManager.start();/
the server becomes available again. But, as You mentioned, restarting the
ejbd service is not a good solution.
I will be grateful for all the clues. Thank You in advance!
--
View this message in context: http://openejb.979440.n4.nabble.com/Embedded-ejbd-server-blocks-access-tp4661586p4663883.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Embedded ejbd server blocks access
Posted by Marcin_K <mk...@gmail.com>.
Ok, I wonder why such idea did not come to my mind earlier :-)
Currently, the OpenEJB has been restarted, so I will have to wait for the
next time when the access to the server will be blocked. Then, I will
generate the full stack dump. Thank You for your help. I will come back here
when I will have more information about the stack.
--
View this message in context: http://openejb.979440.n4.nabble.com/Embedded-ejbd-server-blocks-access-tp4661586p4663887.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Embedded ejbd server blocks access
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Normally it is done when the invocation is over. Can tou share a stack dump
when it is blocked (using jstack or kill -3)?
Le 20 juin 2013 12:12, "Marcin_K" <mk...@gmail.com> a écrit :
> No, I do not have any monitoring. I know that time, when the server becomes
> not accessible depends on the client activity. When the activity was
> relatively high, the server became not accessible after one and half week.
> Now, when the client activity is not so high, server was working correctly
> more than 5 weeks.
>
> Is it possible, that ejbd threads are blocked by some error in my code and
> they are not released correctly? Is there any mechanism at the OpenEJB
> which
> monitors the ejbd thread pool state and releases the threads which are
> blocked (too long in RUNNABLE state)?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Embedded-ejbd-server-blocks-access-tp4661586p4663885.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: Embedded ejbd server blocks access
Posted by Marcin_K <mk...@gmail.com>.
No, I do not have any monitoring. I know that time, when the server becomes
not accessible depends on the client activity. When the activity was
relatively high, the server became not accessible after one and half week.
Now, when the client activity is not so high, server was working correctly
more than 5 weeks.
Is it possible, that ejbd threads are blocked by some error in my code and
they are not released correctly? Is there any mechanism at the OpenEJB which
monitors the ejbd thread pool state and releases the threads which are
blocked (too long in RUNNABLE state)?
--
View this message in context: http://openejb.979440.n4.nabble.com/Embedded-ejbd-server-blocks-access-tp4661586p4663885.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Embedded ejbd server blocks access
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm
Do you have some monitoring of your server activity (and this pool in
particular). Would be great to know when it starts to not release things
correctly
Le 20 juin 2013 10:53, "Marcin_K" <mk...@gmail.com> a écrit :
> Hello Romain,
>
> after longer time of test, finally I have some results. Now, I'm sure that
> the problem with client-server communication is not caused by network
> problem. All the server services (like FTP) are available, while the access
> to the ejbd is blocked. I used JMX (as You proposed) in order to get some
> additional information from OpenEJB server when the access to the ejbd was
> blocked. Aa You mentioned, it seems that the stateless/tasteful stuff is
> not
> linked to this issue. I checked all the StatelessSessionBeans and the
> associated Pools. In almost all cases the InstancesActive value is correct
> and there is still a free room for new instances. There is one interesting
> thing regarding the ejbd thread pool. It looks like this:
>
> /QueueSize: 40
> ActiveCount: 300
> CorePoolSize: 300
> PoolSize: 300
> CompletedTaskCount: 5805
> LargestPoolSize: 300
> TaskCount: 6145/
>
> The "ejbd.threads" is set to 300. It seems that after some time (depends on
> client activity), the ejbd threads are not freed from the pool and the
> queue
> is getting bigger. That is why, the clients are not able to get access to
> the server. Additionally, I checked all the active threads. All the ejbd
> threads (ejbd 0 .... ejbd 299) were in RUNNABLE state.
>
> Do You have any idea, what may cause such situation and how to prevent it?
> I
> already know, that after restarting the OpenEJB and the thread pool:
>
> /serviceManager.stop();
>
> ServicePool incoming =
> SystemInstance.get().getComponent(ServicePool.class);
> ThreadPoolExecutor threadPool = incoming.getThreadPool();
> threadPool.shutdown();
> incoming.stop();
>
> serviceManager.init();
> serviceManager.start();/
>
> the server becomes available again. But, as You mentioned, restarting the
> ejbd service is not a good solution.
>
> I will be grateful for all the clues. Thank You in advance!
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Embedded-ejbd-server-blocks-access-tp4661586p4663883.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>