Hi list,
I just write a small C::A script which used C::A::Plugin::DBH,
I just use $self->dbh_config(dsn, user, pass); in cgiapp_init(),
and the script runs as fastcgi on apache with C::A::Dispatch,

but when I use ab to benchmark the script,
the db connection seems not be cached:

mysql> show processlist;
+------+------+-----------+-----------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+------+-----------+-----------+---------+------+-------+------------------+
| 2119 | root | localhost | NULL | Query | 0 | NULL | show processlist |
| 2461 | root | localhost | joke | Sleep | 0 | | NULL |
+------+------+-----------+-----------+---------+------+-------+------------------+
2 rows in set (0.00 sec)

mysql> show processlist;
+------+------+-----------+-----------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+------+-----------+-----------+---------+------+-------+------------------+
| 2119 | root | localhost | NULL | Query | 0 | NULL | show processlist |
| 2780 | root | localhost | joke | Sleep | 0 | | NULL |
+------+------+-----------+-----------+---------+------+-------+------------------+
2 rows in set (0.00 sec)

the different process_id (2461, 2780) means they are two different
connections ?




and the same question on C::A::plugin::Config::Simple, I use it in
cgiapp_init() by
$self->config_file(file_name);

can this cache the config object ?


thanks!

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to