Open flipzoom opened 9 years ago
I confirmed it's the ProcessWireUpgrade module, which is not currently part of the core. Though will be at some point, so good to find out about a potential issue. But the issue depends on the http timeout settings specified in your php.ini file. If they are particularly high, then it'll timeout. I'm updating that module and the defaults in WireHttp to specify a 5 second timeout rather than relying on the PHP settings, which should give more predictable behavior when a resource isn't accessible like this.
WireHttp has been updated so that it enforces a specific timeout rather than leaving it to PHP's settings. In testing things out here, this seems to resolve the timeout issue for when the modules directory is inaccessible.
@ryancramerdesign timeout is good for most cases, but why not check for updates asynchronously?
That way there shouldn't be any delay at all, and in the simplest form (probably, depending on the implementation here) the upgrade module would just provide local interface for an AJAX script.
I think this might be a related issue. On 2.5.14 I just got the following message and couldn't access the admin. A reload and it worked fine so obviously a short term network glitch reaching github, but again, it shouldn't prevent access to the PW admin.
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /wire/core/WireHttp.php on line 467
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://api.github.com:443 (php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known) in /wire/core/WireHttp.php on line 467
TemplateFile: Error loading GitHub branches https://api.github.com/repos/ryancramerdesign/Processwire/branches<pre>#0 /site/modules/ProcessWireUpgrade/ProcessWireUpgradeCheck.module(59): ProcessWireUpgradeCheck->getCoreBranches() #1 /wire/core/Wire.php(363): ProcessWireUpgradeCheck->loginHook(Object(HookEvent)) #2 /wire/core/Wire.php(296): Wire->runHooks('login', Array) #3 /wire/modules/Process/ProcessLogin/ProcessLogin.module(77): Wire->__call('login', Array) #4 /wire/modules/Process/ProcessLogin/ProcessLogin.module(77): Session->login('ajones', 'zoup1la') #5 [internal function]: ProcessLogin->___execute() #6 /wire/core/Wire.php(341): call_user_func_array(Array, Array) #7 /wire/core/Wire.php(296): Wire->runHooks('execute', Array) #8 /wire/core/ProcessController.php(213): Wire->__call('execute', Array) #9 /wire/core/ProcessController.php(213): ProcessLogin->execute() #10 [internal function]: ProcessController->___execute() #11 /wire/core/Wire.php(341): call_user_func_array(Array, Array) #12 /wire/core/Wire.php(296): Wire->runHooks('execute', Array) #13 /wire/core/admin.php(85): Wire->__call('execute', Array) #14 /wire/core/admin.php(85): ProcessController->execute() #15 /wire/modules/AdminTheme/AdminThemeDefault/controller.php(13): require('/Users/ajones/S...') #16 /site/templates/admin.php(15): require('/Users/ajones/S...') #17 /wire/core/TemplateFile.php(169): require('/Users/ajones/S...') #18 [internal function]: TemplateFile->___render() #19 /wire/core/Wire.php(341): call_user_func_array(Array, Array) #20 /wire/core/Wire.php(296): Wire->runHooks('render', Array) #21 /wire/modules/PageRender.module(356): Wire->__call('render', Array) #22 /wire/modules/PageRender.module(356): TemplateFile->render() #23 [internal function]: PageRender->___renderPage(Object(HookEvent)) #24 /wire/core/Wire.php(341): call_user_func_array(Array, Array) #25 /wire/core/Wire.php(296): Wire->runHooks('renderPage', Array) #26 /wire/core/Wire.php(363): Wire->__call('renderPage', Array) #27 /wire/core/Wire.php(363): PageRender->renderPage(Object(HookEvent)) #28 /wire/core/Wire.php(296): Wire->runHooks('render', Array) #29 /wire/modules/Process/ProcessPageView.module(172): Wire->__call('render', Array) #30 /wire/modules/Process/ProcessPageView.module(172): Page->render() #31 [internal function]: ProcessPageView->___execute(true) #32 /wire/core/Wire.php(341): call_user_func_array(Array, Array) #33 /wire/core/Wire.php(296): Wire->runHooks('execute', Array) #34 /index.php(214): Wire->__call('execute', Array) #35 /index.php(214): ProcessPageView->execute(true) #36 {main}</pre>
I got some more errors related to this yesterday:
Warning: fsockopen(): SSL: Handshake timed out in /wire/core/WireHttp.php on line 467
Warning: fsockopen(): Failed to enable crypto in /wire/core/WireHttp.php on line 467
Warning: fsockopen(): unable to connect to ssl://api.github.com:443 (Unknown error) in /wire/core/WireHttp.php on line 467
I also got errors today too after the login - using a curent Dev Version and being offline. (I was on the train and used processwire locally using MAMP and without an internet connection)
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /../wire/core/WireHttp.php on line 467
Warning: fsockopen(): unable to connect to ssl://api.github.com:443 (php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known) in /.../wire/core/WireHttp.php on line 467
At least I could continue using the "admin" link on the login page. So this is not elegant but no drama. :-)
If the processwire.com server is down, I can not log in to the CMS and get a timeout. The update check should have a fallback and be canceled when you are down. At least I think it is the update check.