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@postgresql.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@gis.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*--