Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 78CD81843D for ; Sat, 9 Apr 2016 16:46:01 +0000 (UTC) Received: (qmail 38911 invoked by uid 500); 9 Apr 2016 16:46:00 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 38862 invoked by uid 500); 9 Apr 2016 16:46:00 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 38849 invoked by uid 99); 9 Apr 2016 16:46:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Apr 2016 16:46:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 129CBC1F4B for ; Sat, 9 Apr 2016 16:46:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.021 X-Spam-Level: X-Spam-Status: No, score=-0.021 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id sXo071C6J9FR for ; Sat, 9 Apr 2016 16:45:59 +0000 (UTC) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 708655F54F for ; Sat, 9 Apr 2016 16:45:58 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id n3so55715925wmn.0 for ; Sat, 09 Apr 2016 09:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:mime-version:subject:message-id:date :references:in-reply-to:to; bh=TKPG477EYGLlRCMDlaEMdVm4a/8GaMdWOJae0lkuSBA=; b=f/JH7mlC+rKpHGQCK2yBK0bTheC/C1B5AJYL/yME+tlMPyn2DjDBBMvC77L6oO484a 47A7sjb7zbtz24ZVkxJwgyHgwno7rSCk/un4NGu0y8i3PokFaHLFt83oxp8kuFowkqsP ydVg+2xhA/hbnfenTMZhDq/VlRIL/XsDMpPBiohyZCIkWnC5pL+VVzr4RL2tNIysgsz/ KjkFBu+goL3Zavy7f9W2HHfdkgCi+iIyfbrxqFVDZIg0RNkV8qZjPEZVNmMu1R1OXsHN 6Bif62nbqXRveci/v49fwUPDrC/cRu7KtgVvn8a/fQjQZPBYLxJLUA8eAlwA5S9+JnvW +fPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:references:in-reply-to:to; bh=TKPG477EYGLlRCMDlaEMdVm4a/8GaMdWOJae0lkuSBA=; b=VIpn7xDcCPFqcQ35PHA3DJi+vWKU4aVYn/tigaayQOYH9/7TJtXn/WeU8ABOTZj95Y ktNuykETK7mR4ePpLZ8KF8PhHRLc2mTJVrgP3bydM8k/1LblJjdOcwfAHFVN1587OUQX oFwqJVEZJWPxGeCAbgiu/pE3URXsdY4WzdniFhwEiVAUJgpgY4Z3ysaiDAhJF1o33TLk +SvC4o06q3m/v3K/VxKmG72tpCwZ69Ry9w2j1XKManhQEDAf6XlG+moEvEvi0+Ia2gWx j3jPis9/wkOFstEtvUXi/J/FsnL11/5EDZARLAqDo2UkkHsL1nBMeRNUdAsIOs7q3bFx Bmag== X-Gm-Message-State: AD7BkJJlJv07HzvNiw1FStfXbzPhLI8wQxXif84zGkh7EhjePnL47MdAJWJkPv+R+QCCSg== X-Received: by 10.28.225.198 with SMTP id y189mr10037961wmg.34.1460220358119; Sat, 09 Apr 2016 09:45:58 -0700 (PDT) Received: from [192.168.0.24] (97e38279.skybroadband.com. [151.227.130.121]) by smtp.gmail.com with ESMTPSA id r2sm5374495wjm.8.2016.04.09.09.45.56 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Apr 2016 09:45:56 -0700 (PDT) From: Ioannis Mavroukakis Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: Calling external rest service multiple times in a loop Message-Id: Date: Sat, 9 Apr 2016 17:45:56 +0100 References: In-Reply-To: To: users@camel.apache.org X-Mailer: iPhone Mail (13E238) Yes, but curl is hardly a yardstick to measure. For one, you're testing sequ= entially with curl, which means you close your connection before starting th= e next one. If we consider a server limit, bear in mind that http4 in Camel u= ses keep-alive. You can control that using the connectionTimeToLive paramete= r.=20 > On 9 Apr 2016, at 17:18, rajan agarwal wrote: >=20 > Hi Loannis, >=20 >> On Apr 9, 2016 20:18, "Ioannis Mavroukakis" wrot= e: >>=20 >> You're getting a 400 back, but you're not giving us a whole lot to go on > :-). > Its all I am getting :) >>=20 >> Is there a limit set server side perhaps? Can you consistently sustain 39= > iterations? > Yes It goes up to 41. I don't think there is a server side limit. I create= d > a shell script to test that. I fire up to 100 using curl in the shell > script and it works great without a sweat! >>=20 >>> On 9 Apr 2016, at 15:22, rajan agarwal wrote:= >>>=20 >>> Hi All, >>>=20 >>> I am facing a issue when i try to call a external webservice in a loop. > It >>> runs fine if the loop runs for upto 40 iterations but begins failing > after >>> that. I am unable to understand the cause as well. I think that it > might be >>> due to some sort of limit getting reached, i implemented a throttler as >>> well, but the result was same. >>>=20 >>> My loop is as below: >>>=20 >>> >>> ${body[EndIndex]} >>> ${null} >>> >>> >>> http://XX.XX.XX.XX:8080/rest/YY/${property.CamelLoopIndex} >>> >>> >>> GET >>> >>> >>>=20 >>> >>> >>> >>>=20 >>>=20 >>>=20 >>> Following is the stacktrace: >>>=20 >>> Stacktrace > --------------------------------------------------------------------------= ------------------------------------------------------------- >>> org.apache.camel.component.http4.HttpOperationFailedException: HTTP >>> operation failed invoking http4://XX.XX.XX.XX:8080/rest/YY/42 with >>> statusCode: 400 >>> at > org.apache.camel.component.http4.HttpProducer.populateHttpOperationFailedE= xception(HttpProducer.java:236)[426:org.apache.camel.camel-http4: >>> 2.15.1.redhat-620133] >>> at > org.apache.camel.component.http4.HttpProducer.process(HttpProducer.java:16= 3)[426:org.apache.camel.camel-http4:2.15.1.redhat-620133] >>> at > org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProces= sorBridge.process(AsyncProcessorConverterHelper.java:61)[198:org. >>> apache.camel.camel-core:2.15.1.redhat-620133] >>> at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:129)[1= 98:org.apache.camel.camel-core:2.15.1.redhat-620133] >>> at > org.apache.camel.management.InstrumentationProcessor.process(Instrumentati= onProcessor.java:77)[198:org.apache.camel.camel-core:2.15.1.redha >>> t-620133] >>> at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorH= andler.java:448)[198:org.apache.camel.camel-core:2.15.1.redhat-62 >>> 0133] >>> at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalPro= cessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-62 >>> 0133] >>> at > org.apache.camel.processor.DelayProcessorSupport.process(DelayProcessorSup= port.java:160)[198:org.apache.camel.camel-core:2.15.1.redhat-6201 >>> 33] >>> at > org.apache.camel.management.InstrumentationProcessor.process(Instrumentati= onProcessor.java:77)[198:org.apache.camel.camel-core:2.15.1.redha >>> t-620133] >>> at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorH= andler.java:448)[198:org.apache.camel.camel-core:2.15.1.redhat-62 >>> 0133] >>> at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalPro= cessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-62 >>> 0133] >>> at > org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[198:org.apa= che.camel.camel-core:2.15.1.redhat-620133] >>>=20 >>>=20 >>>=20 >>>=20 >>> Any suggestions?