Subject RE: [firebird-support] Compiling SS for OS X
Author Nigel Weeks
Yes - you can end up with one database process per apache httpd
process...for a highly loaded server, 200 httpd's means 200
firebirds...might start wading into swap.

There's a trick - recycle your apache processes...
in your httpd.conf, there's a setting 'MaxRequestsPerChild'. It's usually
0(infinite), which never recycles child processes.
Change this to 5000 or so - it means pconnects are dropped after a while,
and memory can be freed up.

Tune this to match your situation - you might find limiting the number of
httpd processes it another way of keeping out of swap(don't go too low -
you'll prevent people getting connections at all)

N.

> -----Original Message-----
> From: Alan McDonald [mailto:alan@...]
> Sent: Tuesday, 18 May 2004 4:17 PM
> To: firebird-support@yahoogroups.com
> Subject: RE: [firebird-support] Compiling SS for OS X
>
>
> > PHP can't connection pool properly, with SS or CS - but if
> you're using
> > Apache and Firebird CS, just use persistent connections.
> > PConnect and CS provide a dataset cache for each connection
> running - not
> > quite as good as a single cache(ala SS), but better that no
> cache, and it
> > scales far better than SS can anyway.
> > (SQLRelay can connection pool in between PHP and Firebird, but the
> > difference didn't really make it worth the hassle)
> >
> > It takes 7 lines of PHP to do a query over a persistent connection:
> > <?php
> > $conn =
> > ibase_pconnect("server:/path/to/database.fdb","sysdba","masterkey");
> > $sql = "select 'Hi There!' as greeting from rdb\$database";
> > $rec = ibase_query($sql);
> > $obj = ibase_fetch_object($rec);
> > echo "Greeting from database is:".$obj->GREETING;
> > ?>
> >
> > Easy, and the connection is still open for the next connection.
> > CS and pconnects produce extremely fast webapps - be prepared!
> >
> > N.
>
> Just remember to keep your eyes on the server memory use. pconnect is
> notorious for obtaining a new connection and not utilising
> existing ones
> recently let go. You get a build up of unused connections in the pool.
> Alan
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Yahoo! Domains - Claim yours for only $14.70
> http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/67folB/TM
> --------------------------------------------------------------
> -------~->
>
>
> Yahoo! Groups Links
>
>
>
>
>
>