Tags:
create new tag
view all tags

Question

I've had very slow response times when trying to preview or save edits to topics (more than 3 minutes).

DavidBright exposed a similar problem in FailedAuthenticationWithApache2OnRedHat8, but i've not found any response.

The problem seems to be in apache-perl communication. If I change preview perl script with a kind of "hello world", the problem persists.

Really, response is slow only if text in the edit form has more than 4096 characteres. If it has 4096 or less, the speed is ok.

Interesting enough, I get an error in apache log error when I edit any topic:

view: print() on closed filehandle FILE at ../lib/TWiki/Store.pm line 667.

I don't know anything about apache-perl communication to solve the problem. Any ideas? I guess there is a problem with POST request greater than 4K ...

I'm attaching the testenv result parts I think could be interesting.

Thank you! (and excuse my bad english).

Environment variables:

DOCUMENT_ROOT       /var/www/html
GATEWAY_INTERFACE      CGI/1.1
HTTP_ACCEPT         text/html, image/jpeg, image/png, text/*, image/*, */*
HTTP_ACCEPT_CHARSET   iso-8859-1, utf-8;q=0.5, *;q=0.5
HTTP_ACCEPT_ENCODING   x-gzip, x-deflate, gzip, deflate, identity
HTTP_ACCEPT_LANGUAGE   es, en, spanish
HTTP_CONNECTION      Keep-Alive
HTTP_USER_AGENT      Mozilla/5.0 (compatible; Konqueror/3.1; Linux)
PATH               /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
QUERY_STRING
REQUEST_METHOD      GET
REQUEST_URI         /twiki/bin/testenv
SCRIPT_FILENAME         /var/www/twiki/bin/testenv
SCRIPT_NAME         /twiki/bin/testenv
SERVER_PROTOCOL      HTTP/1.1
SERVER_SOFTWARE      Apache/2.0.40 (Red Hat Linux)
UNIQUE_ID            rdxwXJNgUGAAAC-IAFQAAAAA


CGI Setup:

Operating system:         Unix (linux)
Perl version:            5.8.0
@INC library path:         
../lib
 /usr/lib/perl5/5.8.0/i386-linux-thread-multi
 /usr/lib/perl5/5.8.0
 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
 /usr/lib/perl5/site_perl/5.8.0
 /usr/lib/perl5/site_perl
 /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
 /usr/lib/perl5/vendor_perl/5.8.0
 /usr/lib/perl5/vendor_perl
 /usr/lib/perl5/5.8.0/i386-linux-thread-multi
 /usr/lib/perl5/5.8.0
 .

Note: This is the Perl library path, used to load TWiki modules, third-party modules used by some plugins, and Perl built-in modules.

TWiki module in @INC path:

 OK, TWiki.pm found (TWiki version: 01 Feb 2003)


Required Perl modules:
 CGI (2.89)
CGI::Carp (1.24)
File::Copy (2.05)


Optional Perl modules:

 Algorithm::Diff (1.01)
MIME::Base64 (2.12)
POSIX (1.05)

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, SmiliesPlugin
Server OS: Red Hat 9.0, Kernel 2.4.20-9smp
Web server: Apache 2.0.40
Perl version: v5.8.0
Client OS: Linux, Windows
Web Browser: Konqueror 3.1.4 (Linux); IExplorer 5.0, Netscape 7.0 (Windows 2000)

-- AlfonsoLopez - 04 Mar 2004

Answer

This could be something to do with Apache 2.0 and CGI.pm perhaps - please attach your 'hello world' script and the complete output of testenv (as HTML so it's more readable), generated by the latest testenv at CVSget:bin/testenv, as recommended in SupportGuidelines. The latest version does some more checks on Apache 2.0 and CGI.pm.

I would definitely upgrade your CPAN:CGI (CGI.pm) module to the latest version available - 2.89 seems a bit old to be using it on Apache 2.0, and testenv recommends 2.93 or higher to avoid attachment upload problems, for example. I assume you are not using mod_perl (something that testenv output would have told me, by the way)?

Are you using the IE_JS skin? If so, is it used on all browsers? It tends to generate very large JavaScript lines when used on large webs.

It's not a general problem with POSTs of more than 4K, since many pages are larger than that, but see DocumentContainsNoData which might just be related. Also, googling for similar problems may help, e.g. Google:slow+save+twiki.

-- RichardDonkin - 04 Mar 2004

Thank you four your quick response.

You were right. I've upgrade CPAN:CGI, and now it's working better, but I'm afraid not perfectly.

I'm not using mod_perl, nor IE_JS skin (i'm using void skin).

Currently, preview is working fine, but save phase continues being slow with bigger (> 4k) topics.

I've tried using mod_perl, but I've had another problem. Maybe I'll ask for help in a different topic in some days, when I get more information.

I've update my testenv script. Here it is its result:

DOCUMENT_ROOT/var/www/html
GATEWAY_INTERFACECGI/1.1
HTTP_ACCEPTtext/html, image/jpeg, image/png, text/*, image/*, */*
HTTP_ACCEPT_CHARSETiso-8859-15, utf-8;q=0.5, *;q=0.5
HTTP_ACCEPT_ENCODINGx-gzip, x-deflate, gzip, deflate, identity
HTTP_ACCEPT_LANGUAGEes, en
HTTP_CONNECTIONKeep-Alive
HTTP_HOSTfederlin.sip.ucm.es:2001
HTTP_USER_AGENTMozilla/5.0 (compatible; Konqueror/3.1; Linux)
PATH/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
QUERY_STRING
REMOTE_ADDR80.28.17.172
REMOTE_HOST80-28-17-172.adsl.nuria.telefonica-data.net
REMOTE_PORT37555
REQUEST_METHODGET
REQUEST_URI/twiki/bin/testenv
SCRIPT_FILENAME/var/www/twiki/bin/testenv
SCRIPT_NAME/twiki/bin/testenv
SERVER_ADDR147.96.80.96
SERVER_ADMINroot@localhost
SERVER_NAMEfederlin.sip.ucm.es
SERVER_PORT2001
SERVER_PROTOCOLHTTP/1.1
SERVER_SIGNATURE
Apache/2.0.40 Server at federlin.sip.ucm.es Port 2001
SERVER_SOFTWAREApache/2.0.40 (Red Hat Linux)
UNIQUE_IDhdDQeZNgUGAAADk0B20AAAAH

CGI Setup:

Operating system:Unix (linux)
Perl version:5.8.0
@INC library path:/var/www/twiki/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
.
Note: This is the Perl library path, used to load TWiki modules, third-party modules used by some plugins, and Perl built-in modules.
TWiki module in @INC path:
OK, TWiki.pm found (TWiki version: 01 Feb 2003)
Required Perl modules:
CGI (2.98)
CGI::Carp (1.26)
File::Copy (2.05)
File::Spec (0.83)
FileHandle (2.01)
Optional Perl modules:
Algorithm::Diff (1.01)
MIME::Base64 (2.12)
POSIX (1.05)
Encode (1.83)
Note: Optional module 'Unicode::MapUTF8' not installed - check TWiki documentation to see if your configuration needs this module.
Note: Optional module 'Unicode::Map' not installed - check TWiki documentation to see if your configuration needs this module.
Note: Optional module 'Unicode::Map8' not installed - check TWiki documentation to see if your configuration needs this module.
Note: Optional module 'Jcode' not installed - check TWiki documentation to see if your configuration needs this module.
Digest::MD5 (2.20)
Note: Optional module 'Digest::SHA1' not installed - check TWiki documentation to see if your configuration needs this module.
MIME::Base64 (2.12)
Net::SMTP (2.24)
PATH_INFO:
Note: For a URL such as http://federlin.sip.ucm.es:2001/twiki/bin/testenv/foo/bar, the correct PATH_INFO is /foo/bar, without any prefixed path components. Test this now - particularly if you are using mod_perl, Apache or IIS, or are using a web hosting provider. The page resulting from the test link should have a PATH_INFO of /foo/bar.
mod_perl:Not used for this script (mod_perl not loaded into Apache)
User:apache
Note: Your CGI scripts are executing as this user.
Warning: Since your CGI script is not running as user nobody, you need to change the locks in the *,v RCS files of the TWiki distribution from nobody to apache. Otherwise, changes to topics will not be logged by RCS.
Group(s): apache apache

Test of TWiki.cfg Configuration:

$defaultUrlHost:http://federlin.sip.ucm.es:2001
Note: This must match the protocol and host part (with optional port number) of the TWiki URL.
$scriptUrlPath:/twiki/bin
Note: This must match the 'cgi-bin' part of the URL used to access the TWiki cgi-bin directory.
$pubUrlPath:/twiki/pub
Note: This must be the URL of the public directory.This is not set correctly if the /twiki/pub/wikiHome.gif image below is broken:
$pubDir:/var/www/twiki/pub
Note: This is the public directory, as seen from the file system. It must correspond to $pubUrlPath.
$templateDir:/var/www/twiki/templates
Note: This is the TWiki template directory, as seen from the file system.
$dataDir:/var/www/twiki/data
Note: This is the data directory where TWiki stores all topics.
$mailProgram:/usr/sbin/sendmail -t -oi -oeq
Note: This is the mail program TWiki uses to send mail.
$rcsDir:/usr/bin
Note: This is the directory where RCS is located.
RCS Version:5.7
Note: This is the version of RCS which will be used.
$lsCmd:/bin/ls
Note: This is the file list program TWiki uses to list topics.
$egrepCmd:/bin/egrep
Note: This is a program TWiki uses for search.
$fgrepCmd:/bin/fgrep
Note: This is a program TWiki uses for search.
$safeEnvPath:/bin:/usr/bin
Note: This is used to initialise the PATH variable, and is used to run the 'diff' program used by RCS, as well as to run shell programs such as Bourne shell or 'bash'.

Path and Shell Environment

Original PATH:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
Note: This is the PATH value passed in from the web server to this script - it is reset by TWiki scripts to the PATH below, and is provided here for comparison purposes only.
Current PATH:/bin:/usr/bin
Note: This is the actual PATH setting that will be used by Perl to run programs. It is normally identical to $safeEnvPath, unless that variable is empty.
diff:GNU diff was found on the PATH - this is the recommended diff tool.
Note: The 'diff' command is used by RCS to compare files.

Any ideas?

Thank you very much.

-- AlfonsoLopez - 04 Mar 2004

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2004-06-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.