FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at

Posts by Fog Creek Employees are marked:

Release Notes
Network Status

Chanage pop3 pulling interval (the saga...)

We're "new users" of Fogbugz 4 and experiencing a very “disturbing” situation - our Fogbugz system is checking mail every ~15 seconds, what causes unnecessary load over our mail server (and over the network of course).
I found a discussion dealing with this issue but no actual solution was raised.

Can you please provide a solution for changing the mail pulling interval to 5 minutes interval?
Yaron Send private email
Tuesday, March 29, 2005
I did exactly this by editing singleHeartBeat.asp around line 22. I replaced the heartbeat code block with this:

    ' Handle Heartbeat Tasks
    If DateDiff("s",getAppVar("dtLastMailCheck"), Now()) > 300 Or getAppVar("dtLastMailCheck") = "" Then
        Dim hr: Set hr = New CHeartbeatTask
        sError = "": sURL = ""
        hr.PerformTask sError, sURL

        setAppVar "dtLastMailCheck", Now()

        If Len(sError) > 0 Then
            cn.AddNotification FB_NOTIFICATION_MAINTENANCE, sError, sURL
            bMoreWork = bMoreWork Or hr.IsMoreWork()
        End If
    End If

For completeness I then changed line 907 of lang.asp to this to reflect the change in the UI:

    Const FB_MAILBOX_CHECK_INFO = "FogBugz will check for new mail every 5 minutes."
John C Send private email
Tuesday, March 29, 2005
Thx a lot john.

That sure solved the problem.
Yaron Send private email
Tuesday, March 29, 2005
This should be a setting in the app.... crazy to have to mod code to get control over this....
Woofster Send private email
Wednesday, March 30, 2005
I've been playing with this, and it seems that your method will only get a single email every 5 minutes. I modified mine to be 1 minute, and well thats not good. What I wanted is to pull in all email that way during those minutes, things still get processed. So, I added your logic, then also changed the following (starting line 48) in the file CHeartbeatTask.asp

For Each ixMailbox In rgMailboxes
    sTmpError = ""

    While (cd.GetOneMessage( ixMailbox, sTmpError, sURL ) > 0)
        sError = sError & sTmpError

What this does is pull in all email messages from each mail box everytime it executes. Then, at the same time, the MailQueue gets filled up and emails are sent out regularly. I've also bumped mine back up to 5 minute interval, and it works great!

I also modified line 64 of singleHeartbeat.asp to modify cMaxMailMessages to be a hardcoded 10, since I couldn't find where that variable was being set. This then allows it to send out chunks of 10 emails at a time, thus improving the experience when a large number of emails come in constantly.

All of the above changes makes it a very good experience now! FogBugz staff - are you planning on something like this for the future?
Matt Hawley Send private email
Wednesday, March 30, 2005
Oh yes, I probably should have mentioned that! :-)

I believe it's on their list according to this:
John C Send private email
Wednesday, March 30, 2005
When is this going to get fixed by Fog Creek?

I am really hesitant to mod the sources, but I MUST be able to control how often it checks mail.....

Woofster Send private email
Thursday, March 31, 2005

As it was stated in the previous posts' link, it won't be making the cut anytime soon. Just make a backup of the source prior to modding it. If you follow our suggestions, you can do it yourself!
Matt Hawley Send private email
Thursday, March 31, 2005

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.