public inbox for [email protected]  
help / color / mirror / Atom feed
Web code ...
2+ messages / 2 participants
[nested] [flat]

* Web code ...
@ 2004-05-10 19:16 Marc G. Fournier <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Marc G. Fournier @ 2004-05-10 19:16 UTC (permalink / raw)
  To: pgsql-www


Our Database server is being pounded right now with >500 connections for
just 186_gborg and 186_pgsql ... figuring to take a quick look at the
code, can someone explain to me a few things?

in /usr/local/www/www.postgresql.org/www/globals.php, there are two
pconnects:

line 220:
  $db = @pg_pconnect($PortalDB);

  if (!$db) {
    header("Location: /unavailable.html\n\n");
    die;
  }

line 263:
$db = @pg_pconnect($GborgDB);

if (!$db)
{
        echo "We are currently experiencing technical difficulies, please
stand by.";
        die();
}

am I missing something, or does the second pconnect overwrite the first?
and, if so, doesn't that then leave a 'dangling' connection, or does it
know better?

Then, in index.php, you do *another* pconnect at line 3:

  $db = pg_pconnect($PortalDB);

and you have it all over the place from what I can tell here:

www# grep pconnect *
bugsub.php:  $db = pg_pconnect($PortalDB);
event-archive.php:  $db = pg_pconnect($PortalDB);
event.php:  $db = pg_pconnect($PortalDB);
globals.php:  $db = @pg_pconnect($PortalDB);
globals.php:$db = @pg_pconnect($GborgDB);
index.php:  $db = pg_pconnect($PortalDB);
mirrors-ftp.php:  $conn = @pg_pconnect($PortalDB);
mirrors-www.php:  $conn = @pg_pconnect($PortalDB);
news-archive.php:  $db = pg_pconnect($PortalDB);
news.php:  $db = pg_pconnect($PortalDB);
submission.php:  $db = pg_pconnect($PortalDB);
survey.php:  $db = pg_pconnect($PortalDB);

why not just one pconnect in global.php that everythign shares?


----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: [email protected]           Yahoo!: yscrappy              ICQ: 7615664




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Web code ...
@ 2004-05-11 09:01 Dave Page <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Page @ 2004-05-11 09:01 UTC (permalink / raw)
  To: Marc G. Fournier <[email protected]>; pgsql-www

 

> -----Original Message-----
> From: Marc G. Fournier [mailto:[email protected]] 
> Sent: 10 May 2004 20:17
> To: [email protected]
> Subject: [pgsql-www] Web code ...
> 
> 
> why not just one pconnect in global.php that everythign shares?
> 

There is now...

Regards, Dave.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-05-11 09:01 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-10 19:16 Web code ... Marc G. Fournier <[email protected]>
2004-05-11 09:01 Re: Web code ... Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox