Tags:
create new tag
view all tags

SID-00481: slow save

Status: Answered Answered TWiki version: 4.3.1 Perl version: 5.8.5-36
Category: CategoryPerformance Server OS: Scientific Linux 4.7 (RHEL 4.7) Last update: 17 years ago

After upgrading a TWiki 4.1 server to TWiki 4.3.1, saves take very long (up to a few minutes) to complete. We see the same behavior whether we click on "Save" or "Cancel" after trying to edit a page. The only apache errors we see are:

[Thu Aug 13 11:58:24 2009] [error] [client 192.168.213.159] File does not exist: /mnt/wiki/lepp/pub/Sandbox/CmpgrpLinks/style.css, referer: https://wiki.lepp.cornell.edu/lepp/bin/edit/Sandbox/CmpgrpLinks?t=1250179048;nowysiwyg=1

[Thu Aug 13 12:00:31 2009] [error] [client 192.168.213.159] File does not exist: /mnt/wiki/lepp/pub/Sandbox/CmpgrpLinks/style.css, referer: https://wiki.lepp.cornell.edu/lepp/bin/view/Sandbox/CmpgrpLinks

(While they do demonstrate the amount of time a save takes, I'm not sure if those errors are related and I don't know why the pattern skin is looking for an individual style.css for each page.)

It seems like this may be related to the use of the ApacheLogin manager. On this same server, we do not see this problem with a TWiki 4.3.1 installation that uses the TemplateLogin manger. We also do not see this problem with another 4.0.5 TWiki installation on the same server that uses the ApacheLogin manager.

-- DevinBougie - 2009-08-13

Discussion and Answer

For what it's worth, sometimes the apache error log complains about the pub directory not existing, not just style.css. For example:

[Thu Aug 13 14:32:47 2009] [error] [client 192.168.213.159] File does not exist: /mnt/wiki/lepp/pub/Sandbox/CmpgrpLinks1, referer: https://wiki.lepp.cornell.edu/lepp/bin/edit/Sandbox/CmpgrpLinks1?t=1250188328;nowysiwyg=1

[Thu Aug 13 14:35:02 2009] [error] [client 192.168.213.159] File does not exist: /mnt/wiki/lepp/pub/Sandbox/CmpgrpLinks1, referer: https://wiki.lepp.cornell.edu/lepp/bin/view/Sandbox/CmpgrpLinks1

-- DevinBougie - 2009-08-13

It also seems like this may be related to the size of the page you are editing. For example, the following page consistently takes over two minutes to save

https://wiki.lepp.cornell.edu/lepp/bin/view/Sandbox/CmpgrpLinks

While the same page (just one line shorter) consistently saves in around 4 seconds.

https://wiki.lepp.cornell.edu/lepp/bin/view/Sandbox/CmpgrpLinks1

-- DevinBougie - 2009-08-13

You probably realize that the long save time is likely due to the wait before timing out on the file search, and that fixing those errors should solve the problem with saving.

Does your /pub directory work otherwise, e.g., for attachments? If not, what you are your configure settings for {PubUrlPath} and {PubDir}? You may also have to check the permission on /pub.

Try viewing the raw source of a saved page (add ?raw=debug to the end a regular view URL): does it contain a reference to the CSS? If so, maybe you have a template that's adding that.

-- SeanCMorgan - 2009-08-13

Thanks for the reply, Sean. Yes, our pub directory does work otherwise, and the permissions, PubUrlPath, and PubDir look correct to me.

There is no reference to style.css in the raw source (and, we do see this error for most pages). We are using the pattern skin and the stock templates that shipped with TWiki 4.3.1 (with the modification of making nowysiwyg the default).

We do see the "File does not exist" errors whenever viewing these pages (not just when editing). In general, there are no delays when just viewing pages.

-- DevinBougie - 2009-08-13

We had a number of similar reports. Seems to depend on Apache version and OS. Please report here when you find a fix.

Related topics: TWikiOnApache2dot0Hangs, SaveAndAttachScriptsVerySlow, SaveTakesForeverIntermittently.

-- PeterThoeny - 2009-08-13

It looks like enabling DrainStdin in LocalSite.cfg may have helped with this issue. I will change the status of this ticket to Answered, for now.

$TWiki::cfg{DrainStdin} = 1;

Thanks again, Peter.

Devin

-- DevinBougie - 2009-08-13

Glad it worked out.

-- PeterThoeny - 2009-08-13

Change {Sessions}{ExpireAfter} to a negative number. It does help but you need to enable the tools/tick_twiki.pl

Set the session timeout, in seconds. The session will be cleared after this amount of time without the session being accessed. The default is 6 hours (21600 seconds).

NoteBy default, session expiry is done "on the fly" by the same processes used to serve TWiki requests. As such it imposes a load on the server. When there are very large numbers of session files, this load can become significant. For best performance, you can set {Sessions}{ExpireAfter} to a negative number, which will mean that TWiki won't try to clean up expired sessions using CGI processes. Instead you should use a cron job to clean up expired sessions. The standard maintenance cron script tools/tick_twiki.pl includes this function.

-- PeterJones - 2009-08-19

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title slow save
SupportCategory CategoryPerformance
TWiki version 4.3.1
Server OS Scientific Linux 4.7 (RHEL 4.7)
Web server Apache 2.0.52-41
Perl version 5.8.5-36
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2009-08-19 - PeterJones
 
  • 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.