5 Replies Latest reply on Mar 8, 2011 2:39 PM by adam@kamar

    PHP Connections are not being released

    Malcolm

      Title

      PHP Connections are not being released

      Your post

      FMSA v10.0.2 Mac OSX Server v10.5.8

      There are about 90 PHP clients displayed in console, they have been there for hours. The server is very slow. 

      I disconnected the clients manually, then stopped and restarted the web server component via the admin console.  No obvious improvement. 

      I checked activity monitor to see what resources were being used. FM Web publishing was above 400% CPU. I went back to admin console and stopped the web publishing. CPU use for that process rose to 1500% immediately and it did not quit! It is shown as quit in admin console. 

      I Noticed that there was another FM Web server process that was not using much CPU. I force quit the original process. Went back to admin console and started web publishing. A second process did not arise in Activity Monitor. Admin console shows web publishing running.

       Clients are aggregating very quickly. I can disconnect them but it is continuous. Once the number of PHP clients exceeds 100 the database throws an error 956 - too many connections.

      Anyone else suffering this problem?

        • 1. Re: PHP Connections are not being released

          Malcolm Fitzgerald:

          Thanks for posting!

          You mentioned that there was another FM web related process running. What was it exactly? Would it be possible to get a list of processes currently running? Is this a single or multiple machine deployement?

          It's not clear if this issue is originating on the database end or elsewhere so let's try creating a new database and running it through the PHP Site Assistant. Once that's hosted out, make a few connections to it and see if they release as expected.

          TSBear

          FileMaker, Inc.

          • 2. Re: PHP Connections are not being released
            Malcolm

            The other process was another instance of FM Web Publisher. I believe it was initiated because I stopped and then restarted the web publishing engine from the admin console. I don't know how the admin console does that job but it doesn't seem very reliable. The GUI is certainly much too optimistic about it's own abilities. It reports that the web publisher process has been stopped when it hasn't been. 

            We've been seeing these problems for a long time now but with such a small user base that it was manageable. Now we have more people using the web sites and it's aggravating the problem. About a month ago we did the two java updates (update 5 and update 8). We did stop and test update 5 on the way through and it didn't alleviate the problem however update 8 did seem to put things right. 

            This morning the machine is running OK. I'll have to wait for another occasion to perform the experiment. I've just logged in to the server to see what is going on. CPU usage by FM Web Publishing is presently zero. Using the Mac OS X Server Admin I can see that CPU usage for the machine spiked about two days ago, then dropped back to a high level and stayed there until about four hours ago. From what I saw in Activity Monitor I think about CPU usage was about 300% during that time. (The 1500% spike is very distinct and sits in the middle of that). About four hours ago the CPU usage dropped away to nothing.

            Looking back further I can see a similar spike, also followed by sustained, high CPU levels for about 12 hours, occurring about three days ago.

            The Filemaker logs don't seem to shine any light on this. The only errors reported for the last five days all occur in the half hour when I went into mess around yesterday morning.

            • 3. Re: PHP Connections are not being released
              philmodjunk

              Any ODBC or JDBC involved? There have been reports of memory leak issues connected with those.

              For More Information see:    

              SQL memory leak makes FileMaker unusable!

              FileMaker Server

              This is one of many acknowledged bugs that can be found in the Known Bug List here in the Report an Issue section of the forum.

              It can also be downloaded as a database file from:   http://www.4shared.com/file/8orL8apk/FMP_Bugs.html

              • 4. Re: PHP Connections are not being released
                Malcolm

                No, this site is PHP / CWP only.

                • 5. Re: PHP Connections are not being released
                  adam@kamar

                  I am searching for a solution to the same, or a very similar, issue to what Malcolm is describing.

                  The company I work for has a number of clients using a Custom Web Publishing solution hooked into their main FileMaker solution and a large number experience this issue. It appears to be independant of OS and FileMaker Server version.

                  The issue is, over a number of hours of use (based on the amount of activity at the site), a subset of the Web Publishing Connections initiated will be held open; with no apparent pattern. These WP clients appear to simply build up at the sites affected until they reach the 100 connection limit and Web Publishing Services cause to function. This is largely the state things are at when I come onto the scene.

                  However, what differs from what Malcolm described, is that I almost never have issues re-establishing connections and regaining resonable performance. A restart of the Web Publishing Engine AND/OR manually disconnecting the rogue WP clients via the admin console will restore Web Publishing functionality.

                  At some sites daily Web Publishing Engine restarts are the only realisitc workaround.

                  Is this a problem with my use of the FileMaker PHP API? I have tried a number of tweaks to cURL timeout values, in an attempt to release connections after time, with no obvious success. Could FileMaker clients, connected using FileMaker Pro from their desktop machines, accessing the same records I query via Custom Web Publishing be a factor in this behaviour?

                  How do I troubleshoot this issue?