Bug 996664 - web interface for 'add printer' does not allow backend enough time for discovery
web interface for 'add printer' does not allow backend enough time for discovery
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-13 12:02 EDT by David Woodhouse
Modified: 2013-10-14 13:16 EDT (History)
2 users (show)

See Also:
Fixed In Version: cups-1.6.4-2.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-14 03:12:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Woodhouse 2013-08-13 12:02:38 EDT
It takes a little over five seconds for the back end to discover printers for me.

When clicking 'Add Printer' at http://localhost:631/admin/ the page loads in five seconds. I *sometimes* see my printers, if I'm lucky. But isn't the timeout supposed to be ten seconds? How can I change it?
Comment 1 Tim Waugh 2013-08-14 06:55:11 EDT
This was changed upstream by this commit:

commit a36dc4843b4d370e623e0ebe64b7a747bd65b70b
Author: mike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Date:   Fri Mar 4 17:50:45 2011 +0000

    Reduce printer discovery time to 5 second to prevent "web page is hung" bugs.
    
    
    git-svn-id: http://svn.easysw.com/public/cups/trunk@9576 7a7537e8-13f0-0310-91df-b6672ffda945

diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index 1bfd075..81600d4 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -1026,7 +1026,7 @@ do_am_printer(http_t *http,		/* I - HTTP connection */
     fputs("DEBUG: Getting list of devices...\n", stderr);
 
     current_device = 0;
-    if (cupsGetDevices(http, 30, CUPS_INCLUDE_ALL, CUPS_EXCLUDE_NONE,
+    if (cupsGetDevices(http, 5, CUPS_INCLUDE_ALL, CUPS_EXCLUDE_NONE,
                        (cups_device_cb_t)choose_device_cb,
 		       (void *)title) == IPP_OK)
     {
Comment 2 David Woodhouse 2013-08-14 07:10:17 EDT
Hm, not configurable?

The ideal solution probably involves JavaScript and an asynchronous loading of the discovery results, but right now I'd settle for *6* seconds instead of 5 for my users and that would mostly fix it.

Or perhaps I can try to learn about python threading and parallelise the two database connections and all the SNMP probing in my discovery backend, and try to bring it consistently down under 5 seconds...
Comment 3 Tim Waugh 2013-08-16 11:46:15 EDT
I've changed it to 10s in:
 cups-1.6.3-7.fc19
 cups-1.7-0.25.rc1.fc20
Comment 4 Fedora Update System 2013-10-11 07:50:07 EDT
cups-1.6.4-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/cups-1.6.4-2.fc19
Comment 5 Fedora Update System 2013-10-11 19:59:02 EDT
Package cups-1.6.4-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cups-1.6.4-2.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18910/cups-1.6.4-2.fc19
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-10-14 03:12:50 EDT
cups-1.6.4-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2013-10-14 13:16:38 EDT
cups-1.6.4-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.