Re: Long running queries and timeouts

From: Chadwick Rolfs <cmr(at)shell(dot)gis(dot)net>
To: Francisco Reyes <lists(at)natserv(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Long running queries and timeouts
Date: 2002-01-19 17:32:46
Message-ID: Pine.SOL.3.96.1020119122652.18364B-100000@shell.gis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-php

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?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
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...

When new programmers here where I work started using php/postgresql 6
months ago, they used pconnect in EVERY one of their scripts, filled up
the server, and were unable to connect. No one was able to. They didn't
know what they did, and it took a little reading to figure out that Apache
needs to be restarted, NOT postgres. Don't kill -9 the postmaster.
Regards,

Chadwick Rolfs - cmr(at)gis(dot)net
Cleveland State University - Student
Music Major - The Holden Arboretum Volunteer
Computer Programmer - Student Employee
--*I finally found powdered water;
I just can't figure out what to add to it*--

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank Bax 2002-01-19 17:42:34 Re: Long running queries and timeouts
Previous Message Francisco Reyes 2002-01-19 16:48:40 Long running queries and timeouts

Browse pgsql-php by date

  From Date Subject
Next Message Frank Bax 2002-01-19 17:42:34 Re: Long running queries and timeouts
Previous Message Francisco Reyes 2002-01-19 16:48:40 Long running queries and timeouts