[Catalyst] MySQL server has gone away
Jeff Chimene
jchimene at gmail.com
Sat Apr 28 04:02:04 GMT 2007
Oleg Pronin wrote:
> If you don't need transaction you don't use it. This is not we talking
> about. To use transaction or not in every case is a high-level logic
> decision
I disagree. That /is/ what we are talking about - unless MySQL cannot
tell you that the database connection has evaporated while in
transaction context. I don't know MySQL well enough in this instance to
say for certain that transaction context will address this issue. In a
well-designed RDBMS, a transaction will report "failure" if, while in
the context of a transaction, any statement fails. In that case, the
entire transaction which may consist of several prepare/execute
operations that can be rolled back and retried.
Transactions are /precisely/ the mechanism to determine, at a high
level, when a certain operation has failed.
>
> 2007/4/27, Jeff Chimene <jchimene at gmail.com <mailto:jchimene at gmail.com>>:
>
> Oleg Pronin wrote:
> > One can say that it is a very rare situation. I can tell you that in
> > production environment (about 1.000.000 hits per day) it happens
> every
> > day several times. Some users just see an error, some lost their
> data.
> > This is just not always visible to you.
> The OP may find a requirement to incorporate a transaction model
> (explicit start txn/commit/rollback) to solve this problem in MySQL;
> which is what they'd have to do for Oracle or Postgres or Rdb. I'd
> hope
> that MySQL reports a transaction failure when the database connection
> evaporates. This would allow a retry on the failed transaction.
> However,
> it may be that the Catalyst Controller / View design/implementation is
> only what would ordinarily be flat file accesses that use SQL
> instead of
> keyed-access flat files. If that's the case, wrapping a transaction
> around each of these SQL prepare/execute pairs will be a substantial
> performance hit.
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org <mailto:Catalyst at lists.rawmode.org>
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
More information about the Catalyst
mailing list