Hi Simon,

Reducing the number of connections to the database from three to one will reduce the responsiveness and will definitely hurt when trying to debug issues (performance, etc). My recommendation is that each application have at least one unique connection to the database.

jason


On 09/07/2010 12:59 PM, Simon Miner wrote:
Hi,

I am running 3 separate Catalyst (version '5.80022) apps that use a common (Oracle 11g) database. Each app has a model class which wraps around a common DBIC schema class, like so.

-----

package App1::Model::DB;

use strict;

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(

schema_class => Common::DB::Schema',

);

1;


-----

package App2::Model::DB;

use strict;

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(

schema_class => Common::DB::Schema',

);

1;

-----

package App3::Model::DB;

use strict;

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(

schema_class => Common::DB::Schema',

);

1;

-----

This setup passes changes to the Common::DB::Schema class on to the Catalyst app model classes.

All three of these apps run under a single Apache 1.3.42/mod_perl 1.31 server. It appears that each server process creates a unique database connection variable for each of these apps. Although these database connections get reused from request to request, I would like to make things even more efficient by having a single database connection variable per server process which gets shared across all 3 Catalyst apps. How do I update my model to accomplish this?

Thanks.


--
-- Simon


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to