Jim,
You forget releasing the resource! Try add clientResource.release(), like
this:
Response response = clientResource.getResponse();
*clientResource.release();*
Status status = response.getStatus();
return "status: " + status + " message: " +
newString(responseBuf, 0, length);
It works here.
Best regards,
On Wed, Nov 23, 2011 at 5:42 PM, Jim Irrer <[email protected]> wrote:
> I am using Restlet to implement a web service. The client (also uses
> Restlet) makes many consecutive calls to the server, but after a small
> number of calls complete successfully, further calls hang the server, which
> shows the message:
>
> INFO: Stop accepting new connections and transactions. Consider
> increasing the maximum number of threads.
>
> After looking at previous postings I tried:
>
> getContext().getParameters().add("maxThreads", "200");
>
> but that (as show in the attached code) does not help. In any case, it
> seems like the client should be able to make an unlimited number of calls,
> and increasing maxThreads just ups the limit and postpones eventual
> failure. It looks like I am not freeing up some resource or disconnecting
> a socket after each client call, but I do not know how to do so. The
> attached (small as I could make it) stand alone program demonstrates the
> problem. It starts a simple server and then a client calls it a bunch of
> times.
>
> Thanks for any input - Jim
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2885182
--
Danilo Rosetto Muñoz
[email protected]
http://br.linkedin.com/in/danilomunoz
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2885803