Re: Long running queries and timeouts - Mailing list pgsql-php

From Francisco Reyes
Subject Re: Long running queries and timeouts
Date
Msg-id 20020120105039.V32376-100000@zoraida.natserv.net
Whole thread Raw
In response to Re: Long running queries and timeouts  (Chadwick Rolfs <cmr@shell.gis.net>)
Responses Re: Long running queries and timeouts
List pgsql-php
On Sat, 19 Jan 2002, Chadwick Rolfs wrote:

> On Sat, 19 Jan 2002, Francisco Reyes wrote:
>
> > New to the PHP/PostgreSQL combo.
> > I have a couple of queries which take a few minutes to run and we are
> > getting timeouts. Didn't find anything usefull on the archives.
> >
> > How are you handling long running queries on your PHP?
> >
> You can always use persistent connections.  It's not a good idea to use
> too many, or you will be denied access to Postgres any other way, but it's
> a quick fix for the short run.
>
> Long run and responsibility includes using an array, or an object to
> retrieve data.  You can always split queries up into many small queries.
> We'll need a little more information to help you with that, though.  Like
> what the code is...what your php.ini file and httpd.conf file says about
> connection timeouts...  maybe more ??-- like what you've read on php.net's
> docs...

Thanks for the info/pointers. The issue is basically a query that takes
several minutes to run. I look/read about persistent connections and I
don't think that has anything to do with the problem. I believe the
timeout is probably at the web server.

After someone suggested I looked at "set_time_limit" I found that such
function doesn't account for DBconnection time. Afer reading that and your
suggestion to read httpd.conf I am starting to think that the likely place
of the timeout is the web server.

Will play with the settings on httpd.conf

I wonder how sites that display an update while the long query is running
do it. I have seen sites that display something like "retrieving info..
please wait" and then right before the info comes up the waiting text
dissapears. Is that Javascript? Flash? I can't imagine how that could be
done with plain html.


pgsql-php by date:

Previous
From: Francisco Reyes
Date:
Subject: Re: Long running queries and timeouts
Next
From: Francisco Reyes
Date:
Subject: PHP Abstraction layers