Here is the test block, keep in mind I removed the account information. You can get this by going to FedEx and signing up as a developer. And yes, all my testing was done on the same machine. I copied in the lib folder from the openbd.war file that Tomcat extracted and rebooted the server. Ran the code chunk. If it hung I had to reboot regardless to recover the system. Now that the Heap size is 512mbs it doesn't hang, or error out. I am looking for the log file now that I have a name. I did find something but it was of 0 use.

<cfsavecontent variable="soapBody">
        <cfoutput>
        <SOAP-ENV:Envelope
                xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
                xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
                xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                xmlns="http://fedex.com/ws/rate/v13";>
        
                <SOAP-ENV:Body>
                        <RateRequest>
                                <WebAuthenticationDetail>
                                        <UserCredential>
                                                <Key>Need your own fedex 
Key</Key>
                                                <Password>Need Your own 
Password</Password>
                                        </UserCredential>
                                </WebAuthenticationDetail>
                                
                                <ClientDetail>
                                        <AccountNumber>Get it from fed 
ex</AccountNumber>
                                        <MeterNumber>get it from fed 
ex</MeterNumber>
                                </ClientDetail>
                        
                                <Version>
                                        <ServiceId>crs</ServiceId>
                                        <Major>13</Major>
                                        <Intermediate>0</Intermediate>
                                        <Minor>0</Minor>
                                </Version>
                                
        
                                
<ReturnTransitAndCommit>true</ReturnTransitAndCommit>
                                
                                <RequestedShipment>
                                        
                                        
<ShipTimestamp>#DateFormat(Now(),'yyyy-mm-dd')#T#TimeFormat(Now(),'hh:mm:ss')#</ShipTimestamp>
                                        
<DropoffType>REGULAR_PICKUP</DropoffType>
                                        
<PackagingType>YOUR_PACKAGING</PackagingType>
                                        <!--- 
<TotalInsuredValue>0</TotalInsuredValue>--->
                                
                                
                                        <Shipper>
                                                <Contact>
                                                        <PersonName>Mr. 
Smitch</PersonName>
                                                        
<CompanyName>KOS</CompanyName>
                                                        
<PhoneNumber>30255555555</PhoneNumber>
                                                </Contact>
                                                
                                                <Address>
                                                        <StreetLines>A 
Street</StreetLines>
                                                        <City>In A City</City>
                                                        
<StateOrProvinceCode>AK</StateOrProvinceCode>
                                                        
<PostalCode>55555</PostalCode>
                                                        
<CountryCode>US</CountryCode>
                                                </Address>
                                        </Shipper>
                                
                                
                                        <Recipient>
                                                <Contact>
                                                        <PersonName>Mr. 
Candy</PersonName>
                                                        <CompanyName>Not 
KOS</CompanyName>
                                                        
<PhoneNumber>5555551212</PhoneNumber>
                                                </Contact>
                                                
                                                <Address>
                                                        <StreetLines>Another 
Street</StreetLines>
                                                        <StreetLines>apt 
d8</StreetLines>
                                                        <City>Another 
City</City>
                                                        
<StateOrProvinceCode>AK</StateOrProvinceCode>
                                                        
<PostalCode>12345</PostalCode>
                                                        
<CountryCode>US</CountryCode>
                                                </Address>
                                        </Recipient>
                                        
                                        <PackageCount>2</PackageCount>
                                        <RequestedPackageLineItems>
                                                
<SequenceNumber>1</SequenceNumber>
                                                
<GroupPackageCount>1</GroupPackageCount>
                                                <Weight>
                                                        <Units>LB</Units>
                                                        <Value>5.0</Value>
                                                </Weight>
                                                <Dimensions>
                                                        <Length>12</Length>
                                                        <Width>8</Width>
                                                        <Height>5</Height>
                                                        <Units>IN</Units>
                                                </Dimensions>
                                        </RequestedPackageLineItems>
                                        <RequestedPackageLineItems>
                                                
<SequenceNumber>1</SequenceNumber>
                                                
<GroupPackageCount>1</GroupPackageCount>
                                                <Weight>
                                                        <Units>LB</Units>
                                                        <Value>7.0</Value>
                                                </Weight>
                                                <Dimensions>
                                                        <Length>15</Length>
                                                        <Width>9</Width>
                                                        <Height>12</Height>
                                                        <Units>IN</Units>
                                                </Dimensions>
                                        </RequestedPackageLineItems>
                                </RequestedShipment>
                                <!------>
                        </RateRequest>
                </SOAP-ENV:Body>
        </SOAP-ENV:Envelope>
        </cfoutput>
