Re: experiencing Out of memory errors

2011-01-27 Thread John Deighan
I'd forgotten about Strawberry Perl (came across it about a year ago, but never 
got around to trying 
it). One question, though: I'm thinking there's not much point to using a 
64-bit version of mod_perl 
unless I'm using it with a 64-bit version of Apache. Where can I get a 64-bit 
version of Apache that 
will with with the mod_perl below?

On 1/27/2011 6:57 AM, Michiel Beijen wrote:
 Hi John,

 ... etc.

 If you would want to switch to StrawberryPerl 5.12.x 64-bit, you can use
 this pre-compiled mod_perl:
 http://strawberryperl.com/package/kmx/mod_perl/

 --
 Mike
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: experiencing Out of memory errors

2011-01-26 Thread Brian Raven
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
John Deighan
Sent: 26 January 2011 15:18
To: perl-win32-users@listserv.ActiveState.com; us...@httpd.apache.org;
modp...@perl.apache.org
Subject: experiencing Out of memory errors

 We have an Apache/mod_perl application running under Windows Server
2003
 that periodically experiences
 Out of memory errors (they appear in the Apache error logs) which
 forces Apache to restart. Our application does, in fact, use a lot of
 memory, and we believe that this is not due to a bug or memory leak.
 What we would like is to run this application in a 64 bit environment,
thus
 allowing us to use more than the 2 GB memory that the Apache process
('httpd')
 is limited to (the Out of memory errors always occur as the memory
usage
 of the httpd process approaches this 2 GB limit).

 We know that we will need to run a 64 bit version of Windows on 64 bit
 hardware to accomplish this. Furthermore, we know that ActiveState has
a
 binary Perl install of a 64 bit Perl. However, we're not aware of
either a
 64 bit Apache (though recently I found the blackdot site -
 http://www.blackdot.be/ - that provides a Windows compatible binary
build
 of 64 bit apache, though I know very little about it) or a 64 bit
mod_perl.
 However, we're also not sure if either of these are needed to escape
the
 2 GB memory limitation. E.g., can 64 bit Perl be used with a 32 bit
 Apache and/or mod_perl?

 Any help with accomplishing what we need would be greatly appreciated,
 including the possibility of hiring someone on a contract basis to
 help us.

Unless it is fairly easy to create a 64 bit setup, it might be worth
expending some effort in checking whether your belief that you don't
have a memory leak is sustainable. This may help.

http://modperlbook.org/html/14-2-6-Memory-Leakage.html

HTH


-- 
Brian Raven 
 
Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient or have received this e-mail in error, please advise 
the sender immediately by reply e-mail and delete this message and any 
attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: experiencing Out of memory errors

2011-01-26 Thread John Deighan


On 1/26/2011 11:22 AM, Brian Raven wrote:
 -Original Message-
 From: perl-win32-users-boun...@listserv.activestate.com
 [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
 John Deighan
 Sent: 26 January 2011 15:18
 To: perl-win32-users@listserv.ActiveState.com; us...@httpd.apache.org;
 modp...@perl.apache.org
 Subject: experiencing Out of memory errors

 We have an Apache/mod_perl application running under Windows Server2003
  ...etc.
 help us.

 Unless it is fairly easy to create a 64 bit setup, it might be worth
 expending some effort in checking whether your belief that you don't
 have a memory leak is sustainable. This may help.

 http://modperlbook.org/html/14-2-6-Memory-Leakage.html

Thanks for the help, Brian. I'll check it out.

That does remind me, however, that we've tried to analyze how much memory some 
of our larger data 
structures take up. We'd previously done that using a function in the 
Devel::Size library named 
total_size. You pass it the reference to a data structure, like an array or 
hash, and it tells you 
how many total bytes it uses, including traversing all references it contains, 
recursively.

However, in an effort to reduce the memory we use (and at the same time speed 
up response time), 
we've started using thread-shared memory for cached data. Since we're on 
Windows, Apache starts a 
single process with multiple threads (technically, it's 2 processes, but the 
first just shuttles the 
request to the 2nd, which uses one of the threads to handle it). Using 
thread-shared data structures 
means that when one of the threads (i.e. Perl interpreters) has data to 
cache, other threads can 
find and use that data since it's stored in a area accessible to all threads.

Unfortunately, the Devel::Size functions don't work correctly with 
thread-shared memory and the 
total_size function returns erroneous information (specifically, no matter how 
large the data 
structure is, it reports the same, rather small size. Perhaps it's unable to 
follow references at 
all, but I really don't know what the problem is).

Does anyone know of an alternative way to determine the amount of memory used 
by a Perl data structure?

use Devel::Size qw(total_size);
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs