[Dbix-class] [Fwd: what is the relationship between nubmer of dbh and concurrent web user in catalyst?]

fayland fayland at gmail.com
Mon Sep 11 13:00:01 CEST 2006


forward a question of my college. bet someone can help. Thanks.

-------- Original Message --------
Subject: 	what is the relationship between nubmer of dbh and concurrent 
web user in catalyst?
Date: 	Mon, 11 Sep 2006 18:55:47 +0800
From: 	chylli <lcypublic at gmail.com>
Reply-To: 	lcypublic at gmail.com
To: 	fayland at gmail.com



Hi,all
We have an app and use dbic in catalyst. App will initialize every
dbic when apache startup. 

My question is , if we have many users at
the same time, say, 1000 users view our web, will apache create new
sub process and init all dbics again ? How many connections with mysql
will it create? Are there a formula between number of connection with
mysql and concurrent users ?

I remember it seems that every five sub process ( thread ?) share one
dbh in mod_perl, but I'm not sure. Can anyone give me a more accurate
formula ?

In apache manual, it is said that when you use Apache::DBI before any
thing like DBI, you can get persistent connection to mysql. But I'm
not using Apache::DBI and it seems like I got persistent connection
because there are lots of connection even there are very few users.
How should I get non-persistent connection? And, I have several
database and want to make persistent connection on some dbs and
non-persistent connection on others. What should I do ?




-- 

Thanks & Regards

Chylli




More information about the Dbix-class mailing list