</cfsavecontent>

<cfhttp
                url="https://wsbeta.fedex.com:443/web-services";
                method="post"
                result="httpResponse">

                <!---
                Most SOAP action require some sort of SOAP Action header
                to be used.
                --->
                
                <cfhttpparam type="header" name="SOAPAction" value="""....""" />
                
                <cfhttpparam
                        type="header"
                        name="SOAPAction"
                        
value="http://api.createsend.com/api/Subscriber.AddAndResubscribe";
                />
        
                <!---
                I typically use this header because CHTTP cannot handle
                GZIP encoding. This "no-compression" directive tells the
                server not to pass back GZIPed content.
                --->
                
                <cfhttpparam
                        type="header"
                        name="accept-encoding"
                        value="no-compression"
                />

                <!---
                When posting the SOAP body, I use the CFHTTPParam type of
                XML. This does two things: it posts the XML as a the BODY
                and sets the mime-type to be XML.
                
                NOTE: Be sure to Trim() your XML since XML data cannot be
                parsed with leading whitespace.
                --->
                <cfhttpparam
                        type="xml"
                        value="#trim( soapBody )#"
                />
</cfhttp>

<cfset xmlfile = XmlParse(httpResponse.FileContent)>



On 1/6/2013 3:10 AM, Alan Holden wrote:

Well, I would expect memory usage to rise commensurate with the volume of bytes returned by your cfhttp call, or what you do with the resulting content.

But the example is only 537 bytes. Unless your code has created some looping or racing condition, the behavior does seem abnormal. Especially if the *exact same* code worked without issue on an earlier version of OpenBD on the *exact same* J2EE platform on the *same* computer.

Tomcat's file layout can change by system. That's what makes open software so much fun. For example, Ubuntu version X can set it all up differently from Red Hat version Y (or even an older Ubuntu for that matter). Luckily, one of the Tomcat log names has not changed for a long while: catalina.out

grep (search) your system for that file, and you should find the location of your Tomcat logs from there.

For me, it's under /var/log/tomcat6

---
Al Holden

On 2013-01-05 23:17, Ernest McCloskey wrote:

Well, that is just the base code, there is more to it which I posted in the bug section on the site.

And yes, that to was failing in versions beyond the March 30 build. Not sure where to check Tomcats Logs to see what is going on. So if you could point me where I will look. And in the mean time, I will look around and see what I find.



On 1/6/2013 2:15 AM, Alan Holden wrote:

You're still testing with that same URL (https://wsbeta.fedex.com/web-services)?

FWIW - Looks like that only returns 537 bytes (and a 500 code). Weird.

Anything in Tomcat's own server logs?

---
Al Holden
On 2013-01-05 01:45, MiniFireDragon wrote:

    Just wanted to post an update.

    I spent some time fiddling with Tomcats memory settings. I do
    not know what has changed in OpenBD that an cfhttp request was
    generating Perm Gen errors in Tomcat. I increased the HeapSize
    to 512mbs and that fixed the issue. As I ran the cfhttp tag I
    pushed refresh over and over inside of Tomcat's Server Status
    page and watched the memory climb.

    So my next question is, why is cfhttp eating away 510mbs of
    system memory?


    On Saturday, December 22, 2012 1:07:44 AM UTC-5, MiniFireDragon
    wrote:

        Sorry if this is a double post. Created a topic from an
        email and it went into another thread:

        I have done some futher research since this post.  I went
        back to a nightly build March 30 and it works.  The next
        nightly build I have was Oct 17 and that didn't work.  And I
        tried the most recent build and that too didn't work.
                

        cfhttp causing out of memory errors
        perhaps it's just me, or is/was there a bug where cfhttp
        doesn't work?  I had a section of code that was working and
        I think I updated sometime ago in one of the nightly builds
        to the newer one to fix a problem.  I don't remember if i
        tested it after the updating.  Here is the stick of code:

                url="https://wsbeta.fedex.com:443/web-services";
                method="post"
                result="httpResponse">



        I have cfhttpparam set too, but the above code, by itself
        does not allow the page to load.  And occasionally I will
        get out of memory (I think on the Perm side).

        here it is on a page:

        http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>



        Untitled Document



                url="https://wsbeta.fedex.com:443/web-services";
                method="post"
                result="httpResponse">




        I would have thought it would atleast through an error.

-- online documentation: http://openbd.org/manual/
    http://groups.google.com/group/openbd?hl=en

--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

Reply via email to