Results 1 to 3 of 3

Thread: cron running away...

  1. #1
    GaryWayneSmith is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Default cron running away...

    I setup the crontab as show in the samples. We created a general group accout to pull email from one of our contact feedback user accounts, 10k messages. The job starts, run's 60 seconds, then another one starts, runs 60 seconds, then another, etc... We had 10+ of them going at the same time. Each one was downloading duplicate messages.

    As a temp work around, I disabled cron, deleted all of the emails (from emails and emails_users), set php execution time to 24 hours and then ran the job. The problem is the bandwidth flutuates between 10mb to 1mb (pulling from a remote source).

    My question is how to prevent this race condition in the future. Let's say, the inbox receives email enough that requires the cron to pull it over a period of more than 60 seconds. Is there a way to prevent this?

    Version 4.5.1e (Build 1049)

  2. #2
    agupta is offline Sugar Team Member
    Join Date
    May 2005
    Posts
    142

    Default Re: cron running away...

    Gary,

    You should change the frequency of the job that reads inbound emails. the default frequency is 'as often as possible'. You can do this from the admin panel.

    go to - admin->scheduler
    Find 'check inbound mailboxes' job
    change the job frequency to a higher value..


    -Ajay

    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  3. #3
    GaryWayneSmith is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Default Re: cron running away...

    I understand, but the problem is I would have to set it for some arbitrary large amount of time because it might take a long time to clear out the account across the wire.

    But this problem is almost secondary. This wouldn't be too much of an issue except that it keeps pulling duplicates. This is a bigger problem. If it wasn't for the duplicates, I wouldn't care because only one thread should be able to pull a message at a time. If Exchange would lock POP3 correctly in accordance with the RFC's then the additional instances would be deadlocked so this wouldn't matter, but it does in this case.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 2007-08-07, 07:22 PM
  2. Error running cron - connecting to mysql
    By rogersugarsugar in forum Installation and Upgrade Help
    Replies: 3
    Last Post: 2007-07-23, 01:33 PM
  3. Cron failing on server
    By rickcrites in forum Help
    Replies: 0
    Last Post: 2006-12-03, 04:34 AM
  4. Inbox poller scheduler stops running
    By trueblade in forum Help
    Replies: 4
    Last Post: 2006-05-21, 11:47 PM
  5. Cron Jobs for newb's
    By MidNiteRaver in forum Help
    Replies: 1
    Last Post: 2005-07-20, 04:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •