[FX.php List] Approach to replacing a large set of records from one FMP file to another

Bob Patin bob at patin.com
Mon Apr 22 14:48:20 MDT 2013


Steve touched on what I was thinking; rather than try to re-invent what other guys have sweated over, I would probably advise my client to look at something like SyncDeK or the 360 sync solution, which is perfect for certain situations.

However, SyncDeK is a sync tool, not so much an import tool... not sure how I'd use it for what you're needing... if you delete in one DB it's going to do the same delete in the other, so it's probably not going to do what you need--although I bet it'd do it if I knew how to configure it for htat sort of thing. It's a pretty powerful system.

BP

Bob Patin
Longterm Solutions LLC
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
Twitter: bobpatin
AIM: longterm1954
iChat: bobpatin
--
Expert FileMaker Consulting 
FileMaker Hosting for all versions of FileMaker

On Apr 22, 2013, at 12:31 PM, Jonathan Schwartz <jschwartz at exit445.com> wrote:

> Hi folks,
> 
> I currently have a FMP API web publishing system the pulls records from a master FMP db.  Up until now, I have used native scripted FileMaker imports (FMP to FMP) to move records between the dbs.   For a variety of reasons, I would like to use php to perform the imports.  My first attempt at the task was to execute the following steps. In this case, the task is to replace all the web publishing records in the remote system with records from the master (master --> remote). In this case, the data set is 800 records but I have other files which contains 30,000 records.
> 
> 1) Find all current records in remote via PHP
> 2) Create a PHP array containing all RecIDs (for later deletion)
> 3) Perform PHP find on master
> 4) Execute PHP loop to add records one at a time to remote (remote now contains both old and new records)
> 5) Loop through RecID array and delete old remote records one at a time, using PHP.
> 
> When complete, the remote db would theoretically contain only the new records.
> 
> In reality, the process is failing during the Delete loop, producing an HTTP  500 error with message: The FastCGI process exceeded configured activity timeout after about 60 seconds.  Apparently, this is different than the regular PHP max_execution_time, which is already set for 300 seconds. Environment is Windows Server 2008 R2.
> 
> My questions:
> 
> Is this the right way to deal with mass addition and deletion of records between db's using PHP?  I can already see that failure creates a mess...which is now exposed to production.  Perhaps a different method would ensure transactional integrity.
> 
> Does anyone know how to solve this FastCGI error?
> 
> 
> Thanks!
> 
> 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> www.exit445.com
> cell: 415-370-5011
> 
> Jonathan Schwartz
> jschwartz at exit445.com
> 
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list