6 Replies Latest reply on Mar 16, 2011 4:08 PM by duvy06

    FB4 and remote server

    duvy06

      Hi all,

       

      I have a Flash Builder 4 web application working fine on my local PC. This application use ZendFamework to populate data from a Mysql database.

      When I export a release version to a remote server I doesn't work however services is OK when I run the gateway.php : answer is "Zend Amf Endpoint"

      The message I have is :

       

      Channel disconnected

      Channel disconnected before an acknowledgement was received

       

      What is wrong with my service ?  Do I miss something when I export ?

       

      Thanks in advance to point me in the right direction.

        • 1. Re: FB4 and remote server
          duvy06 Level 1

          Hi all,

           

          I made some progress and find out the a memory problem occur.

          I got the next message :

          Allowed memory size of 67108864 bytes exhausted (tried to allocate 4294967296 bytes) in ....

           

          This is a very very big amount of memory to allocate for a generated script.

           

          Statement is a "mysqli_stmt_bind_result" in the generated code of the service using ZendFramework.

           

          Is there any work around ?

           

          Thanks for all.

          • 2. Re: FB4 and remote server
            jd_ice

            I've run into this problem before, I also used Zend and FB 4. Have you tried using a web debugging software like Charles or Service Capture. They are pretty much handy in tracing what is happening in the background. I recommend you use one and see what actually is happening.

            1 person found this helpful
            • 3. Re: FB4 and remote server
              duvy06 Level 1

              Thank you jd_ice for your reply. 

              Indeed, using Charles I was able to capture the memory message.  I have also find out that the amf.production parameter set to "production" didn't give me details of errors.  I change it to "false" and I could trace what happen.

               

              Now back to my memory problem, the services code is purely generated by FB4 so in a first time I didn't suspect it because it was working on my PC in local environment //localhost using Wamp.

               

              When I run the FB4 profile it give :

              - dc_data : 1764 (mxml application)

              - site_cars : 4204 and 1420 after garbage collector (value object services)

               

              The Mysql table contain only 5 records with 16 fields which is not that big

               

              Not sure how to interpret those indications and for sure don't know what to do to remedy this problem except rewriting the code.

               

              Either FB4 is a memory eater or I miss something somewhere.

               

              ScreenHunter_01 Mar. 04 21.41.jpg

              This is the result of the working version on localhost

              And here is the link to the non working version :

              http://www.duvy.org/dc_data/dc_data.html

              • 4. Re: FB4 and remote server
                jd_ice Level 1

                I'm running a database with around 10 million records and it's going pretty good, so I doubt FB4 is a memory eater. There are so many culprits to Channel error, if your using the full structure of ZEND, check your configuration file, .htaccess(if you have) and the database table itself, if the one in your local and on your server have same fields (includes field name identifier, number of fields, etc). Pretty basic, and see where it goes from there.

                • 5. Re: FB4 and remote server
                  duvy06 Level 1

                  Thank you to point me to 2 new parts of the question I didn't suspect :

                  - htacces : check and it seems correct -> no change

                  - use of a full set from ZendFramework (maybe I should restrict services requested to Zend)

                   

                  I am now busy to check deeper in this framework and hope to find my problem.  FB4 install a minimum configuration and looks to be insufisant to be applied on the Web.

                   

                  They notify an ini file with test and production environement I'am testing now. If you have any sample, it can maybe help me.

                   

                  I'll be back as soon as I debug this

                   

                  Anyway, thank you for your help.

                  • 6. Re: FB4 and remote server
                    duvy06 Level 1

                    I finaly find out why service went wrong and request a so big amount of memory.

                    One of the field in the table was defined as a longtext. I change it in varchar and everything is runing OK now.

                     

                    Hope this can help for future use.