Subject RE: [firebird-php] Firebird process takes 100% of one CPU core
Author Nigel Weeks
Yep, this really sounds like sweeps are occuring.

What kind of transactions occur? What (mainly) do your queries perform?
Is your DB doing a lot of rollbacks, and thusly, a lot of unwanted records
are needed to be swept away?

Definitely use CS and ibase_pconnect's - you'll use more ram, but you'll
save on the overhead of connecting to the DB, and, if a sweep occurs, it
will impact the DB less than if you were using SS.
Also, by using pconnects, you'll build up a cache of records in each
fb_inet_server process, keeping speeds high.

And thirdly, tune the httpd.conf parameter: MaxRequestsPerChild to about
1000. Although this is traditionally for preventing memory leaks on poorly
writted libraries, it's also great for routinely closing persistent database
connections, allowing your server to breathe when the loads back off a bit,
as not all HTTP requests will be for database operations (plain html,
images, scripts, etc)

Also, caching your pages(as already suggested) is a REALLY good idea. Take a
look at something I'm working on that has built in caching. You'll notice
at the bottom of the screen is a hits/sec indicator that also says if it's
coming from DB or Disk

If the cache file is 5 seconds or older, the page is rendered from DB(using
queries, etc), and the cache file is updated.
If it's newer than 5, it's simply pulled off disk.

Don't judge me on the appearance, I'm still working on the engine! ;-)


-----Original Message-----
From: [] On
Behalf Of rizekj@...
Sent: Tuesday, 27 February 2007 8:26 PM
Subject: [firebird-php] Firebird process takes 100% of one CPU core

Hi to all, we have a problem with the application running on Apache 2 + PHP
+ Firebird
Sometimes, it happens that one of the Firebird process takes 100% of one CPU
core and after that Firebird doesn?t accept any other connection and we must
kill the FB process manually. We have tested it with FB 1.5, CS, SS and
there occurs this problem too. The interval between these events is shorter
when the database goes bigger (at this time is about 600MB). Our web site
has about 200 hit/sec in its peak and this generates about 2000 simple db
queries per sec.
Does anybody know what can cause this situation?


------------------------ Yahoo! Groups Sponsor --------------------~-->
Something is new at Yahoo! Groups. Check out the enhanced email design.

Yahoo! Groups Links

__________ NOD32 2082 (20070226) Information __________

This message was checked by NOD32 antivirus system.