Bug 135947

Summary: KPrinter times out too fast when CUPS server slow to respond
Product: [Unmaintained] kdeprint Reporter: Thibaut Cousin <kde>
Component: generalAssignee: KDEPrint Devel Mailinglist <kde-print-devel>
Status: CLOSED FIXED    
Severity: normal CC: jlayt, me
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thibaut Cousin 2006-10-19 10:09:38 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs
OS:                Linux

My CUPS version is 1.1.23. I have a small local network. The printer is on the server (shared) and my client computer uses CUPS with a client-only configuration. Everything is configured correctly and usually works fine.

But sometimes, when the load is very high on my network, CUPS on the server is slow to respond to requests (five seconds or more).

The problems is that KPrinter isn't patient. It times out after a mere two or three seconds with a message saying that it could not get the list of printers. In those circumstances:
- Printing directly with lpr still works.
- Printing from another computer (with Mac OS X, also using CUPS) works.
- KPrinter suddenly works again when the network load is back to normal.

I couldn't find any option to change the time out value in KPrinter.

Thanks for your attention.
Comment 1 Cristian Tibirna 2006-10-19 12:13:08 UTC
The timeout for KPrinter's connection to CUPS is presently 1.5s and not configurable. I will either increase this value or think of some other, adaptive or interactive (ugh :-(  ) mechanism.

Thank you.
Comment 2 Thibaut Cousin 2006-10-19 12:22:58 UTC
A longer, still not-configurable, value would be fine, I think. When my 802.11g network is really under heavy load (even typing through an SSH connection is slow), a five-second timeout should be OK.

If you want to make it configurable, there is a panel for connection preferences in KControl, where various time values can be set. Maybe you could reuse a value there, or add a new one.
Comment 3 Bram Schoenmakers 2006-10-19 18:40:51 UTC
There was a bug in KDE 3.5.5 which had a way too low timeout value for the CUPS server tor respond. This was fixed after the 3.5.5 release (see bug 135561). Do you know if older KDE versions like 3.5.4 behave correctly?
Comment 4 Thibaut Cousin 2006-10-19 18:47:05 UTC
Sorry, I don't know. I only noticed this bug after the KDE 3.5.5 release.
Comment 5 Nick Warne 2006-10-20 18:21:44 UTC
Older KDE versions all worked correctly, for me at least.  3.5.5 using konstruct produced the bug.  The fix from bug 135561 does indeed fix the issue, and all is OK again.

My bug 131926 is still there though (wrong CUPS test page)...

Nick
Comment 6 Cristian Tibirna 2006-10-21 01:33:35 UTC
Thibaut, can you please check that you have the fix mentioned in bug 135561 applied to your current KDE and if yes, can you please tell me if you still have the problem?

Thanks
Comment 7 Thibaut Cousin 2006-10-21 09:44:29 UTC
This fix is not included in the current OpenSUSE packages. I will rebuild the package with it today, but testing it will take a bit time, since my network is no longer under heavy load. I'll have to think of something. ;)

The patch sets the timeout to 1500. What's the unit? If it's 1500s, isn't it a bit too much?
Comment 8 Bram Schoenmakers 2006-10-21 11:12:29 UTC
1500 milliseconds
Comment 9 Thibaut Cousin 2006-10-21 13:29:16 UTC
Oh, OK. Are you sure that's enough? In my case, the delay caused by the network load seemed to be several seconds, even though I admit it's really difficult to estimate.

But it sure is getter than 1ms. ;-)
Comment 10 Cristian Tibirna 2006-11-12 18:27:29 UTC
Thibaut, can you confirm that the fix mentioned in bug report 135561, and in this bug report, in comments 6, 7, 8, solves the problem for you?
Comment 11 Thibaut Cousin 2006-11-13 19:37:00 UTC
I'm sorry, that will be difficult. First I can't easily reproduce the heavy network load I had before, and second OpenSUSE has now integrated this patch.

Maybe I'll be able to try again by the end of the week. If the problem resurfaces, I'll let you know.
Comment 12 Thibaut Cousin 2007-04-09 11:55:16 UTC
Well, after six months the problem never reoccured. :-) Shall we close this bugreport?
Comment 13 Cristian Tibirna 2007-04-09 16:49:16 UTC
Yes, we close. It was a known bug in the sources for 3.5.5, fixed subsequently. Thanks.
Comment 14 Cristian Tibirna 2007-04-09 16:49:37 UTC
*** Bug has been marked as fixed ***.
Comment 15 John Layt 2008-12-31 20:28:57 UTC
Closing old Resolved status bug.