openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #25524
[Bug 1228421] [NEW] Fetchmail breaks cron transaction policy
Public bug reported:
Fetchmail module installs a method to process mail messages from
incoming mail servers.
This method is called by ir.cron periodically. ir.cron uses a db locking
strategy on cron job record to prevent simoultaneous call by multiple
workers threads on the same job.
Fetchmail cron method receives the cursor from cron and reuses it making
a cr.commit on each received message, thus breaking the lock policy of
to prevent simoultaneous execution. The net effect is that fetchmail is
called several times when message collecting from input mail servers
takes longer than the interval between cron calls (60 seconds)(a common
situation when the server is configured with slow mail services). In my
cases this process ends up with stalled cron fetchamail process, and
thus NO MAIL WAS COLLECTED unless you manually reset the server
The solution is to use a separate cursor to process incoming messages
I have tested this situation on v6.1, but looking the code it is exactly the same in v7.0
Attached you will see a patch for v6.1, and I guess it is the same for v7.0
** Affects: openobject-addons
Importance: Undecided
Status: New
** Patch added: "fetchmail_clean_per_message_transaction.diff"
https://bugs.launchpad.net/bugs/1228421/+attachment/3832513/+files/fetchmail_clean_per_message_transaction.diff
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1228421
Title:
Fetchmail breaks cron transaction policy
Status in OpenERP Addons (modules):
New
Bug description:
Fetchmail module installs a method to process mail messages from
incoming mail servers.
This method is called by ir.cron periodically. ir.cron uses a db
locking strategy on cron job record to prevent simoultaneous call by
multiple workers threads on the same job.
Fetchmail cron method receives the cursor from cron and reuses it
making a cr.commit on each received message, thus breaking the lock
policy of to prevent simoultaneous execution. The net effect is that
fetchmail is called several times when message collecting from input
mail servers takes longer than the interval between cron calls (60
seconds)(a common situation when the server is configured with slow
mail services). In my cases this process ends up with stalled cron
fetchamail process, and thus NO MAIL WAS COLLECTED unless you manually
reset the server
The solution is to use a separate cursor to process incoming messages
I have tested this situation on v6.1, but looking the code it is exactly the same in v7.0
Attached you will see a patch for v6.1, and I guess it is the same for v7.0
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1228421/+subscriptions
Follow ups
References