You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Arnaud Marchand (JIRA)" <ji...@apache.org> on 2016/06/17 07:08:05 UTC

[jira] [Comment Edited] (AMQ-6266) REST API and CURL leaking connections

    [ https://issues.apache.org/jira/browse/AMQ-6266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15335568#comment-15335568 ] 

Arnaud Marchand edited comment on AMQ-6266 at 6/17/16 7:07 AM:
---------------------------------------------------------------

That's easy to reproduce on an UNIX box with something like that:

for i in `seq 1 1000`;  do curl -u admin:admin -d "body=message" http://127.0.0.1:8161/api/message/TEST.FOO?type=queue; done

===> Result:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /api/message/TEST.FOO. Reason:
<pre>    Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Thread.java:713)
	at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)
	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1371)
	at org.apache.activemq.thread.PooledTaskRunner.wakeup(PooledTaskRunner.java:83)
	at org.apache.activemq.transport.vm.VMTransport.wakeup(VMTransport.java:246)


On my side, it crashes after 3000 CURLs.

http://www.pi2s.be/JIRA/Screen%20Shot%20AMQJIRA1.jpg


was (Author: snuids):
That's easy to reproduce with something like that:

for i in `seq 1 1000`;  do curl -u admin:admin -d "body=message" http://127.0.0.1:8161/api/message/TEST.FOO?type=queue; done

===> Result:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /api/message/TEST.FOO. Reason:
<pre>    Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Thread.java:713)
	at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)
	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1371)
	at org.apache.activemq.thread.PooledTaskRunner.wakeup(PooledTaskRunner.java:83)
	at org.apache.activemq.transport.vm.VMTransport.wakeup(VMTransport.java:246)


On my side, it crashes after 3000 CURLs.

http://www.pi2s.be/JIRA/Screen%20Shot%20AMQJIRA1.jpg

> REST API and CURL leaking connections
> -------------------------------------
>
>                 Key: AMQ-6266
>                 URL: https://issues.apache.org/jira/browse/AMQ-6266
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.13.2
>         Environment: Broker 5.13.2 running on MAC or PC
> curl client on MAC and LINUX
>            Reporter: Arnaud Marchand
>            Priority: Minor
>
> Sending messages via the REST API via a curl leaks ActiveMQ connections.
> Any curl such as the one in the ActiveMQ web site creates the problem:
> curl -u system:manager -d "body=message" http://localhost:8161/demo/message/TEST?type=queue
> The number of connections can be checked via the Jolokia or the JConsole interface.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)