[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: Building static pages eats up major resources
****** message to minivend-users from mike@minivend.com ******
Quoting Dan Blair (danblair@hotmail.com):
>
> I'm trying to implement static page building on my site with the
> command:
>
> minivend -test -build mycatalog
>
> and it builds the entire catalog tree to a directory, but this takes
> several minutes (i have hundreds of pages) and eats up a ton of
> resources. It takes up all available cpu time on a powerful server &
> uses 80-100 megs of memory. I have tried using a nice -19 with little
> effect. It does the exact same thing on 2 different servers that I have
> tried. In fact, doing this sometimes uses up so many resources that the
> main minivend program hangs; the daemon is still in memory but it won't
> respond even after the static build is finished. A manual restart is
> needed. Now, should I do the static page build a different way or do I
> have something set up wrong? Has anyone seen this? Thanks for the help,
>
Unfortunately this is normal.
Perl's Safe module has a memory leak, and I am guessing that if you
have only hundreds of pages that you have a lot of [if ....] and
[perl ....] and [calc] ... [/calc] constructs. Each one makes a call
to Safe, and each call leaks a bit more memory.
This is not a problem with the forking behavior of the MiniVend server
under UNIX; it can be a problem on the single-threaded Windows version.
You might try this patch on bin/minivend:
***************
*** 1724,1729 ****
--- 1724,1732 ----
my($name,$dir,$check,$scan) = @_;
my($base,$page);
my $status = 1;
+
+ $Vend::Interpolate::reset_calc();
+
eval {
unless($scan) {
$page = readin($name);
I think this may make a difference in Perl5.005 or possibly 5.00404. Let
me know if it helps.
Otherwise there is no fix; a workaround can be to replace [if ...] [/if] and
[perl] [/perl] with UserTag or other constructs.
There is not much I can do about this; I reported it as a Perl bug years
ago and no one could find the problem. I actually patched Opcode.pm at
one point and reduced the problem, but that was not implemented either
as it was not a complete fix.
--
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
Fast, reliable, cheap. 131 Willow Lane, Floor 2 | || _ \
Pick two and we'll talk. Oxford, OH 45056 | || |_) |
-- unknown <mikeh@minivend.com> |___| _ <
513.523.7621 FAX 7501 |_| \_\
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list