[ic] pgsql loops when importing products via the Admin Interface.

Mike Heins interchange-users@icdevgroup.org
Mon Sep 23 15:56:01 2002


Quoting Brian Kosick (briank@nacs.net):
> Hello All,
>          I have this really strange problems, that only occurs when I'm 
> trying to import a new text file through the UI.  Here's my setup
> RH7.3 SMP 4-Way(latest updates)
> perl 5.6.1
> IC 4.8.6-1 (rpm'ed)
>    rpc (it behaves the same in low or high also)
>    MaxServers          0
>    PreFork             Yes
>    StartServers        12
>    MaxRequestsPerChild 100
>    HouseKeeping        2
>    PIDcheck            600
> Bundle::InterchangeKitchenSink (via CPAN)
> 
> When I upload a new products.txt via the admin UI, I'll watch the pgsql 
> log.  Not only does it take a long time to upload (1,200 items in 7 

Postgres import for a large number of items in 4.8.6 is problematical
because we don't turn off AutoCommit.

If you add:

    [flag type=transactions table=products]

before the call to [import-fields ...], and

    [flag type=commit table=products]

after the call, you should see a marked improvement (an order of magnitude or
more).

In 4.9.1, Dan Browning improved the import-fields tag as well, cutting
the number of updates by an order of magnitude or more.

As with many things that I pass along, I only know about them because one
of my clients paid to get me to solve this for them. I am grateful for
my clients, and many of you should be too. 8-)

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Friends don't let friends use Outlook. -- Bob Blaylock