[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] HELP! PostgreSQL server crashing on my XTR!



"Thomas Clark" <thomas@xxxxxxxxxxxxxxx> wrote:
> I've talked with cobalt support and they tell me that the reason my
> server is crashing is because my php scripts are using a command called
> pgconnect.  Which is buggy with the RAQ XTR server.  I'm running
> Postgres version 7.0.2.  They told me that I needed to switch over my
> php scripts to use pg_connect instead.  They mentioned that it was a
> little slower than pgconnect but it worked.

Thomas, AFAIK there is no PHP function called pgpconnect().  There's
pg_connect() and pg_pconnect().  The latter opens a persistent connection.
My guess is the sites are currently using pg_pconnect().  There is some
tweaking in php.ini and the Apache config files that may help.  The place
I'd start though is with the SQL statements and db design in the sites that
are causing the problem.  Unless the db schema and queries are optimized,
that's where you'll get the biggest bang for the buck in terms of
performance.

> I talked with the programmer that created the sites I have recently
> moved to my server and he said with the amount of traffic that these
> sites where getting they would be so sluggish that the server would be
> under a constant strain.

Has this been verified through testing?  It would be trivial to backup the
sites, then do a search and replace and change all occurrences of
pg_connect() to pg_pconnect() and then test to see.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/