[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#923532: cups-bsd: spool directory fills up



On Sun 03 Mar 2019 at 06:20:10 +0100, Helge Kreutzmann wrote:

> On Sat, Mar 02, 2019 at 01:14:29PM +0000, Brian Potkin wrote:
> > 
> > c (control or history) files and d (document) files. They should get
> > cleared with 'cancel -a -x' but might need to be removed with 'rm'.
> 
> Thanks for the pointer. I usually use "lprm" and always thought that
> removing a job also removes all spool files. I did not know about the
> command cancel, whose name does not lead to beeing printing specific
> (neither starts with cups nor with lp).
> 
> Do you think implying "-x" with with lprm would be a worthwile
> wishlist bug for upstream?

I am unfamiliar with the lprm command so hope I am not misuderstanding
its manual or you. However, my reading of

  https://github.com/apple/cups/issues/1149

leads me to think that such a report would be closed.
 
> > cupsd.conf(5) explains the PreserveJobFiles and PreserveJobHistory
> > directives. If you put "PreserveJobFiles 30" in cupsd.conf, does it
> > work for you?
> 
> Neither are currently explicitly set. But the man page says that
> PreserveJobFiles has a default value of 1 day and PreserveJobHistory
> is yes. Maybe PreserveJobFiles only applies to sucessfully printed
> jobs?

It does indeed. 

> > You may, of course, alter the default PreserveJobHistory value too
> > but are then likely to hit Bug#921741. Knowing how much of Emin Kaya's
> > issue you can replicate would be useful.
> 
> Just to be clear: I should first try out PreserveJobHistory? And after
> a day all spool files should be gone (if it works)?

Not quite.

First clear out /var/spool/cups.

I'd suggest you put "PreserveJobFiles 30" (and other smallish values)
in cupsd.conf, then print and see whether you can have confidence in
the option being functional. My tests indicate it is reliable. In which
case you should not experience the spool directory getting clogged up
in future.

The history files are much smaller, so do not present the same problem
as the document files. You might decide to leave well alone and not do
anything about them.

If you wish to test the PreserveJobHistory option, replace the previous
cupsd.conf entry with "PreserveJobHistory 30" and print. The c file
should be deleted after 30 seconds. My observations do not accord with
what I think the manual is saying.

Basically, I think a suitable value for PreserveJobHistory would be
something for you to consider.

To save on paper/ink/toner make FileDevice in /etc/cups/cups-files "yes"
and set up this queue to use for printing:

  lpadmin -p testq -v file:/dev/null -E -m drv:///sample.drv/generic.ppd

Regards,

Brian.


Reply to: