Including an http address using (for example, %INCLUE{"http:/127.0.0.1/"}%) makes a topic very slow (20-30 secs) to be rendered. However previewing the topic does not suffer this penalty and renders correctly. I have searched around and found other (similar) reports:
IncludeUrlIsSuperSlow,
IncludeHTMLTakesLongTime. I even applied the patch mentioned in
ProxiedIncludesBrokenImplementationBug, but the problem remains.
Another, may be unrelated, symptom is that every time an "http:" include is rendered within a topic the folowing entry in the web server error log:
Socket.pm: Argument "127.0.0.1" isn't numeric in subroutine entry at /usr/lib/perl5/5.6.1/i386-linux/Socket.pm line 442.
Preview also shows a similar entry in the log, but does not take any appreciable time to render:
preview: Argument "127.0.0.1" isn't numeric in subroutine entry at /usr/lib/perl5/5.6.1/i386-linux/Socket.pm line 442.
Test case
%INCLUDE{"http://127.0.0.1/"}%
Environment
| TWiki version: |
TWikiRelease01Feb2003 |
| TWiki plugins: |
DefaultPlugin, EmptyPlugin, InterwikiPlugin |
| Server OS: |
Mandrake Linux 8.2, kernel 2.4.19-35mdk |
| Web server: |
Apache-AdvancedExtranetServer/1.3.23 (Mandrake Linux/4.1mdk) |
| Perl version: |
v5.6.1 built for i386-linux |
| Client OS: |
Mandrake Linux 8.2, kernel 2.4.19-35mdk |
| Web Browser: |
Mandrake Linux 8.2, kernel 2.4.19-35mdk, mozilla |
--
RodrigoChandia - 19 Nov 2003
Follow up
Clarified the description. It seems that my english is getting somewhat rusty
--
RodrigoChandia - 20 Nov 2003
Fix record
This has been fixed with the
ProxiedIncludesBrokenImplementationBug fix.
Use the latest
TWikiAlphaRelease, or apply these changes to your
twiki/lib/TWiki/Net.pm file:
*** ../../b/lib/TWiki/Net.pm 2003-01-04 17:36:11.000000000 -0800
--- TWiki/Net.pm 2003-09-28 18:12:57.000000000 -0700
***************
*** 53,59 ****
my $base64;
my $result = '';
$theUrl = "/" unless( $theUrl );
! my $req = "GET $theUrl HTTP/1.1\r\n";
# RNF 22 Jan 2002 Support for vhosts and user authentication.
$req .= "Host: $theHost\r\n";
--- 53,59 ----
my $base64;
my $result = '';
$theUrl = "/" unless( $theUrl );
! my $req = "GET $theUrl HTTP/1.0\r\n";
# RNF 22 Jan 2002 Support for vhosts and user authentication.
$req .= "Host: $theHost\r\n";
***************
*** 70,75 ****
--- 70,76 ----
my $proxyHost = &TWiki::Prefs::getPreferencesValue("PROXYHOST");
my $proxyPort = &TWiki::Prefs::getPreferencesValue("PROXYPORT");
if($proxyHost && $proxyPort) {
+ $req = "GET http://$theHost$theUrl HTTP/1.0\r\n";
$theHost = $proxyHost;
$thePort = $proxyPort;
}
This fix will solve the slow URL connection problem and the proxy problem.
However, at work I do get the same Socket error messages since I applied this fix. The page gets included correctly but there are these error log messages.
For now I leave this bug open. Anyone has time to look into the error log issue?
--
PeterThoeny - 21 Nov 2003
Yes, I tried the patch but it only fixed 'preview'. Apparently, it is related with mod_perl since I had mod_perl active for 'view' only. I removed mod_perl and the includes got fast again.
Now the question would be why the messages and why the difference between using and not using mod_perl.
(I have opened this as a support question in
Support.IncludeHttpIsVerySlow too... I apologise for making the more confusing. I will not do it again)
--
RodrigoChandia - 21 Nov 2003