You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Kalani Ruwanpathirana <ka...@gmail.com> on 2009/06/15 13:46:54 UTC

Error when running Abdera client concurrently

Hi,

I use Abdera client to make several requests to the back end and I am
running the program concurrently using 100 threads. Then I get the following
error after completing the execution of several threads.

java.net.SocketException: Too many open files
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
    at java.net.ServerSocket.implAccept(ServerSocket.java:450)
    at
com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:259)
    at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:111)
    at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:408)
    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:71)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:595)

I tried using a new AbderaClient instance per each request with teardown()
and sharing only one AbderaClient instance among all requests too. Still
getting the same error. Can someone give an idea on this please?

Thanks,
Kalani.

-- 
Kalani Ruwanpathirana
Department of Computer Science & Engineering
University of Moratuwa

Re: Error when running Abdera client concurrently

Posted by Kalani Ruwanpathirana <ka...@gmail.com>.
Hi Deepal,

Thanks for the reply. No I am running it on Linux. I doubt whether I am
using Abdera client in the correct way.  I have tried several routes but the
same error occurs.

Thanks,
Kalani.

On Tue, Jun 16, 2009 at 1:07 AM, Deepal Jayasinghe <de...@gmail.com>wrote:

> I believe you are running this on windows? can it start all threads or
> is it stop while it is starting few threads?
> In windows you have this problem, even if you close the socket, it
> takes few seconds to release the connection. One thing you could do is
> try with Linux and see what happen. This is not just Abdera specific
> issue, as I know most of the Java on Windows has this.
>
> Deepal
>
> On Mon, Jun 15, 2009 at 7:46 AM, Kalani Ruwanpathirana<ka...@gmail.com>
> wrote:
> > Hi,
> >
> > I use Abdera client to make several requests to the back end and I am
> > running the program concurrently using 100 threads. Then I get the
> following
> > error after completing the execution of several threads.
> >
> > java.net.SocketException: Too many open files
> >    at java.net.PlainSocketImpl.socketAccept(Native Method)
> >    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
> >    at java.net.ServerSocket.implAccept(ServerSocket.java:450)
> >    at
> >
> com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:259)
> >    at
> >
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:111)
> >    at
> >
> org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:408)
> >    at
> >
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:71)
> >    at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
> >    at java.lang.Thread.run(Thread.java:595)
> >
> > I tried using a new AbderaClient instance per each request with
> teardown()
> > and sharing only one AbderaClient instance among all requests too. Still
> > getting the same error. Can someone give an idea on this please?
> >
> > Thanks,
> > Kalani.
> >
> > --
> > Kalani Ruwanpathirana
> > Department of Computer Science & Engineering
> > University of Moratuwa
> >
>



-- 
Kalani Ruwanpathirana
Department of Computer Science & Engineering
University of Moratuwa

Re: Error when running Abdera client concurrently

Posted by Deepal Jayasinghe <de...@gmail.com>.
I believe you are running this on windows? can it start all threads or
is it stop while it is starting few threads?
In windows you have this problem, even if you close the socket, it
takes few seconds to release the connection. One thing you could do is
try with Linux and see what happen. This is not just Abdera specific
issue, as I know most of the Java on Windows has this.

Deepal

On Mon, Jun 15, 2009 at 7:46 AM, Kalani Ruwanpathirana<ka...@gmail.com> wrote:
> Hi,
>
> I use Abdera client to make several requests to the back end and I am
> running the program concurrently using 100 threads. Then I get the following
> error after completing the execution of several threads.
>
> java.net.SocketException: Too many open files
>    at java.net.PlainSocketImpl.socketAccept(Native Method)
>    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
>    at java.net.ServerSocket.implAccept(ServerSocket.java:450)
>    at
> com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:259)
>    at
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:111)
>    at
> org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:408)
>    at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:71)
>    at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
>    at java.lang.Thread.run(Thread.java:595)
>
> I tried using a new AbderaClient instance per each request with teardown()
> and sharing only one AbderaClient instance among all requests too. Still
> getting the same error. Can someone give an idea on this please?
>
> Thanks,
> Kalani.
>
> --
> Kalani Ruwanpathirana
> Department of Computer Science & Engineering
> University of Moratuwa
>