Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple values of document-format-default in CUPS-Get-Printers response #2836

Closed
michaelrsweet opened this issue May 27, 2008 · 9 comments
Closed

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.3.7
CUPS.org User: gparessant

Our 2 central cups servers (more than 400 printers) becomes slower so we need to restart cups 2-3 times a days.
A trace of CUPS-Get-Printers Request shows many values of document-format-default for each printer, always increasing...
I type this :
strace -s 2500 -fv -o /tmp/strace13 lpstat -p hn03ap

For the CUPS-Get-Printers with requested-attributes including "printer-defaults", the response is :
recv(3,"\1\1\0\0\0\0\0\1\1G\0\22attributes-charset\0\5utf-8H\0\33attributes-natural-language\0\2en\4"\0\31printer-is-accepting-jobs
\0\1\1"\0\21printer-is-shared\0\1\0#\0\rprinter-state\0\4\0\0\0\3!\0\31...
...orientation-requested-default\0\0I\0\27document-format-default\0\30application/octet-streamI\0\27document-format-default\0\30application/octet-stream...

The number of document-format-default increase so much (more than 3000) that the cups server becomes too slow.
I don't reproduce the problem on a test machine...
Can you help me ?
Thanks

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

How often are you restarting or reconfiguring printers?

Can you provide a copy of your cupsd.conf, printers.conf, and error_log files?

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: gparessant

I send you the conf files and yesterday's log
I restart cups in debug mode between 10:40 AM and 11:00, so error_log is quite big...
Thanks

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: gparessant

Sorry, I forget your first question...
I don't know if the users restart printers often, but we don't.
We add or reconfigure printers not often, perhaps twice a week.
But we must restart cupsd 2 or 3 times each day to keep it working...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: gparessant

I forget an important point : we use the browsing facility.
We have 5 distant sites and they manage themselves their printers.
The central server get the distant printers via cups browsing.
I will verify on the distant servers the configuration and log.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: rojon

We have the same problem, probably this is also linked to STR#2755.
Everytime a printer is modified, an additional "document-format-default"-line is added to the each get-printer-attribute response for all printers configured on the system. This is also true if you add printers. After an restart the number of reported document-format-default lines is null.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: rojon

Suggested patch:
--- scheduler/printers.c(rev 7617)
+++ scheduler/printers.c
@@ -3326,7 +3326,7 @@ add_printer_defaults(cupsd_printer_t *p)
1);

if (!cupsGetOption("document-format", p->num_options, p->options))

  • ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
  • ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
    "document-format-default", NULL, "application/octet-stream");

if (!cupsGetOption("job-hold-until", p->num_options, p->options))

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: gparessant

I apply your patch, now it works fine !
Thanks for your intervention !

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"str2836.patch":

Index: scheduler/printers.c

--- scheduler/printers.c (revision 7622)
+++ scheduler/printers.c (working copy)
@@ -3757,7 +3757,7 @@
1);

if (!cupsGetOption("document-format", p->num_options, p->options))

  • ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
  • ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
    "document-format-default", NULL, "application/octet-stream");

if (!cupsGetOption("job-hold-until", p->num_options, p->options))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant