mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #660] Cron jobs trigger warning about non-standard shutdown of database connection (MySQL) #616
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#616
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @smarek on GitHub (Dec 15, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/660
Running the cronjobs (no matter under what account) triggers warning in syslog, like this
example cronjob definition
Is this known issue, or problem of instance configuration?
I'm not running it in virtualenv or anything special.
@tonioo commented on GitHub (Dec 15, 2014):
Hi,
do you observe this behaviour with every cron job or just this one ?
@smarek commented on GitHub (Dec 15, 2014):
All of them, could this bugreport be related? https://code.djangoproject.com/ticket/21255
@tonioo commented on GitHub (Dec 15, 2014):
Maybe. I already found this issue and the cleanlogs command (the one you mentionned in your exampe) already closes the connection manually so I don't really understand.
@tonioo commented on GitHub (Dec 15, 2014):
What's your distribution? MySQL version?
@smarek commented on GitHub (Dec 16, 2014):
I've just checked the logs, aborted connection warning appears after
logparser,handle_mailbox_operationsandcleanlogs.My distribution is Debian Wheezy 7.7 x86_64, with MariaDB 10.1.2
@tonioo commented on GitHub (Dec 17, 2014):
Can you give me the version of the mysql python driver installed on your environment please ?
@smarek commented on GitHub (Dec 17, 2014):
That would be:
@tonioo commented on GitHub (Dec 17, 2014):
It is not the latest version (https://pypi.python.org/pypi/MySQL-python/1.2.5).
Could you try with a newest version ?
@smarek commented on GitHub (Dec 19, 2014):
Just tested, the same warning appears with 1.2.5 version
@smarek commented on GitHub (Dec 19, 2014):
I probably found the issue, if the script is failing with trace it won't shut down the connection properly
@smarek commented on GitHub (Dec 19, 2014):
Line 333 patched
from:
to:
@smarek commented on GitHub (Dec 19, 2014):
Also
python /{app_path}/manage.py handle_mailbox_operations -v 3 --tracebackis giving no output, just the warning in syslog about not properly shut down db connection@tonioo commented on GitHub (Dec 20, 2014):
It seems you found an issue with the logparser command but it does not fix the database warning...
Have you tried to comment the
db.close_connectionline?@smarek commented on GitHub (Dec 20, 2014):
I've now tried, commenting out the line, does no difference to behavior.
@tonioo commented on GitHub (Dec 21, 2014):
I've tried a fix... Could you please try one more time?
@smarek commented on GitHub (Dec 21, 2014):
Thanks a lot, could you please instruct me how to properly run the git version? Cannot find that in documentation, so I'm stuck with released eggs.
@tonioo commented on GitHub (Dec 21, 2014):
Using pip, try something like this:
(don't forget to load you virtualenv if you use one)
@smarek commented on GitHub (Dec 21, 2014):
Sincerely no, that didn't helped. Warning stays the same.
Thank you for git install instructions.
@tonioo commented on GitHub (Dec 21, 2014):
Hum.. So it seems I can't solve this issue. I'm running MySQL on several instances and I don't see this warning (because it is just a warning: http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html). Maybe a weird problem on Django's side...
Are you sure you have updated the right python files?
@smarek commented on GitHub (Dec 21, 2014):
I'm running MariaDB 5.5 and 10.1 instances.
I've uninstalled modoboa and installed by your instructions, so I assume it is fully updated?
@tonioo commented on GitHub (Dec 21, 2014):
Yes, it seems so...
@tonioo commented on GitHub (Dec 24, 2014):
Have you defined the
CONN_MAX_AGEsetting ?@tonioo commented on GitHub (Dec 24, 2014):
Ok, I can reproduce it now (increasing MySQL log level).
@smarek commented on GitHub (Dec 25, 2014):
I have not, is it necessary, because the connections are dying in seconds from starting the manage.py process.
Great you can reproduce that, i'll be waiting for follow up +1
@tonioo commented on GitHub (Dec 29, 2014):
Could you try this new fix please?
@smarek commented on GitHub (Feb 4, 2015):
I'm sorry it took so long. Yes, the error is now gone, with installing 1.2.0 stable from pypi or github tag.