10 Replies Latest reply on Feb 21, 2012 6:38 PM by kiwikaty

    Maximum number of web publishing sessions

    kiwikaty

      Hi there,

      I need to know faily urgently what will happen when you exceed the maximum of 100 simultaneuous web publishing sessions. I have around 5000 students that are about to hit a site I have set up where they will be downloading customised pdfs from filemaker. When the site goes live on March 1st it may be hit quite hard if everyone decides to do their downloads at the same time... should I be very very worried??? The site is using fx php, not IWP and we do expire their session after 10 minutes.

       

      If I am heading for disaster any advice on avoiding it would be very much appreciated.

       

      Many thanks

      Katy

        • 1. Re: Maximum number of web publishing sessions
          mbraendle

          You should be worried. If you deal with complicated searches and large answer sets, FMS CWP will become unresponsive before you hit the 100 simultaneuous session limit. The WPE may handle at maximum 10-20 simultaneous requests. It's not multithreading, and it's not like MySQL. If you can separate the production of the PDF files from the download (e.g. prepare the PDFs in advance and put them into a download folder), you may get much better performance.

           

          You may test the performance of your website using tools such as httperf.

          • 2. Re: Maximum number of web publishing sessions
            kiwikaty

            Yes the pdfs are going to be created before the go live date and sitting in the db. Each student will be returned a list of between 3 and 24 records depending on how many courses they are enrolled in. The php is sitting on another server which is where the site authtication etc happens but of course the records are  being pulled from the fm server which is a windows 2008 box with IIS. I had a look at httpperf but was not sure if it would be testing my box which does not get called until after secure login?

            • 3. Re: Maximum number of web publishing sessions
              LyndsayHowarth

              Katy,

               

              I'd be exporting the PDF's with a unique name matched to the record IDs etc. and creating an http link to the files from the results search... and shedding the PDF's from the DB.

              Take the load off FileMaker and put it back on the IIs server or even the main server.

               

              - Lyndsay

              • 4. Re: Maximum number of web publishing sessions
                beverly

                Ditto. Let the WEB SERVER do what it does best (server files: html pages, images, pdfs, etc.)

                 

                Push any PDF to the web server and LINK to them in a field in your database. this can be calculated, as the "web address" probably starts the same for each one of them: <<protocol(HTTP)>>://mydomain.com/mydirectory/___mycalculatedfile___.pdf

                 

                Beverly

                • 5. Re: Maximum number of web publishing sessions
                  kiwikaty

                  Do you know what errors I should be trapping for in the php if the IIS or Filemkaer Web Publishing goes down? I am only a novice at putting together php but feel like I should be adding some type of error trapping in for these 2 possibilities.

                   

                  Students are getting a very ugly "fatal error" message when there are problems with the main web server connecting to the fm server at the moment.

                  • 6. Re: Maximum number of web publishing sessions
                    databuzz

                    Hi Katy,

                     

                    If the FileMaker Web Publishing Engine isn't responding you normally get this result:

                     

                    "Communication Error: (22) The requested URL returned error: 503 - The Web Publishing Core and/or FileMaker Server services are not running. (22)"

                     

                    You can check for an error by using the FileMaker::isError function after making a request, e.g.

                     

                    if (FileMaker::isError($result)) {

                         $error_code = $result->code; // this gets the error number, e.g. 401

                         // handle the error

                         // your code goes here

                    }

                     

                    HTH,

                    Andrew

                     

                    FileMaker 8/9/10/11 Certified Developer

                    Databuzz

                    - - - - - - - - - - - - - - - - -

                    Phone: +61 2 9484 6565

                    Mobile: +61 418 468 103

                    Email: andrew@databuzz.com.au

                    http://www.databuzz.com.au

                    • 7. Re: Maximum number of web publishing sessions
                      kiwikaty

                      Many thanks for the advice. Our web developer had tried to add something that looks like this but I got an email from a student saying they were getting this error after he made the change:

                      Fatal error: Class 'FileMaker' not found in D:\webserver\htdocs\foedassignments\assignment.php on line 69

                       

                      So this morning I took out what he added and I assume the problem is we are using FX php and not 'Filemaker' PHP.

                       

                      I tried adding a capture in for error 503 and then stopped the fm web publishing and now the page is only showing:

                      Fatal error: Cannot use object of type FX_Error as array in D:\webdev\htdocs\foedassignments\assignment.php on line 179

                       

                      Which means it is failing at the top line of the following code:

                       

                      if ($result['errorCode'] == 401)

                      {

                          header("location:401.php");

                      }

                      else if ($result['errorCode'] == 503)

                      {

                          header("location:503.php");

                      }

                      else if ($result['errorCode'] != 0)

                      {

                          header("location:error.php");

                          //die ('Error '.$result['errorCode']);

                      }

                       

                                      return $result;

                       

                      Because I am such a novice I am not sure if the problem is with my 'If' statement or something else altogether.

                       

                      I am trying to avoid them getting a blank page with a Fatal error at the top and instead on these occassions put them on a nicer looking error page but am not having masses of luck so far.

                       

                      I really appreciate your advice, with the site going live so soon I am definatlely wishing this was not all such a steep learning curve.

                       

                      Kind regards

                      Katy

                      • 8. Re: Maximum number of web publishing sessions
                        databuzz

                        Hi Katy,

                         

                        Sorry had assumed you were using the FileMaker PHP API. If you're using FX PHP you might be better posting to the FX PHP mailing list:

                         

                        http://iviking.org/FX.php/

                         

                        Andrew

                         

                        FileMaker 8/9/10/11 Certified Developer

                        Databuzz

                        - - - - - - - - - - - - - - - - -

                        Phone: +61 2 9484 6565

                        Mobile: +61 418 468 103

                        Email: andrew@databuzz.com.au

                        http://www.databuzz.com.au

                        • 9. Re: Maximum number of web publishing sessions
                          beverly

                          FX.php has some configuration settings that can turn on debugging. Perhaps that would help track down the problem?

                           

                          Beverly

                          • 10. Re: Maximum number of web publishing sessions
                            kiwikaty

                            Thanks Beverly

                             

                            I have managed to solve that issue and am now apprehensively waiting to see what will happen the first week of March. I have left the post running so that I can come back and report how well FM stood up to the challenge we have thrown it.

                             

                            I am still not quite sure what will happen when we hit the ceiling?

                             

                            Kind regards

                            Katy