[FX.php List] Troubleshooting poor performance and intermittent time outs

Troy Meyers tcmeyers at troymeyers.com
Wed Dec 12 16:14:25 MST 2007


Jamie,

I'm sure other will suggest plenty of other things, but when I first moved to PHP and FMS8 from FMU6, performance was horrible. While there were certain things that needed to be optimized, the only thing that caused huge, horrible delays was outdated file references, now known as External Data Sources... File Path Lists.

Because my files have been around for years, migrating upward from FileMaker 2 (before it was even called Pro) the files have secretly collected a long list of file paths in computers that I no longer even have. Starting with FMS 7 or 8, certainly 9, instead of the files being opened once when the web server starts, the files needed have to be located and opened each time a query is made. If your list of file paths that a database has relations to contains a long list of outmoded, non-valid paths, each of the bad path attempts has to time-out before the next candidate is tried. This is VERY time consuming, and it happens for each page access that has any related files tied in.

So, if your files are at all a "legacy", check this out:

Assuming you are using FileMaker Pro 9, open a file that you use on the web that has relationships with other files, and go to the File > Manage > External Data Sources... item.

This will bring up a list of file references for your relationships and other external things like script references.

Select one of the file references and hit Edit. You'll see a list of file paths that will be checked in order to get the related file. Unless the first entry is valid and the simplest and most direct, you'll be getting delays while the listed paths are tried and failed. Assuming all the files are together on the same server, the simples file path should be something like:

file:Subscribers.fp7

Before I cleaned out my file references, I might have a whole chain of bad paths that FileMaker had kept track of through the years, like:

file:/StarMax HD/Applications/FileMaker Pro 4.0 Folder/Web/flasking/Flasking Databases/Subscribers
file:/Performa/Applications/FileMaker Pro 6.0 Folder/Web/flasking/Flasking Databases/Subscribers
file:Subscribers

In that case, the two nonexistent machines were hunted for on the network, before the good reference was tried, resulting in long, long, delays, like 30 seconds to a minute, each time a page was loaded.

Check this out in ALL your files, and all your file references.

-Troy


> Hello all,
> 
> I'm running a small FX.php app to generate live reports for clients.
> I've got everything more or less working, but performance and
> reliability still escape me.  Pages occasionally take up to 90 seconds
> to load (T1, not dial-up), which I can live with, but it's hardly ideal.
> What is more of an issue is the instances in which pages never load.  I
> have about 7 PHP pages and that all work sometimes.  Some more
> frequently than others.
> 
> But occasionally they all go into a state in which you can wait forever
> for them to load, and nothing happens.  The browser's status bar will
> say we're waiting for the server.  There is one page that seems more
> prone this problem than others, although its code is shorter and simpler
> than the others.  For all the pages, including this one, I got one
> template that worked, and modified it to create the other pages.  So
> most of the code is very, very similar.  And let's not forget that all
> the pages work sometimes.  Sometimes it seems  that the longer I've been
> logged in to the app, the less it works.  But other times, I have the
> problem immediately after logging in, or more rarely while attempting to
> login.  Usually, once one page fails to ever load, no other pages will
> until I logout and log back in.  That's not to say that logging out and
> logging back in fixes it.  Sometimes it does, and sometimes it doesn't.
> The random and intermittent nature of the problem has me looking and
> feeling like an idiot.  From reading other posts on this mailing list, I
> think FX.php has worked better for most of you.  I have some theories
> about where I might be going wrong, and I'd like to share them and see
> which ones you all think are likely, and which are not.
> 
> First some basic stats about my app, database, and infrastructure:
> 
> -All FileMaker components (FMSA, WPE, CWP, FMAPP) are running on a
> single Windows server with Dual 2GHz Opteron CPUs, SATA drives, and a
> gig of RAM, running on our local network.
> 
> -All web components are (PHP, FX.php, HTML, and images) hosted by our
> web host in another state, possibly a shared server, running linux,
> specs unknown
> 
> -Local network has a T1 internet connection, also used by our office's
> client machines (10-20), and a couple other servers
> 
> -The main database is roughly 8GB, about 40,000 records in the largest
> table
> 
> -We have about 10-20 local FMAPP users from 9-5, and I would be
> surprised to see more than 10 concurrent web users (thus far haven't had
> more than 3)
> 
> -My PHP pages have a single FMFind query with 1-5 parameters, a sort
> parameter, and a skip parameter
> 
> To me, the servers and connections seem adequate, and the demands seem
> modest.  Still, I've had a few thoughts:
> 
> -The database file is a bit large, which might cause some trouble.  I
> know it seems to slowdown finds performed in FMPro.
> 
> -The separation of the web server and FileMaker server might be causing
> some problems; especially as our Internet connection is not always the
> greatest.
> 
> -I could be doing something moronic in my FX.php/PHP code.  It wouldn't
> be the first time.
> 
> -I've always secretly believed the Internet was infested with space
> demons bent on world domination, and this could be part of their scheme.
> 
> Also, I can send you a login to witness the issue, or the code to any
> of my pages, upon request.  I just didn't want to publish them to the
> entire planet.
> 
> Jamie Adams



More information about the FX.php_List mailing list