From: | Francisco Reyes <lists(at)natserv(dot)com> |
---|---|
To: | Chadwick Rolfs <cmr(at)shell(dot)gis(dot)net> |
Cc: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: Long running queries and timeouts |
Date: | 2002-01-20 15:56:03 |
Message-ID: | 20020120105039.V32376-100000@zoraida.natserv.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tim Barnard | 2002-01-20 18:57:36 | Re: Clarification question |
Previous Message | Francisco Reyes | 2002-01-20 15:50:24 | Re: Long running queries and timeouts |
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Reyes | 2002-01-20 16:39:21 | PHP Abstraction layers |
Previous Message | Francisco Reyes | 2002-01-20 15:50:24 | Re: Long running queries and timeouts |