Ticket #884 (closed defect: fixed)

Opened 15 months ago

Last modified 12 months ago

checkversion timeout

Reported by: DarTar Owned by: BrianKoontz
Priority: high Milestone: 1.2
Component: actions Version: 1.1.6.6
Severity: normal Keywords:
Cc:

Description

When an admin is logged in and a network connection is not available, checkversion hangs while trying to retrieve version information from the Wikka server. A timeout limit should be explicitly set to avoid annoyingly long page generation times.

Change History

Changed 15 months ago by BrianKoontz

  • status changed from new to assigned

This action uses stream_set_timeout to drop the connection after so many pre-defined seconds. I'll take a look at this and see what is going on. I know I tested this offline, and the timeout worked fine on my test machine. I wonder if it's a PHP-related issue?

Changed 15 months ago by BrianKoontz

Possible culprit: fsockopen(). That takes a timeout parameter as well. Under some conditions, it does not appear to return after the timeout has expired. Problem is, I saw this happen only one time under OS X -- subsequent attempts to cause fsockopen() to timeout in fact triggered a return from the function call after the timeout parameter expired, as expected.

Changed 15 months ago by BrianKoontz

  • milestone changed from 1.2 to 1.1.6.7

Changed 15 months ago by BrianKoontz

(In [1369]) Generate warning when network connection fails. Shorten connection timeout to 5 seconds. Refs #884.

Changed 15 months ago by BrianKoontz

  • status changed from assigned to testing

Changed 15 months ago by DarTar

confirmed - works as expected. I ran a local Wikka instance with no network connection and the warning appeared after 5". The warning only appeared once, subsequent trials to connect fail silently without producing any noticeable delay.

Changed 15 months ago by BrianKoontz

  • status changed from testing to commit

Changed 15 months ago by BrianKoontz

  • status changed from commit to closed
  • resolution set to fixed

Changed 15 months ago by BrianKoontz

(In [1380]) Ported from 1.1.6.7 to 1.2. Refs #868, #884.

Changed 15 months ago by DarTar

  • status changed from closed to reopened
  • resolution fixed deleted
  • severity changed from major to normal
  • milestone changed from 1.1.6.7 to 1.2

When logged in as an admin, pages containing {{checkversion}} can still take quite a long time to load. I was wondering if we could use some caching mechanism to avoid triggering the version check every time the page is loaded (this will also reduce unnecessary traffic to wikkawiki.org).

Changed 14 months ago by BrianKoontz

(In [1406]) User-defined checkversion interval added. See  http://docs.wikkawiki.org/ConfigurationOptions for details. Refs #884.

Changed 14 months ago by BrianKoontz

  • status changed from reopened to assigned

Changed 14 months ago by BrianKoontz

  • status changed from assigned to testing

Changed 14 months ago by BrianKoontz

  • keywords trunk-unported added

Changed 14 months ago by NilsLindenberg

Notice: Undefined index: display in …/actions/checkversion.php on line 60

Changed 14 months ago by NilsLindenberg

The else around the pat after "if (FALSE == ini_get('allow_url_fopen'))" should be unnecessary, since the return in line 136 takes care of going back in case of errors. Same for the one in lne 159.

Changed 14 months ago by NilsLindenberg

I've fixed the notice, tried to merge the doc about Brians time check intervall, seperated debug from display and generally tried to simplify the code a bit. Please test

Changed 14 months ago by NilsLindenberg

In changeset [1417]

Changed 12 months ago by DarTar

(In [1459]) Fixed layout and styling for debug messages in checkversion, refs #884

Changed 12 months ago by DarTar

  • status changed from testing to commit

Tested the timeout interval and corresponding debug code, works as expected.

Changed 12 months ago by DarTar

  • status changed from commit to closed
  • resolution set to fixed

Changed 12 months ago by BrianKoontz

(In [1481]) Ported from 1.2 to trunk. Refs #884, 911.

Changed 12 months ago by BrianKoontz

  • keywords trunk-unported removed
Note: See TracTickets for help on using tickets.