Zend AMF Slow Response

I am getting slow response times when using Zend AMF in Flash Builder 4.  It is taking between 1.5s to 2s to return the results, which is much slower than when I am returning XML.  However its about the same no matter if no records are returned or if 1000 records are returned. It seems like it is taking a while to make the connection to the gateway.php file. Anyone else noticing issues like this?  All the examples I have seen online use Apache instead of IIS, could that be part of my problem?
Thanks,
Justin

I experienced the same with Zend and switched to coldfuion as a result. Its better matched
to Flex, and you can go as far as Life Cycle Data services with it if you want. It is also a superior
design to php but works pretty much the same way.
The communications with Flashbuilder have several gotchas which are not explained but are covered here now.
The old php 4 AmfPhp was really impressive performer on speed. But it just took a dive when it went
to zend and 5.
Dan Pride

Similar Messages

  • Zend AMF extremely slow first request

    Hi all,
    I'm having a weird problem with Zend AMF and was wondering if anyone else has seen this before.
    I've got a very simple PHP/MySQL backend that returns multidimensional arrays to Flex via Zend AMF.
    Now this all worked fine up to the point that I started testing my app with a remote server instead of my local test server.
    With the remote server I noticed that sometimes, but always the first time, some PHP function is called it takes forever to call the callback function with a result. I'm talking about around 1 to 2 minutes!
    Now, when I call that same php function via a normal url every time it returns the right results in a couple of milliseconds.
    When the function has been called once it seems to be ok and next time it's called it returns results within milliseconds.
    I've had a look with a network sniffer to see if the transfer of data takes long, but that's all fine...
    So it looks to me as if it just takes forever before the RemoteObject calls it's callback function.
    I'll be testing with some stripped down code later tonight and will also set it up on a different server, but I was hoping someone else has seen this and knows a workaround...
    Thanks
    Skip

    Hmm, i just did some more tests, but the results do update so it doesn't look like it's a cached result.
    I'm not entirely sure but it looks like when multiple AMF methods are called too close to each other they are combined into one HTTP POST request to the AMF gateway. When this happens the response is extremely slow, whereas when I have make the second call after the first one has finished completely the response is ok (around 200 milliseconds).
    You wouldn't happen to know how RemoteObject handles multiple calls to an AMF backend, right?

  • Zend AMF Data Service Return Problem

    Hi Folks,
    I am working with FB4 and Zend AMF/PHP and MySQL.  I began integrating the PHP stuff using the great article by Mihai Corlan called 'Working in Flash Builder 4 with Flex and PHP.  I followed all the steps exactly, aside from creating my own app-specific PHP classes and functions, etc...  I 'hooked up' the Zend stuff just like the article, created a text datagrid, just like the article, and viola!, it worked.  I then tweaked it a bit and interwove it into my 'real' component.  So far, so good.
    Then I created a second PHP class with a different 'get data' type of function.  It queries a different table in MySQL, but is essentially the 'same' as the query/function in the initial PHP class.
    In FB, in the Data Services window, I choose the 'Connect to Data/Services' function, just like the first time.  I then find/select my PHP class file and FB 'interrogates it' enough to show me the function that exists in the class.  I 'finish' the operation and it adds a new 'service' to the list of services in that window.  Again, so far, so good.
    The problem comes when I try to 'test' the service or 'configure return types' (which basically requires a 'test' operation anyway).  I can enter the 'input' params just fine, but when I try to execute the call, I get the following error:
    InvocationTargetException:There was an error while invoking the operation. Check your operation inputs or server code and try invoking the operation again.
    Reason: An error occured while reading response sent by server. Try encoding the response suitably before sending it. e.g. If a database column contains UTF-8 characters then use utf8_encode() to encode its value before returning it from the operation.
    I don't know where to go after this.  Again - the 2nd PHP class is essentially identical to the 1st.  The function in it is essentially identical, differing only by the input params, the name of the function and the actual SQL it sends to MySQL.  There is no special text, no special characters, no image stuff, nothing.  I do not 'encode' the results of the function in the first class - in fact the code in the second class is practically identical to the first.  I do not know what the error is talking about.  My guess is that it's more of a generic message.
    I can debug the PHP code just fine from within a seperate instance of Eclipse.  The function runs/returns just fine - an array of PHP-defined objects (simple strings).
    Any insights or advice would be welcomed.   Thank you,
    -David Baron

    Thank Jorge, but that was not the issue, though, it may be related.
    I checked the mySQL my.ini file, and there was already an entry for:
    [mysql]
    default-character-set=utf8
    I added the 'default-collation=utf8_unicode_ci', like you suggested, but that didn't do anything.
    I checked the Apache httpd.conf file, and added the following line 'under' the "DefaultType text/plain" line:
    AddDefaultCharset UTF-8    but that did not do anything.
    I checked my mySQL database, all the tables involved.  They were already at UTF-8 (default).  However, some of the 'varchar' columns were defined as 'latin 1-default collation'.   I changed them all to utf-8 (default table collation), but that did not help either.
    Finally, I found the problem, though I don't really know if it is "my" problem, or ZendAMF's problem, or Adobe's problem.
    It turned out that 'some' of my data had a 'bad' character in it.  Specifically, I had 'copied and pasted' some data from MS Word into mySQL Workbench.  Some of the data included the 'elipsis' character - you know, when you type "..." (dot dot dot) in MS Word, it replaces the three periods with a single elipsis character.  Although PHP could easily query and assemble this data into a nice object array, I noticed that that character showed up (in PHP's debugger) as a 'box' character, meaning "bad character".  Thus, I guess, Zend AMF and/or FlashBuilder could not 'bring over' and/or deal with this type of character.  As soon as I replace the few instances of that character with three periods, everything began to work perfectly.
    So... what to do about this?  I thought I was through with silly encoding/decoding of data when I left JavaScript and HTML behind in moving to FlashBuilder technology.  Am I really going to have to worry about this kind of thing?  Or might this be a bug/deficiency somewhere in the stack?
    Thanks for your help,
    -David

  • Zend AMF

    I've put my Zend folder into my web root.
    From Flex, I'm calling amf.php:
    <?
    include '_services/Test/Main.php';
    include 'Zend/Amf/Server.php';
    $server = new Zend_Amf_Server();
    $server->setProduction(false);
    $server->setClass('Test_Main', 'test');
    $response = $server->handle();
    echo $response;
    ?>
    My _services/Test/Main.php has a class called "Test_Main" and a public method "init()" which simply returns "this is a test".
    I've used the services-config.xml file provided by Zend and modified the URI only to point to my amf.php file.
    In Flex:
    <fx:Declarations>
        <s:RemoteObject id="myAmf"
            fault="faultHandler(event)"
            showBusyCursor="true"
            destination="zend" />
    </fx:Declarations>
    protected function creationCompleteHandler(event:FlexEvent):void
        var message:String    =    myAmf.Test_Main.init();
        Alert.show(message);
    When I run the application, the call is being made to the amf.php file according to Apache with a response code of 200. However in Flex it says:
    "ReferenceError: Error #1069: Property init not found on mx.rpc.remoting.mxml.Operation and there is no default value."
    Can anyone tell me why this is happening? There is a similar post on the Zend forums posted in Feb 2009 but it's had loads of views and no replies!
    Thanks in advance.

    Richard Bates of flexandair.com figured it out. In my php.ini file, I had the memory limit set at 8M. After, changing it to 32M, it worked. Thank you, Richard!
    -Laxmidi

  • Zend AMF and Flex 4

    Hello,
    I am currently working on a windowed app that uses the Zend AMF to connect to the database. I have been trying move the framework from my local testing server to my web server.
    First I ftped the framework files, my gateway.php, and amf_config.ini to the server. Inside the amf_config, changed the webroot to be the location of the ZendFramework and I also pointed the _super_class generated by the dataservice to my webserver. My php.ini is also configured to include that path to the ZendFramework.
    Did I miss a step at some point / was there something I was supposed to do when I created the data service? Is it even possible for an desktop AIR app to work with the ZendFramework when it is on a web server?
    My host is Bluehost

    Hello there.
    Here's the ServiceLocator and delegates I am using....
    // LoginDelegate.as
    package com.myproj.products.business {
         import com.myproj.products.vo.LoginVO;
         import mx.rpc.IResponder;
         import com.adobe.cairngorm.business.ServiceLocator;
         public class LoginDelegate {
              // anything that implements the IResponder interface can act as a responder
              private var responder:IResponder;
              private var service:Object;
              public function LoginDelegate(responder:IResponder) {
                   this.responder = responder;
                   this.service = ServiceLocator.getInstance().getRemoteObject("loginService");
              public function login(loginAttempt:LoginVO):void {
                   // Call the method of service that resides on server
                   var call:Object = service.login(loginAttempt);
                   // Send the response to responder
                   call.addResponder(responder);
    // com/myproj/products/business/Services.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <cairngorm:ServiceLocator
         xmlns:mx="http://www.adobe.com/2006/mxml"
            xmlns:cairngorm="com.adobe.cairngorm.business.*">
         <!-- Login Service -->
         <mx:RemoteObject
              id="loginService"
              destination="zend"
              source="LoginService"
              showBusyCursor="true">
              <mx:method name="doLogin" />
         </mx:RemoteObject>
    </cairngorm:ServiceLocator>
    With kind regards
    ShiVik

  • Parameter based on decode/function field - slow response

    Hi,
    When one of the parameters of a report is used, the report takes a very long time to run. The parameter has a LOV of statuses in Hebrew.
    The folder is a custom folder and the status in Hebrew is a decode field using a function. In other words, it first goes to a function to get the status, and then translates each status (I guess that the Hebrew will be strange but I hope that the general form of the decode is clear):
    DECODE( APPS.JAFI_DISCO_UTILS_PKG.JAFI_GET_INVOICE_STATUS(
    AI.INVOICE_ID,
    AI.INVOICE_AMOUNT,
    AI.PAYMENT_STATUS_FLAG,
    AI.INVOICE_TYPE_LOOKUP_CODE),
    'APPROVED','מאומת',
    'NEVER APPROVED','מעולם לא עבר אימות',
    'NEEDS REAPPROVAL','דורש אימות מחדש',
    'CANCELLED','מבוטל',
    'AVAILABLE','זמין',
    'UNAPPROVED','לא מאומת',
    'SELECTED FOR PAYMENT','נבחר לתשלום',
    'FULL','מיוחס במלואו',
    'UNPAID','לא שולם',' ')
    I am assuming that the reason for the slow response is the constant run of the function in addition to the decode (which I was once told also slows the response a bit).
    Is there anyway to change the sql somewhat? Without using the parameter the report takes about 2 1/2 minutes to run. Using the parameter it takes around 25 minutes to run.
    Thank you.
    Leah
    Edited by: user476771 on May 10, 2010 2:09 AM

    Hi Michael,
    I think your suggestion #3, checking the indexes, is an excellent start.
    As to the other suggestions, I believe that everything passed to the function is needed to find the status.
    We seem to have serious problems running materialized views. Our dba is actually checking it out now. One group of mv were changed a few months ago so that they are no longer needed (someone worked around it using other tables for the data). Another mv is problematic even though it takes 14 minutes to create in a tst environment (which I happen to do yesterday) and causes no problems afterwards, it is a problem when run in prod as part of a job. As I mentioned, our dba is checking it out.
    I hesitate to create a new table that is updated every night with the status of each invoice. It won't be up-to-date during the day, and it means changing the report that has otherwise run smoothly until now. The user avoids using the one parameter as much as possible so it's not THAT bad...
    I really appreciate your giving the four suggestions.
    Thank you so much.
    Leah

  • Slow Response Sun ONE 6.1 SP3 Win 2003

    My Sun ONE web server is processing my JSP pages very quickly when serving one session at a time. However when there are 4 or more active sessions, it slows right down. Response time goes from 2 seconds (1 active session) to 60 seconds (multiple active sessions) for a single JSP page. I've been running the performance monitor to see if I can notice anything, but nothing seems to stand out. I have tried manipulating the Keep Alive settings and the Performance settings within the Magnus Editor but there hasn't been a noticable improvement.
    I've recently upgraded to SP4 to see if this solved my problem, but there was no imporvement.
    This server is an HP DL380 with dual 2.8GHz Xeon processors & 2 Gigs of RAM. There is a lot of available disk space. I'm running Windows 2003 and it's up to date with all the latest patches.
    Anyone have any ideas or experienced this before?
    I've attached the output from my performance monitor:
    webservd pid: 4280
    Sun ONE Web Server 6.1SP4 B01/20/2005 21:34 (WINNT DOMESTIC)
    Server started Thu Mar 03 09:41:06 2005
    Process 4280 started Thu Mar 03 09:41:06 2005
    ConnectionQueue:
    Current/Peak/Limit Queue Length 0/1/4096
    Total Connections Queued 126
    Average Queue Length (1, 5, 15 minutes) 0.00, 0.00, 0.00
    Average Queueing Delay 0.02 milliseconds
    ListenSocket ls1:
    Address http://10.178.132.7:8080
    Acceptor Threads 8
    Default Virtual Server https-guruweb01
    KeepAliveInfo:
    KeepAliveCount 2/64
    KeepAliveHits 1083
    KeepAliveFlushes 0
    KeepAliveRefusals 0
    KeepAliveTimeouts 11
    KeepAliveTimeout 360 seconds
    SessionCreationInfo:
    Active Sessions 2
    Keep-Alive Sessions 1
    Total Sessions Created 48/256
    CacheInfo:
    enabled yes
    CacheEntries 110/1024
    Hit Ratio 1912/2164 ( 88.35%)
    Maximum Age 30
    Native pools:
    NativePool:
    Idle/Peak/Limit 5/6/128
    Work Queue Length/Peak/Limit 0/1/0
    Server DNS cache disabled
    Async DNS disabled
    Performance Counters:
    Average Total Percent
    Total number of requests: 1213
    Request processing time: 1.5520 1882.5520
    default-bucket (Default bucket)
    Number of Requests: 1213 (100.00%)
    Number of Invocations: 15085 (100.00%)
    Latency: 0.0002 0.2013 ( 0.01%)
    Function Processing Time: 1.5518 1882.3507 ( 99.99%)
    Total Response Time: 1.5520 1882.5520 (100.00%)
    Sessions:
    Process Status Function
    4280 keep-alive
    response service-dump
    response service-j2ee
    Thanks...

    The JSP's are simply Hello World JSP's (however I created these type of JSP's for testing and they do respond slowly as well when these are multiple sessions).
    These JSP functioned fine on iPlanet 6.0 SP1 (JDK 1.2.2) without any slow response on Win2K and inferior hardware.

  • Slow response using internet, just hangs

    Not the best at IT and just clicked update when it came up as available without realising what I was doing!  Turns out it was an upgrade to os x 10.9.4.  Since then the laptop has been practically unusable particularily when it comes to safari, it is either really slow getting to a particular page or just doesnt do anything, no matter how long you wait.  Restarting doesnt seem to help, reload view fails as well.  Its strange as sometimes its ok for 10 minutes then starts doing this.  I know this is bad but I have never backed the laptop up so cant restore to previous version.  I am currently looking into which external hard drive to buy so I can start doing regular back ups.  I have run EtreCheck in the hope somebody can help!!  Results below
    Problem description:
    Very slow responses on internet, just hangs for ages
    EtreCheck version: 2.0.6 (91)
    Report generated 25 October 2014 13:18:22 BST
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Late 2011) (Verified)
      MacBook Pro - model: MacBookPro8,1
      1 2.4 GHz Intel Core i5 CPU: 2-core
      4 GB RAM Upgradeable
      BANK 0/DIMM0
      2 GB DDR3 1333 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1333 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 3000 - VRAM: 384 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.9.4 (13E28) - Uptime: 0:42:39
    Disk Information: ℹ️
      ST9500325ASG disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) /  [Startup]: 499.25 GB (392.13 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      MATSHITADVD-R   UJ-8A8
    USB Information: ℹ️
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [loaded] com.rim.driver.BlackBerryUSBDriverInt (0.0.97) Support
      [not loaded] com.rim.driver.BlackBerryUSBDriverVSP (0.0.97) Support
      /Users/[redacted]/Downloads/PeerGuardian.app
      [not loaded] xxx.qnation.PeerGuardian (1.1.11 - SDK 10.2) Support
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist Support
      [loaded] com.oracle.java.Helper-Tool.plist Support
      [loaded] xxx.qnation.PeerGuardian.locum.plist Support
    User Launch Agents: ℹ️
      [running] com.amazon.cloud-player.plist Support
      [loaded] com.google.keystone.agent.plist Support
    User Login Items: ℹ️
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Android File Transfer Agent Application (/Users/[redacted]/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app)
      pploader Application (/Users/[redacted]/Downloads/PeerGuardian.app/Contents/Library/LoginItems/pploa der.app)
      pplogger Application (/Users/[redacted]/Downloads/PeerGuardian.app/Contents/Library/LoginItems/pplog ger.app)
    Internet Plug-ins: ℹ️
      FlashPlayer-10.6: Version: 15.0.0.189 - SDK 10.6 Support
      Default Browser: Version: 537 - SDK 10.9
      Flash Player: Version: 15.0.0.189 - SDK 10.6 Cannot contact Adobe
      LogMeIn: Version: 1.0.730 Support
      QuickTime Plugin: Version: 7.7.3
      LogMeInSafari32: Version: 1.0.730 Support
      LogMeInSafari64: Version: 1.0.730 Support
      JavaAppletPlugin: Version: Java 7 Update 67 Check version
    Safari Extensions: ℹ️
      AdBlock
    3rd Party Preference Panes: ℹ️
      Flash Player  Support
      Java  Support
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          6% WindowServer
          1% fontd
          0% AppleSpell
          0% Safari
          0% imagent
    Top Processes by Memory: ℹ️
      159 MB Safari
      103 MB pploader
      73 MB com.apple.WebKit.WebContent
      47 MB WindowServer
      34 MB mds_stores
    Virtual Memory Information: ℹ️
      1.53 GB Free RAM
      1.14 GB Active RAM
      655 MB Inactive RAM
      971 MB Wired RAM
      624 MB Page-ins
      0 B Page-outs

    Not the best at IT and just clicked update when it came up as available without realising what I was doing!  Turns out it was an upgrade to os x 10.9.4.  Since then the laptop has been practically unusable particularily when it comes to safari, it is either really slow getting to a particular page or just doesnt do anything, no matter how long you wait.  Restarting doesnt seem to help, reload view fails as well.  Its strange as sometimes its ok for 10 minutes then starts doing this.  I know this is bad but I have never backed the laptop up so cant restore to previous version.  I am currently looking into which external hard drive to buy so I can start doing regular back ups.  I have run EtreCheck in the hope somebody can help!!  Results below
    Problem description:
    Very slow responses on internet, just hangs for ages
    EtreCheck version: 2.0.6 (91)
    Report generated 25 October 2014 13:18:22 BST
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Late 2011) (Verified)
      MacBook Pro - model: MacBookPro8,1
      1 2.4 GHz Intel Core i5 CPU: 2-core
      4 GB RAM Upgradeable
      BANK 0/DIMM0
      2 GB DDR3 1333 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1333 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 3000 - VRAM: 384 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.9.4 (13E28) - Uptime: 0:42:39
    Disk Information: ℹ️
      ST9500325ASG disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) /  [Startup]: 499.25 GB (392.13 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      MATSHITADVD-R   UJ-8A8
    USB Information: ℹ️
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [loaded] com.rim.driver.BlackBerryUSBDriverInt (0.0.97) Support
      [not loaded] com.rim.driver.BlackBerryUSBDriverVSP (0.0.97) Support
      /Users/[redacted]/Downloads/PeerGuardian.app
      [not loaded] xxx.qnation.PeerGuardian (1.1.11 - SDK 10.2) Support
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist Support
      [loaded] com.oracle.java.Helper-Tool.plist Support
      [loaded] xxx.qnation.PeerGuardian.locum.plist Support
    User Launch Agents: ℹ️
      [running] com.amazon.cloud-player.plist Support
      [loaded] com.google.keystone.agent.plist Support
    User Login Items: ℹ️
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Android File Transfer Agent Application (/Users/[redacted]/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app)
      pploader Application (/Users/[redacted]/Downloads/PeerGuardian.app/Contents/Library/LoginItems/pploa der.app)
      pplogger Application (/Users/[redacted]/Downloads/PeerGuardian.app/Contents/Library/LoginItems/pplog ger.app)
    Internet Plug-ins: ℹ️
      FlashPlayer-10.6: Version: 15.0.0.189 - SDK 10.6 Support
      Default Browser: Version: 537 - SDK 10.9
      Flash Player: Version: 15.0.0.189 - SDK 10.6 Cannot contact Adobe
      LogMeIn: Version: 1.0.730 Support
      QuickTime Plugin: Version: 7.7.3
      LogMeInSafari32: Version: 1.0.730 Support
      LogMeInSafari64: Version: 1.0.730 Support
      JavaAppletPlugin: Version: Java 7 Update 67 Check version
    Safari Extensions: ℹ️
      AdBlock
    3rd Party Preference Panes: ℹ️
      Flash Player  Support
      Java  Support
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          6% WindowServer
          1% fontd
          0% AppleSpell
          0% Safari
          0% imagent
    Top Processes by Memory: ℹ️
      159 MB Safari
      103 MB pploader
      73 MB com.apple.WebKit.WebContent
      47 MB WindowServer
      34 MB mds_stores
    Virtual Memory Information: ℹ️
      1.53 GB Free RAM
      1.14 GB Active RAM
      655 MB Inactive RAM
      971 MB Wired RAM
      624 MB Page-ins
      0 B Page-outs

  • Flex and Zend amf deployment resolved with proper solution

    Hi All,
    Although, I personally do not like using Zend for these issues itself. However, I faced this issue first time with flex 4.0 version when everyone used to run into
    channel disconnected error. you can find the link for that post here:
    http://forums.adobe.com/message/3366991.
    Now, with flash builder 4.6, things have changed slightly and so the deployment process. So, here are the right set of steps to be followed :
    1. after developing your flash project, export the release build(I assume if you are a flex user, you should know these steps already)
    2. Now, check your release folder, you must have got some files with amfconfig.ini and gateway.php and just one folder named history.
    3. copy all these files into a new folder say "My Release Build".
    4. Now, step 1 is get Zend framework in place, to achieve that:
    there are different ways. some will say : "make sure zend must already installed on your production server." that is an alternative but most likely,  the easier way to do this is : search your www(root folder on localhost),you will find a folder with name ZendFramework. Copy this folder to "My Release Build"
    5. Now, the services that you have used in your flex project, go to debug folder of your project which should be in your www(root folder on localhost) with name "yourprojectname-debug". copy services folder from this debug folder to "My Release Build"
    6. Now, open your amfconfig.ini from "My Release Build" and edit and make it look like following:
    [zend]
    webroot = http://www.yourwebsite.com
    ;you can edit above webroot to match the root folder of your website or use . to make it point to root.
    zend_path = ./ZendFramework/library
    [zendamf]
    amf.production = true
    amf.directories[]= services
    thats it. your amf config is fine.
    7. edit gateway.php:
    Now, remove everything from gateway.php and copy this as it is there:
    <?php
    ini_set("display_errors", 1);
    $dir = '.';
    $webroot = $_SERVER['DOCUMENT_ROOT'];
    $configfile = "amf_config.ini";
    //default zend install directory
    $zenddir = $webroot. '/ZendFramework/library';
    //Load ini file and locate zend directory
    if(file_exists($configfile)) {
        $arr=parse_ini_file($configfile,true);
        if(isset($arr['zend']['webroot'])){
            $webroot = $arr['zend']['webroot'];
            $zenddir = $webroot. '/ZendFramework/library';
        if(isset($arr['zend']['zend_path'])){
            $zenddir = $arr['zend']['zend_path'];
    // Setup include path
        //add zend directory to include path
    set_include_path(get_include_path().PATH_SEPARATOR.$zenddir);
    // Initialize Zend Framework loader
    require_once 'Zend/Loader/Autoloader.php';
    Zend_Loader_Autoloader::getInstance();
    // Load configuration
    $default_config = new Zend_Config(array("production" => false), true);
    $default_config->merge(new Zend_Config_Ini($configfile, 'zendamf'));
    $default_config->setReadOnly();
    $amf = $default_config->amf;
    // Store configuration in the registry
    Zend_Registry::set("amf-config", $amf);
    // Initialize AMF Server
    $server = new Zend_Amf_Server();
    $server->setProduction($amf->production);
    if(isset($amf->directories)) {
        $dirs = $amf->directories->toArray();
        foreach($dirs as $dir) {
            // get the first character of the path.
            // If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path
            $length = strlen($dir);
            $firstChar = $dir;
            if($length >= 1)
                $firstChar = $dir[0];
            if($firstChar != "/"){
                // if the directory is ./ path then we add the webroot only.
                if($dir == "./"){               
                    $server->addDirectory($webroot);
                }else{
                    $tempPath = $webroot . "/" . $dir;
                    $server->addDirectory($tempPath);
            }else{
                   $server->addDirectory($dir);           
    // Initialize introspector for non-production
    if(!$amf->production) {
        $server->setClass('Zend_Amf_Adobe_Introspector', '', array("config" => $default_config, "server" => $server));
        $server->setClass('Zend_Amf_Adobe_DbInspector', '', array("config" => $default_config, "server" => $server));
    // Handle request
    echo $server->handle();
    Now, upload your "My Release Build folder to your production server webroot"
    case 1: if you get "channel disconnected error, you have made some mistake and your path for zend or services folder is not right."
    In above case, "ZendFramework folder and services folder with all of other release files". To find out what is wrong, open this url :
    http://www.yourwebsite.com/gateway.php. if you see this lovely string there : "Zend Amf Endpoint". consider your are through with zend settings on server
    otherwse you will see relative errors.
    2. After fixing this step, try run your website, you will land into this error :
    Class “yourcorrectclassname” does not exist: Plugin by name ‘Classname’ was not found in the registry; used paths:
    : /home1/messoftc/public_html/oc/services/
    #0 /home1/messoftc/public_html/ZendFramework/library/Zend/Amf/Server.php(553): Zend_Amf_Server->_dispatch(‘fxnname’, Array, ‘classname’)
    #1 /home1/messoftc/public_html/ZendFramework/library/Zend/Amf/Server.php(629): Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http))
    #2 /home1/messoftc/public_html/oc/gateway.php(69): Zend_Amf_Server->handle()
    #3 {main}
    Now, this is a zend framework bug, it does not automatically detect the php classes in your services folder,those who have run into this, must have googled hard to find the solution and this bug is also logged officially on zend server jira log.
    so, what is the solution? simple and effective. open your gateway.php file from "My Release Build"
    Add this little line :
    $server->addDirectory(dirname(__FILE__) . '/services/');
    after this line :
    $server->setProduction($amf->production);
    reupload this file to your production, you should see your Flex, Zend, php & Mysql in action.
    Here is a sample link I have created :
    http://www.eiws.co.in/testzend.html
    you may also visit the endpoint file:
    http://eiws.co.in/gateway.php
    If anyone still faces this issue, can contact me at [email protected].
    Credits: "To all developers who share their knowledge with everyone and google and thousands of blogs who provide a medium to share this knowledge"

    Richard Bates of flexandair.com figured it out. In my php.ini file, I had the memory limit set at 8M. After, changing it to 32M, it worked. Thank you, Richard!
    -Laxmidi

  • Extremely Slow Response when attempting to display files on Windows Server

    I have set up File Sharing on my MacBook Pro using SMB and defined the folders that are available to be shared. When I look at the Network Neighbourhood in Windows Explorer the Macbook appears listed with all the other PCs on the network. When I try to open the Macbook in Explorer it takes a very long time to open (about 2 minutes or so) and shows me the list of folders. When I try to open a folder the exact same thing happens - it opens after a couple of minutes, this continues for every folder that I try to open. I thought it might be that Explorer needed to "catalog" the files in the folders but the same thing happens each time - if I close the connection and try again it takes the same amount of time. What is very strange is that if I connect to the Windows Server from the Mac opening and looking at shared folders/files is instantaneous so clearly this is not a network problem. If I use the Win2K3 server to look at other computers/files the result is the same - instantaneous access, so it has nothing to do with the Win2K3 server - clearly the problem is with the MacBook serving up the file information to the Win2K3 server. I have tried with AFP on and off and the result is the same. The user name/pwd is the same on both the Win2K3 and the Macbook - and I have tried with a different username on the Win2K3 - no difference. Anyone have any ideas as to why this is happening?

    Yes they are on the same workgroup, on ethernet, plugged into the same switch. The Mac can read and copy files of the Win2K3 server with no problem. The problem is clearly at the Mac end as the Win2K3 server can view files on any machine on the network without the slow response, the Mac can view files on the Win2K3 server without the slow response, it is only when the Win2K3 server tries to view files on the Mac.

  • Random users getting very slow response when opening messages/attachments or sending email

    I have a small number of users, mostly very senior management of course, who are experiencing slow response when trying to open email messages and attachments or send messages.
    They see the spinning wheel and sit there until it decides to open or send. If the message is opened  and closed again you would expect it to be quick reopening the same message, no, it does the same thing again.
    These users are all using Outlook 2010 and their mail accounts are on Exchange 2013. It does not seem to make a difference if they use a physical machine or log into a VDI.
    I do not have the same issue generally, though I have experienced this when using VDI and this has been seen using a number of different machine pools so it is not a specific pool.
    This is not specifically a VDI issue, as the 3rd paragraph says, the issues are seen on both physical and virtual machines.
    none of the mailboxes are particularly large, most are at around 60% of quota limit, and the same limit applies to almost all mailboxes across the organization. They also do not appear to have a huge number of messages stored, other users without issues
    have larger mailboxes and higher item counts. Any ideas what I need to look at to address this?

    Hi,
    How about OWA?
    If OWA works well, it seems an issue on the Outlook client side.
    Please try to run Outlook under safe mode and re-create profile for testing.
    Any related error/warning/information message left in App Log?
    Also consider the network Bandwidth.
    Thanks
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Mavis Huang
    TechNet Community Support

  • Very slow response when I click on a link, but almost instant response if I go back and click a second time.

    I often get very slow response when I click on a link, any link. But if I go back and click on the link again, then the page will open almost immediately. I discovered this by accident and noticed that this happens every time. It would be nice if I got fast response on the first click without having to do this silly procedure and it seems to me that there's a simple fix. I would appreciate it if you could help. I'm open to any and all ideas. Thanks again.
    Sincerely,
    Al
    Version 26.0 Firefox, Windows XP, sp/3

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Slow response when using Xcelsius web service connection witn input values

    We've been very successful in using the Xcelsius Web Service Connection. We've recently moved forward toward using input values when calling a web service and having issues with response time. Without input values, it takes 3 - 6 seconds to retrieve and display the results in Xcelsius, but, when using the input values to the web service, it takes about 27 seconds for Xcelsius to retrieve and display the results.  Does anyone have experience with fixing slow response associated with using input values for a web service connection?

    Hi Sharone,
    What's the version of your Xcelsius and BOBJ server?
    I'm asking because using the last version of BOBJ server (BOXI 3.1 SP 3) you have new services on CMC just to help Xcelsius to work better with WebServices.
    Regards,
    Rodrigo.

  • Using collections and experiencing slow response

    I am experiencing slow response when using htmldb_collection. I was hoping someone might point me in another direction or point to where the delay may be occurring.
    First a synopsis of what I am using these collections for. The main collections are used in order to enable the users to work with multiple rows of data (each agreement may have multiple inbound and outbound tiered rates). These collections, OBTCOLLECTION and IBTCOLLECTION, seem to be fine. The problem arises from the next set of collections.
    OBTCOLLECTION and IBTCOLLECTION each contain a field for city, product, dial code group and period. Each of these fields contains a semi-colon delimited string. When the user chooses to view either the outbound tiers (OBTCOLLECTION) or the inbound tiers (IBTCOLLECTION), I generate four collections based on these four fields, parsing the delimited strings, for each tier (record in the OBT or IBT collection). Those collections are used as the bases for multiple select shuttles when the user edits an individual tier.
    Here is the collection code for what I am doing.
    When the user chooses an agreement to work with, by clicking on an edit link, they are sent to page 17 (as you see referenced in the code). That page has the on-demand process below triggered on load, after footer.
    -- This process Loads the collections used
    -- for the Inbound and Outbound tier details
         -- OBTCOLLECTION
         -- IBTCOLLECTION
    -- It is an on-demand process called on load (after footer) of page 17 --
    -- OUTBOUND TIER COLLECTION --
         if htmldb_collection.collection_exists( 'OBTCOLLECTION') = TRUE then
             htmldb_collection.delete_collection(p_collection_name => 'OBTCOLLECTION' );
         end if;
         htmldb_collection.create_collection_from_query(
             p_collection_name => 'OBTCOLLECTION',
             p_query           => 'select ID, AGREEMENT_ID, FIXED_MOBILE_ALL,
                              OF_TYPE,TIER, START_MIN, END_MIN,
                                             REVERT_TO, RATE,CURRENCY,
                                             PENALTY_RATE, PENALTY_CURR,
                       PRODUCT,CITY, DIAL_CODE_GROUP, PERIOD,
                        to_char(START_DATE,''MM/DD/YYYY''),
                                             to_char(END_DATE,''MM/DD/YYYY''),
                                             MONTHLY,EXCLUDED,
                       ''O'' original_flag
                          from outbound_tiers
                          where agreement_id = '''||:P17_ID ||'''
                          order by FIXED_MOBILE_ALL, ID',
             p_generate_md5    => 'YES');
    -- INBOUND TIER COLLECTION --
         if htmldb_collection.collection_exists( 'IBTCOLLECTION') = TRUE then
             htmldb_collection.delete_collection(p_collection_name => 'IBTCOLLECTION' );
         end if;
         htmldb_collection.create_collection_from_query(
             p_collection_name => 'IBTCOLLECTION',
             p_query           => 'select ID, AGREEMENT_ID, FIXED_MOBILE_ALL,
                              OF_TYPE,TIER, START_MIN, END_MIN,
                                             REVERT_TO, RATE,CURRENCY,
                                             PENALTY_RATE, PENALTY_CURR,
                              PRODUCT,CITY, DIAL_CODE_GROUP, PERIOD,
                              to_char(START_DATE,''MM/DD/YYYY''),
                                             to_char(END_DATE,''MM/DD/YYYY''),
                                             MONTHLY,EXCLUDED,
                              ''O'' original_flag
                          from inbound_tiers
                          where agreement_id = '''||:P17_ID ||'''
                          order by FIXED_MOBILE_ALL, ID',
             p_generate_md5    => 'YES');
         commit;The tables each of these collections is created from are each about 2000 rows.
    This part is working well enough.
    Next, when the user chooses to view the tier information (either inbound or Outbound) they navigate to either of two pages that have the on-demand process below triggered on load, after header.
    -- This process Loads all of the collections used
    --  for the multiple select shuttles --
         -- DCGCOLLECTION
         -- CITYCOLLECTION
         -- PRODCOLLECTION
         -- PRDCOLLECTION
    -- It is  an on-demand process called on load (after footer)  --
    DECLARE
       dcg_string long;
       dcg varchar2(100);
       city_string long;
       the_city varchar2(100);
       prod_string long;
       prod varchar2(100);
       prd_string long;
       prd varchar2(100);
       end_char varchar2(1);
       n number;
       CURSOR shuttle_cur IS
          SELECT seq_id obt_seq_id,
                 c013 product,
                 c014 city,
                 c015 dial_code_group,
                 c016 period
          FROM htmldb_collections
          WHERE collection_name = 'OBTCOLLECTION';
       shuttle_rec shuttle_cur%ROWTYPE;
    BEGIN
    -- CREATE OR TRUNCATE DIAL CODE GROUP COLLECTION FOR MULTIPLE SELECT SHUTTLES --
         htmldb_collection.create_or_truncate_collection(
         p_collection_name => 'DCGCOLLECTION');
    -- CREATE OR TRUNCATE CITY COLLECTION FOR MULTIPLE SELECT SHUTTLES --
         htmldb_collection.create_or_truncate_collection(
         p_collection_name => 'CITYCOLLECTION');
    -- CREATE OR TRUNCATE PRODUCT COLLECTION FOR MULTIPLE SELECT SHUTTLES --
         htmldb_collection.create_or_truncate_collection(
         p_collection_name => 'PRODCOLLECTION');
    -- CREATE OR TRUNCATE PERIOD COLLECTION FOR MULTIPLE SELECT SHUTTLES --
         htmldb_collection.create_or_truncate_collection(
         p_collection_name => 'PRDCOLLECTION');
    -- LOAD COLLECTIONS BY LOOPING THROUGH CURSOR.
         OPEN shuttle_cur;
         LOOP
            FETCH shuttle_cur INTO shuttle_rec;
            EXIT WHEN shuttle_cur%NOTFOUND;
            -- DIAL CODE GROUP --
            dcg_string := shuttle_rec.dial_code_group ;
            end_char := substr(dcg_string,-1,1);
            if end_char != ';' then
               dcg_string := dcg_string || ';' ;
            end if;
            LOOP
               EXIT WHEN dcg_string is null;
               n := instr(dcg_string,';');
               dcg := ltrim( rtrim( substr( dcg_string, 1, n-1 ) ) );
               dcg_string := substr( dcg_string, n+1 );
               if length(dcg) > 1 then
                htmldb_collection.add_member(
                   p_collection_name => 'DCGCOLLECTION',
                   p_c001 => shuttle_rec.obt_seq_id,
                   p_c002 => dcg,
                   p_generate_md5 => 'NO');
               end if;
            END LOOP;
            -- CITY --
            city_string := shuttle_rec.city ;
            end_char := substr(city_string,-1,1);
            if end_char != ';' then
               city_string := city_string || ';' ;
            end if;
            LOOP
               EXIT WHEN city_string is null;
               n := instr(city_string,';');
               the_city := ltrim( rtrim( substr( city_string, 1, n-1 ) ) );
               city_string := substr( city_string, n+1 );
               if length(the_city) > 1 then
                htmldb_collection.add_member(
                   p_collection_name => 'CITYCOLLECTION',
                   p_c001 => shuttle_rec.obt_seq_id,
                   p_c002 => the_city,
                   p_generate_md5 => 'NO');
               end if;
            END LOOP;
            -- PRODUCT --
            prod_string := shuttle_rec.product ;
            end_char := substr(prod_string,-1,1);
            if end_char != ';' then
               prod_string := prod_string || ';' ;
            end if;
            LOOP
               EXIT WHEN prod_string is null;
               n := instr(prod_string,';');
               prod := ltrim( rtrim( substr( prod_string, 1, n-1 ) ) );
               prod_string := substr( prod_string, n+1 );
               if length(prod) > 1 then
                htmldb_collection.add_member(
                   p_collection_name => 'PRODCOLLECTION',
                   p_c001 => shuttle_rec.obt_seq_id,
                   p_c002 => prod,
                   p_generate_md5 => 'NO');
               end if;
            END LOOP;
            -- PERIOD --
            prd_string := shuttle_rec.period ;
            end_char := substr(prd_string,-1,1);
            if end_char != ';' then
               prd_string := prd_string || ';' ;
            end if;
            LOOP
               EXIT WHEN prd_string is null;
               n := instr(prd_string,';');
               prd := ltrim( rtrim( substr( prd_string, 1, n-1 ) ) );
               prd_string := substr( prd_string, n+1 );
               if length(prd) > 1 then
                htmldb_collection.add_member(
                   p_collection_name => 'PRDCOLLECTION',
                   p_c001 => shuttle_rec.obt_seq_id,
                   p_c002 => prd,
                   p_generate_md5 => 'NO');
               end if;
            END LOOP;
         END LOOP;
         CLOSE shuttle_cur;
        commit;
    END;Creating these collections from the initial collection is taking way too long. The page is rendered after about 22 seconds (when tier collection has 2 rows) and 10 minutes worst case (when the tier collection has 56 rows).
    Thank you in advance for any advice you may have.

    Try to instrument/profile your code by putting timing statements after each operation. This way you can tell which parts are taking the most time and address them.

  • Connecting To Zend AMF Backend Via HTTPS

    Environment:
    - Flash Builder 4
    - Flex 4 Beta 2
    - Zend AMF (the one that gets automatically downloaded in Flash Builder 4)
    Issue:
    Using Flash Builder's "Connect To PHP" wizard, I can connect to my Zend AMF backend via HTTP but not HTTPS (and yes, my domain does have a valid SSL certificate from a trusted CA - it is not self signed).  Upon selecting the PHP class (using a SFTP mount to my web host) via the wizard, Flash Builder dies when "introspecting the service" and it throws this error:
    Make sure that Zend Framework is installed correctly and  the parameter "amf.production" is not set to true in the amf_config.ini file  located in the project output folder.
    Warning:  require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream:  No such file or directory in /home <blah>
    If I change my PHP backend's URL from https://<domain> to http://<domain> then it works but I obviously need to use SSL for this application.

    I upgraded to Zend Framework 1.10, which didn't help.  I also just installed Flash Builder 4 Premium (which was just released today) and that didn't help my situation either although I believe the problem is how I'm attempting to get my Flex client to communicate to my hosted web server.
    All the examples I've seen demonstrate how to connect a flex client and PHP backend (via Zend AMF) to LOCALHOST.  I need to develop my Flex client on my laptop and hook into my PHP backend running on a hosted web server (not localhost).
    Here are my server properties:
    - Application server type = PHP
    - Server location:
         - web root = Y:  (this maps to my Y: drive on windows which is a SFTP mount to my web host)
         - root URL = https://cl21.<web_host>.com/~<username>
    - Output folder = Y:\<app>-debug
    I can get this to work if I use my dedicated domain name www.<my_domain>.com but I haven't yet purchased a dedicated IP and SSL certificate so I'm attempting to use my web host's shared SSL certificate (which is valid).  The problem seems to be related to the setting "root URL".  Can you not point the flex client to anything other than a root URL?  Most server-side development happens on a shared dev server (e.g. sandbox.company_name.com/developer1, sandbox.company_name.com/developer2, etc.)

Maybe you are looking for