On 10/30/07, Atilla <[EMAIL PROTECTED]> wrote:
>
> I have those settings set in my .ini file:
>
> sqlalchemy.echo = True
> sqlalchemy.echo_pool = True
> sqlalchemy.default.pool_recycle = 1
>
> And my timeout in mysql is set to 36000.
>
> However i still seem to get 'MySQL server has gone away' errors, which
> is totally weird and I'm not sure what else could be wrong. Has anyone
> else experienced this? Isn't this the correct setting to handle it in
> pylons? Oh, also - I don't seem to get any echo messages either. Are
> they supposed to be showing up in the console where the server is
> started?

I assume you're using SQLAlchemy 0.4 and following "SQLAlchemy 0.4 for
people in a hurry"
http://wiki.pylonshq.com/display/pylonscookbook/SQLAlchemy+0.4+for+people+in+a+hurry

Your prefix should either be "sqlalchemy." or "sqlalchemy.default." --
not both.  The prefix must match the second argument to
sqlalchemy.engine_from_config in your config/environment.py.

That will take care of any options SQLAlchemy is not getting.  If that
doesn't solve it, Pylons 0.9.6 changed the default logging
configuration, so it may be suppressing the SQLAlchemy messages.  In
that case, set both echo options to false (!), go down to the
[logger_root] section in your config file and change 'level = INFO' to
'level = DEBUG'.  That's the quick & dirty way.  The proper way is to
add sections for the SQLAlchemy loggers. You'll have to look up the
logger names in the SQLAlchemy manual, then enable them this way:

[logger_sqlalchemy.echo]
level = DEBUG
handlers =
qualname = sqlalchemy.echo

[loggers]
keys = root, sqlalchemy

This would enable a logger 'sqlalchemy.echo' at the debug level.  But
as I said, I don't know the correct logger name.  'handlers' is blank
because we're letting the root logger take care of handling
(outputting) all messages.

If you're using SQLAlchemy 0.3 and SAContext, I believe the
"sqlalchemy.default." prefix is required.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to