Re: MasonHQ node caching, and other bugs

Soren Dossing <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <20050420093339.A3013@localhost>

On Mon, 11 Apr 2005, Jonathan Swartz wrote:

>> When editing a page, especially when editing a page that has just been
>> updated, I often find myself editing old content. The edit.html loads old
>> content into the form. A few reloads will cycle between various revisions
>> of the page. The page is not cached by a proxy server. Tracking through
>> the code, I end up on lib/MHQ/Wiki/Node.pm in the latest_version()
>> subroutine. This piece of code does not return the latest version, but
>> instead whatever is cached in ... in apache I guess.
>>
>>    sub latest_version
>>    {
>>      my ($self) = @_;
>>      unless (defined($self->{_latest_version})) {
>>        ($self->{_latest_version}) =
>>          $self->versions(version_id=>$self->latest_version_id);
>>      }
>>      return $self->{_latest_version};
>>    }
>
> It is caching in the Node object itself, which should be recreated every
> request. So I don't think this is the problem.

How can I confirm if the Node object is cached?

> Are you still having this problem? If so, after editing and saving a page,
> check the node entry database to see if it has been updated. If not, then
> for some reason your query isn't being committed to the database. (Are you
> using a database with transactions?)

I solved the problem by setting MaxrequestsPerChild to 1. But the site 
became very slow, so I would like to find other solution.

I use mysql for storage. I'm fairly certain that data gets committed to db 
right after submitting web form.

>> 2) Slowness, internal server error.
>>
>> Starting up apache takes a lot of time. And new instances have to be
>> spawned often, so the site is generally pretty slow. Keeping
>>
>>    MaxRequestsPerChild 10
>>
>> in conf/httpd-prod.conf.src generally works, but is slow. Increasing the
>> number results in frequent internal server errors.
>
> Internal server errors should be matched with errors in the logs...what are
> the errors?

I will try to catch the log messages next time they happen and send here.

>> 3) Links to local files.
>>
>> The might be a restriction in Kwiki more than MasonHQ. But there seem to
>> be no syntax for linking to local files.
>>
>> I guess I can create new rules in lib/MHQ/CGI/Kwiki/Formatter.pm for this
>> purpose?
>
> Yup.

Thanks. I have made several updates and it works fine. But it seems that 
the rules can over lap. I sometimes get Wiki words inside code tages. For 
example will [=/opt/SUNWabc] generate a wiki word.

>> 4) Bugs and documentation
>>
>> I have fixed a few other bugs in the code, as well as kept an installation
>> journal that is more accurate than the one provided. Is there somewhere to
>> send patches and docs updates?
>
> Please post them to this list, and I'll try to get to them with more haste
> than before. :)

I will do.

> A better installation journal would be great. Actually this should probably
> be put on the wiki and linked from http://masonhq.com/?SourceForThisSite, so
> that it can be easily updated.

Should I send my journal directly to you first?

Soren


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.