[Catalyst] Apache <-> DB-Problem

Florian Rossol rossol at yola.in-berlin.de
Sun Nov 6 11:33:14 CET 2005


Hi list,

I have no idea if this is a catalyst or a mod_perl/Class::DBI problem,
so please excuse me if this is not catalyst related.

I have built a littel catalyst-application: only one PostgreSQL-table
with three columns: id (int), name (text), content (text). Here the
CDBI.pm-file:

---(snipp)---
package app::M::CDBI;

use strict;

use base 'Catalyst::Model::CDBI';

__PACKAGE__->config(
    dsn           => 'dbi:Pg:dbname=app',
    user          => 'user',
    password      => 'password',
    additional_classes => [
             qw/Class::DBI::AbstractSearch Class::DBI::Plugin::AbstractCount
                           Class::DBI::Plugin::Pager Class::DBI::FromForm/
    ],
    options       => { AutoCommit => 1},
    relationships => 1,
);
---(snapp)---

My Controller is made with the Mason Helper for Scaffolding (I use
Mason-templates), so I can add, delete, modify and view entries in the
table.

With the standalone HTTP-server, which comes with catalyst everything
runs fine, but with apache (1.3) with mod_perl the following error
appears:

When I edit the same entry in the table serveral times, after some
time in the view and edit-page appears randomly older versions of the
entry. At this time I checked the DB, but in the table in the DB the
entry was correct at the newest version, so there is no error during
writing the modified version to the DB.

I guess this has something to do with the apache-childs: Some childs
serve older Versions of the entries, without reading the entry from
the DB before serving. How can I force every child to read the entries
from the DB before serving a view or edit page? Or is this a problem
related to the Mason-templates?

Thanks

Florian

       



More information about the Catalyst mailing list