News for hackers. Stuff that matters.
Re:Don't trust default timeouts by user5994461 on Saturday August 29, 2020 @04:43PM (#24319282)
Yes, go ahead and set a 10 minutes rather than infinite or 10 seconds. That will make it much easier to realize that things are frozen because they will raise exceptions and logs all over the place.

To be pedantic though, infinite timeouts don't break applications except some rare cases of resources exhaustion. If an application is completely unresponsive, it is dead for good, not because of the timeout, need to fix the root cause (often resource exhaustion like swapping or it's waiting on another IO or service that's frozen).

Re:Don't trust default timeouts by astrobe_ on Saturday August 29, 2020 @05:37PM (#24319602)
Failing because of a too short timeout feels silly, but a stupidly large timeout leads to frustration and hazardous user actions like killing the app with the task manager.

You don't need a timeout, you need a "cancel" button.

Re:Don't trust default timeouts by user5994461 on Saturday August 29, 2020 @06:11PM (#24319780)
Funny you mention that, this reminds me of Windows task management. Windows automatically gives a popup to terminate an application when it detects an application is unresponsive.

This happens regularly when I open large files in some app, they take a fair bit of time to load, Windows offers a popup to kill the app after few seconds. Have to carefully wait and not click anything.

Re:Don't trust default timeouts by afiori on Sunday August 30, 2020 @04:17AM (#24322105)
Or a retry button. The point is that the application does not know if your network has a ridiculous latency that messes up tight timeouts