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

Dan Browning interchange-users@icdevgroup.org
Mon Sep 23 16:01:02 2002


At 03:42 PM 9/23/2002 -0400, you wrote:
>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 
>minutes) but when it gets to the last item in the table, it just loops 
>around and starts importing from the beginning.  There are no errors in 
>icdebug, or the other error logs, including httpd.  Meanwhile, the browser 
>returns with "Document contained no data".  No other users are able to 
>access the site while postgres is in this loop, as ic doesn't 
>respond.  The really weird thing is that it imports the new db correctly 
>each time!
>
>When I restart postgres and interchange everything back to normal, and the 
>items are all correctly updated.
>
>I've tried recompiling the cgi (vlink), tried switching to 
>mod_interchange, vacuuming the DB, dropping the table, and recreating it 
>from the text file (which works fine BTW)

Sounds like a real doozy.  Perhaps you could try 4.9 version of the 
code/UI_tags/import_tables file from CVS and see if that helps any.  Mike 
helped me upgrade it to set_slice() a while back, which drastically 
improves performance.  However, when I had problems with it, IC never 
stopped responding to requests while in RPC mode, even when it took 30 
minutes to import a file.

Also, if it's an option for you, try disabling PgSQL fsync 
(postgresql.conf: fsync = false).  Also, you can try enabling SQL query 
logging in PostgreSQL, and perhaps some of the debugging statements in 
import_tables as well.

HTH,

--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies      <dan.browning@kavod.com> |
| (360) 882-7872 x7, 6700 NE 162nd Ave, Suite 210, Vancouver, WA |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
Misery no longer loves company.  Nowadays it insists on it.
                 -- Russell Baker