Bug 996664 - web interface for 'add printer' does not allow backend enough time for discovery
Summary: web interface for 'add printer' does not allow backend enough time for discovery
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-13 16:02 UTC by David Woodhouse
Modified: 2013-10-14 17:16 UTC (History)
2 users (show)

Fixed In Version: cups-1.6.4-2.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-14 07:12:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Woodhouse 2013-08-13 16:02:38 UTC
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 10:55:11 UTC
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 11:10:17 UTC
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 15:46:15 UTC
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 11:50:07 UTC
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 23:59:02 UTC
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 07:12:50 UTC
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 17:16:38 UTC
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.