BrowseTimeout and BrowsePoll. BrowseTimeout value IGNORED!

Jason Czerak jason at czerak.com
Sun Dec 26 19:14:59 PST 2010


> > I've upgraded to 1.4.5.
> >
> > Is BrowseTimeout ignored with BrowsePoll?  If I bump browseinterval up to 60, it complains in the logs about browsetimeout. appears to double browseinterval automaticly. This makes sense. if I set the values to 60 and 120, no logs about the mismatch.
> >
> > But when I configured BrowseTimeout to something like 1200, it's ignored. after 2 BrowsePoll checks that fail, the queue disappears on the client.
> >
> > My goal here is to ensure the local queue's do not delete and queue data if both CUPS servers drop off line for some reason. I'm looking to expend this timeout to maybe 24 hours or something.
> >
> > I still want updates and changes to queue to be every 30 seconds or so.
>
>
> I've even simulated a network, not just a service outage by pulling virutal cables.   the queue still disappears after 2* the browseinterval.
>
> I suppose it's time to dive into the source.  I have not tested this with in the subnet using the the browseaddress functionality. I need to cross subnets so I figured I wouldn't waste my time on that.
>
> Searching back in the list. Folks had this problem 3-4 years ago and it doesn't looks like it was ever fixed properly back then.
>
>

After studying the code for a while I think I have figured out why browsetimeout is ignored


cups-polld.c:

 snprintf(packet, sizeof(packet),
               "%x %x %s \"%s\" \"%s\" \"%s\" lease-duration=%d%s\n",
               type, state, uri, location, info, make_model, interval * 2,
               job_sheets);


cups-polld daemon as you all know is the process that is just a glorified relay.   the lease-duration is forced to be twice that of the interval. If I change this to "10000" the remote.cache file receives the correct value and the local queue acts as I would expect while both CUPS HA-paired nodes are down. It stays open and available on the clients.

Now, I'm still not sure how to approach the fix.  Maybe I should transition this topic to the developer list as it's not solvable with out code changes.

1. Quick fix is to edit the code, compile distribute.
2. Get BrowseTimeout value pushed into this call? Client side override?
3. relay this last value from the server to the client?









More information about the cups mailing list