Re: File upload of binary format not working

2001-01-11 Thread Aaron Johnson

I guess putting my name on this would have been nice :^)

There is nothing in the log file indicating any errors on the upload
process and the browser just hangs.  Both NN and IE.

Aaron Johnson

Aaron Johnson wrote:

> I have tested other formats and they all work fine.
> For some reason I can't upload binary files anymore.
> There has been no change to the code for the pages that do the upload.
>
> The upload just hangs and never finishes.
>
> Apache 1.3.14
> mod_perl 1.24_01
> Apache::ASP 2.07
> RH 6.1
>
> Has anyone else had this problem?




Re: mod_perl segfault

2001-01-11 Thread Doug MacEachern

On Sun, 10 Dec 2000, Alex Vandiver wrote:

> Heya --
>  Please 'scuse in advance the long post -- it had to be to fit in all of
> the information asked for (better too much than too little, I hope). 
> Anyways, I've run into an intermittent segfault problem with mod_perl
> (Version 1.24).  It causes the Apache (version 1.3.12) process to die:
> [Sun Dec 10 03:12:10 2000] [notice] child pid 18227 exit signal
> Segmentation fault (11)

your stacktrace looks like one triggered by a 5.6.0 bug(s) that we've
seen here a number of times.  it would probably be worth your while to try
5.6.1-trial1.





File upload of binary format not working

2001-01-11 Thread Aaron Johnson

I have tested other formats and they all work fine.
For some reason I can't upload binary files anymore.
There has been no change to the code for the pages that do the upload.

The upload just hangs and never finishes.

Apache 1.3.14
mod_perl 1.24_01
Apache::ASP 2.07
RH 6.1

Has anyone else had this problem?




Re: Strange log entry, Apache child messed up afterwards

2001-01-11 Thread Doug MacEachern

On Fri, 5 Jan 2001, Gerd Kortemeyer wrote:

> Hi,
> 
> Did anybody ever see a message like this in the error log after an "internal
> server error"?
> 
>  [error] Undefined subroutine &Apache::lonhomework::handler called at /dev/null
> line 65535.
> 
> No further entries.
> 
> lonhomework is the mod_perl handler attached to a URL, and is called directly.
> This happens intermittently and seemingly at random; however, after this
> happened once, that Apache child is messed up and will do this again and again
> when hit - so depending on which child happens to answer, you get the correct
> reply or another 500.

i think it's possible that the fix for this is in 1.24_01-dev:
switch usage of hard_timeout() to soft_timeout(), so if SIGALRM
happens during Apache::{print,read}, the script will continue run,
allowing proper cleanup (e.g. DESTROY)

do you see anything in the error_log related to timeouts?




Re: mixing perl and c module on handler stack

2001-01-11 Thread Ken Williams

[EMAIL PROTECTED] (Danny Rathjens) wrote:

>In looking at the mod_perl_2.0 features I noticed this:
>> The AddFilter directive takes any number of filters, for example,
>> this configuration will first send the output to mod_include, which
>> will in turn pass its output down to Apache::ReverseFilter:
>> AddFilter INCLUDE Apache::ReverseFilter
>
>Is there any way to pipe output from my own handler into mod_include
>and thence into GzipChain like the above?
>or is the inability to do this the reason Apache::SSI exists?

It's one of the main reasons - c content modules and Perl content
modules can't play together.

>I've been reading Apache::OutputChain and Apache::Filter trying
>to figure all this out.

Note: Apache::Filter and Apache::OutputChain are alternative solutions
to the issue.  You don't use them together (just wanted to make sure).

>If you want to know why I just don't use Apache::SSI it is because
>I am dealing with a OpenAdStream from realmedia which has a modifed
>mod_include.so which makes calls to a 'proprietary' library.
>So it seems a lot easier to just be able to send the output from my
>handler into their mod_include.

If you truly need to get them to work together, you'll have to do a LWP
request and get the document produced by mod_include, then do Perl
processing on the result.  Not pretty.

I'd suggest subclassing Apache::SSI with the same changes they've made
to mod_include.  If that's not possible, then I guess you can chalk up
the ugliness to proprietary software woes.

Of course, Apache 2.0 will have a much more flexible filtering that will
render this conversation moot.


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Re: PerlRun problem: can't find method "uri"

2001-01-11 Thread Doug MacEachern

On Thu, 4 Jan 2001, Jie Gao wrote:
 
> Another problem with PerlRun is that it seems to interfere with mod_perl
> handlers.
> 
> I have an authentication/authorisation handler, which reads in from a
> file for someinformation. After a script under PerlRun is run, the handler
> fails to read anything from that file anymore.

i can't see what's happening from this, too much missing.  can you provide
a small, but complete drop-in test case?




Re: PerlRun bug

2001-01-11 Thread Doug MacEachern

On Thu, 4 Jan 2001, Alexander Solovey wrote:

> Hi all,
> 
> There is a bug in PerlRun.pm that causes internal server error
> if PerlRun handler is called for inexistent file. I think that
> problem was introduced by this change
> 
> =item 1.24_01 - October 10, 2000
> .
> change Apache::PerlRun's Apache class relationship from is-a to has-a
> 
> There are a couple of places left where $pr->{r}->_some_method_() should be
> called instead of $pr->_some_method_(). One of them is already noted -- call
> to uri() in sub error_check.
> 
> Here is the patch:

applied, thanks.




mixing perl and c module on handler stack

2001-01-11 Thread Danny Rathjens

In looking at the mod_perl_2.0 features I noticed this:
> The AddFilter directive takes any number of filters, for example,
> this configuration will first send the output to mod_include, which
> will in turn pass its output down to Apache::ReverseFilter:
> AddFilter INCLUDE Apache::ReverseFilter

Is there any way to pipe output from my own handler into mod_include
and thence into GzipChain like the above?
or is the inability to do this the reason Apache::SSI exists?

I've been reading Apache::OutputChain and Apache::Filter trying
to figure all this out.

If you want to know why I just don't use Apache::SSI it is because
I am dealing with a OpenAdStream from realmedia which has a modifed
mod_include.so which makes calls to a 'proprietary' library.
So it seems a lot easier to just be able to send the output from my
handler into their mod_include.
-- 
struct Programmer/Analyst 'Danny Rathjens' {this.place = "MyCity.com";}
"Only those who leisurely approach that which the masses are busy about
can be busy about that which the masses take leisurely." -- Lao Tsu



Re: mod_perl large scalar cache

2001-01-11 Thread Doug MacEachern

On Wed, 3 Jan 2001, George Sanderson wrote:

> I have a mod_perl hash scalar that can store up to 4 MB of string data.
> 
> I was wondering what happens to the memory usage after a "delete
> $myhash{large}"?

depends on your os and perl -V:usemymalloc
e.g. linux will "give it back to the os", but i think that depends on the
size.  most others will "give it back to the process", but perl malloc
will only "give it back to Perl".

> I was thinking (I know this can be dangerous:-), it would be nice if I
> could tell mod_perl to cache scalars that become larger than some specified
> value, so that they do not chew up too large chunks of memory.

you mean to not cache?  that idea has/is-being considered for 2.0, a
thread that combs interpreters not in use for things like this.
and/or looking into implementing 'use less memory' in Perl itself.




Re: vars vs fqdn vs our benchmark

2001-01-11 Thread Ken Williams

[EMAIL PROTECTED] (Doug MacEachern) wrote:
>On Tue, 26 Dec 2000, Ken Williams wrote:
>> [EMAIL PROTECTED] (Stas Bekman) wrote:
>> >A combination of C and C pragmas keeps modules clean and
>> >reduces a bit of noise.  However, the C pragma also creates
>> >aliases, as does C, which eat up more memory.  When
>> >possible, try to use fully qualified names instead of C.
>> 
>> I have to disagree with this benchmark.  The aliases take up only the
>> tiniest bit of memory, much less than your benchmark seems to indicate. 
>
>they can add up quick:
>% perlbloat 'use POSIX ()'
>use POSIX () added  316k
>
>% perlbloat 'use POSIX'
>use POSIX added  696k
>
>that's 380k worth of aliases.  now let's say 6 different registry scripts
>'use POSIX;' for strftime or whatever, 6 * 380k = 2.3Mb

I guess we'll call that the extreme case. =)


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Re: getting rid of nested sub lexical problem

2001-01-11 Thread Doug MacEachern

On Sat, 30 Dec 2000, Chris Nokleberg wrote:
 
> oooh, cool. I've added this to Apache::DB.xs:
> 
> int
> stop_debugger()

nice, i'll add that for the next version.
 
> It appears that setting PL_perldb to zero is all that's required to turn
> off the debugger! I thought I might have to fiddle with the symbol tables
> but this seems to work.

yeah, that should do it.
 
> I've attached the latest version of Apache::NiceRegistry (suggestions
> welcome) below. Not sure this is the right thing to do , but I call
> Apache::DB::init_debugger directly because I need the return value (don't
> want to stop_debugger if it was turned on outside of this handler), and I
> don't want the warning that Apache::DB->init produces.

calling init_debugger is fine.
 
> Also, why does Apache::DB unset $Apache::Registry::MarkLine?

it was breaking Apache::SmallProf i think.  it should local-ize that
change at least.




Re: vars vs fqdn vs our benchmark

2001-01-11 Thread Doug MacEachern

On Tue, 26 Dec 2000, Ken Williams wrote:

> [EMAIL PROTECTED] (Stas Bekman) wrote:
> >A combination of C and C pragmas keeps modules clean and
> >reduces a bit of noise.  However, the C pragma also creates
> >aliases, as does C, which eat up more memory.  When
> >possible, try to use fully qualified names instead of C.
> 
> I have to disagree with this benchmark.  The aliases take up only the
> tiniest bit of memory, much less than your benchmark seems to indicate. 

they can add up quick:
% perlbloat 'use POSIX ()'
use POSIX () added  316k

% perlbloat 'use POSIX'
use POSIX added  696k

that's 380k worth of aliases.  now let's say 6 different registry scripts
'use POSIX;' for strftime or whatever, 6 * 380k = 2.3Mb

they could save 2.3Mb with 'use POSIX ();' and fully qualifying POSIX::
function calls.

so a few 'use vars ()' here and there doesn't eat that much, your call.




Re: perl's memory leak

2001-01-11 Thread Doug MacEachern

On Fri, 8 Dec 2000, Perrin Harkins wrote:
 
> Unfortunately, GTop is kind of a pain to compile.  It seems to depend on
> some Gnome stuff.  We use Apache::SizeLimit for this reason, and it works
> well.

there's a configure --disable-gnome switch for libgtop.  can still be a
pain though.




Re: An idea on END_REQUEST handler

2001-01-11 Thread Doug MacEachern

On Wed, 22 Nov 2000, Andrei A. Voropaev wrote:

> Hi!
> 
> Everyone knows that END handlers in packages under mod_perl are executed
> only when apache terminates. But from time to time there might be a need to
> execute something when the Request is finished.
> 
> In practice what I do in these cases is install PerlCleanupHandler which
> checks all loaded packages and if they define 'END_REQUEST' function then
> execute that function.
> 
> Maybe it's worth making it standart feature of mod_perl?

considering you can do this:

package My::Module;

$Apache::ReadConfig::Location{'/'}->{PerlCleanupHandler}
  = join '::', __PACKAGE__, 'cleanup';

sub cleanup {
my $r = shift;
warn "cleanup in $$\n";
}

cleanup() will be called without touching httpd.conf.
a small module to cut down the noise should do the trick for you.

checking all packages by default would be far too expensive to be a
standard feature.




Re: Apache::Registry + errors in a browser

2001-01-11 Thread dougm

On Sun, 19 Nov 2000, Jacek Ostrowski wrote:

> hi,
> 
> I have a litle suggestion to Apache::Registry - 
> I tried to change it to allow script writers 
> to see compile errors in a browser.
>   
> I'am using mod_perl at my work ( its great - you know )
> but there are few other people working on the same server with me. 
> All our error messages went to one log file, it was very inconvinient. 
> I hacked your Apache::Registry to pass all error messages from 'eval's
> to browser.
> 
> I would like you to include something like I did in future releases or
> to change Apache::Registry in a way allowing to add this 'feature'
> externally (in new module).
> 
> I'm attatching my hacked Registry.pm. ( I hope )

thanks for your contribution, however, Apache::Registry is not accepting
any new features.  have a look at Apache::{PerlRun,RegistryNG,RegistryBB}
new features should fit in here or be in its own subclass.  i don't think
the $Apache::Registry::Debug functionality was ever carried over.




RE: security suggestion

2001-01-11 Thread Doug MacEachern

On Fri, 17 Nov 2000, mgraham wrote:
 
> Maybe another approach would be to explicitly list the handlers that
> are allowed to be used in any given context.  Kind of
> like 'Options', but for perl handlers.  Something like 'PerlOptions',
> perhaps?
> 
> 
> PerlOptions "My::AuthHandler My::ContentHandler My::TransHandler"
> 

something like that is already implemented in mod_perl-2.0:
http://perl.apache.org/~dougm/modperl_2.0.html

probably will not happen for 1.xx




Re: PerlChildInitHandler not being called

2001-01-11 Thread Doug MacEachern

On Tue, 2 Jan 2001, Paul J. Lucas wrote:

>   I looked in the archives for this problem and, while mentioned,
>   not definitive solution was apparantly found.  I did notice the
>   handler get called once, but only once: total server shutowns
>   and restarts don't make it get called.
> 
>   I'm using Apache 1.3.12, mod_perl 1.24_01, Perl 5.6 under Linux.

the distribution test suite has a ChildInitHandler that does this:
$s->warn("[notice] child_init for process $$, report any problems to $sa\n");

% make start_httpd_fork
% grep 'child_init for process' t/logs/error_log | wc -l
  5
% echo > t/logs/error_log 
% kill -HUP `cat t/logs/httpd.pid `
%  grep 'child_init for process' t/logs/error_log | wc -l
  5
% echo > t/logs/error_log
% kill -USR1 `cat t/logs/httpd.pid `
%  grep 'child_init for process' t/logs/error_log | wc -l
  5
% make kill_httpd

looks like it works fine.   also using 5.6.0, linux, apache
1.3.15-dev, mod_perl-1.24_02-dev.  if you could try the above and/or 
provide a small test case that breaks, i'll have a look.





Apache::AuthCookie transfer of ownership

2001-01-11 Thread Ken Williams

Hi all,

For a long while, it's become clearer and clearer to me that I need to
hand off ownership of the Apache::AuthCookie module to someone else.  I
haven't been able to keep up with the many development requests, even
when they've been perfectly reasonable and probably fairly simple to
execute.

Therefore, I've decided to cede ownership to Michael Schout (the author
of Apache::AuthTicket, a subclass of Apache::AuthCookie), who has
graciously accepted the offer.  He's asked me to provide him an email
archive of past feature requests, bug reports, and the like.  I'll do
that, and if you're still actively hoping to affect some particular
change in the module, you might drop him a line directly
([EMAIL PROTECTED]).

I'm quite pleased that this neglected module will find a new owner who
can take it in new and better directions.


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Re: How to recognize server shutdown?

2001-01-11 Thread Perrin Harkins

On Thu, 11 Jan 2001, Doug MacEachern wrote:
> of course, there is such a "trick"
> 
>[EMAIL PROTECTED]">http://forum.swarthmore.edu/epigone/modperl/thandflunjimp/[EMAIL PROTECTED]

Documentation patch attached.
- Perrin


1039a1040,1046
> Cleanup functions registered in the parent process (before forking) will run
> once when the server is shut down:
> 
>#PerlRequire startup.pl
>warn "parent pid is $$\n";
>Apache->server->register_cleanup(sub { warn "server cleanup in $$\n"});
> 



Re: Specific limiting examples (was RE: Apache::SizeLimit for unsharedRAM ???)

2001-01-11 Thread Perrin Harkins

On Thu, 11 Jan 2001 [EMAIL PROTECTED] wrote:
> > I think you're making this much harder than it needs to be.  It's this
> > simple:
> > MaxClients 30
> > PerlFixupHandler Apache::SizeLimit
> > 
> >   use Apache::SizeLimit;
> >   # sizes are in KB
> >   $Apache::SizeLimit::MAX_PROCESS_SIZE   = 3;
> >   $Apache::SizeLimit::CHECK_EVERY_N_REQUESTS = 5;
> > 
> This is just like telling an ISP that they can only have 60ish dial
> in lines for modems because that could theoreticly fill their T1.  Even
> though they would probably hardly even hit 50% if they only had 60 modems
> for a T1.
> 
> The idea that any process going over 30 megs should be killed is probably
> safe.  The solution though is only really valid if our normal process is
> 29 megs.  Otherwise we are limiting each system to something lower then it
> produce.

It's a compromise.  Running a few less processes than you could is better
than risking swapping, because your service is basically gone when you hit
swap.  (Note that this is different from your ISP example, because the ISP
could still provide some service, albeit with reduced bandwidth, after
maxing out it's T1.)  The numbers I put in here were random, but in a real
system you would adjust this according to your expected process size.

Even a carefully coded system will leak over time, and I think killing off
children after 1MB of growth would probably be too quick on the draw.  
Child processes have a significant startup cost and there's a sweet spot
between how big you let the processes get and how many you run which you
have to find by testing with a load tool.  It's different for different
applications.

It would be nice if Apache could dynamically decide how many processes to
run at any given moment based on available memory and how busy the server
is, but in practice the best thing I've found is to tune it for the worst
case scenario.  If you can survive that, the rest is cake.  Then you can
get on to really hard things, like scaling your database.

- Perrin




RE: modperl causing exception as NT service

2001-01-11 Thread Randy Kobes

On Thu, 11 Jan 2001, Rich Buckley wrote:

> > Has anyone experienced the following exception when stopping Apache 
> > as a service. 
> 
> Found a patch in the archives submitted last Oct by John K. Sterling 
> that would appear to be appropriate. Does anyone have a win32 modperl 
> compiled that has this patch applied ?

This patch is applied in the current mod_perl cvs version, which I think
was being used 

best regards,
randy kobes




Re: Specific limiting examples (was RE: Apache::SizeLimit for unsharedRAM ???)

2001-01-11 Thread modperl



On Thu, 11 Jan 2001, Perrin Harkins wrote:
> On Thu, 11 Jan 2001, Rob Bloodgood wrote:
> > Second of all, with the literally thousands of pages of docs necessary to
> > understand in order to be really mod_perl proficient
> Most of the documentation is really reference-oriented.  All the important
> concepts in mod_perl performance tuning fit in a few pages of the guide.
> > I mean, 1GB is a lot of ram.
> It's all relative.  If you have significant traffic on your site, 1GB RAM
> might not be nearly enough.
Definatly true.  Our site has a total of 26 gigs of ram between all
servers.  In some places our site could use more ram(the database) in
other cases, it gives us 500 megs that rarely get used except in the
biggest peak.

> I think you're making this much harder than it needs to be.  It's this
> simple:
> MaxClients 30
> PerlFixupHandler Apache::SizeLimit
> 
>   use Apache::SizeLimit;
>   # sizes are in KB
>   $Apache::SizeLimit::MAX_PROCESS_SIZE   = 3;
>   $Apache::SizeLimit::CHECK_EVERY_N_REQUESTS = 5;
> 
This is just like telling an ISP that they can only have 60ish dial
in lines for modems because that could theoreticly fill their T1.  Even
though they would probably hardly even hit 50% if they only had 60 modems
for a T1.

The idea that any process going over 30 megs should be killed is probably
safe.  The solution though is only really valid if our normal process is
29 megs.  Otherwise we are limiting each system to something lower then it
produce.

Scott




mod_perl book chapter 4 script error

2001-01-11 Thread Tom Kralidis

Hi,

I'm trying to implement the guestbook script from the modperl book by Stein 
and MacEachern.  I am using the guestbook_lean.pl example (light weight 
replacements.

I have a working Apache 1.3.14/mod_perl 1.24_01 on a RedHat 6.2 box.

The error I incur is:

[Thu Jan 11 21:00:45 2001] [error] [Thu Jan 11 21:00:45 2001] null: Can't 
use string ("1") as
a symbol ref while "strict refs" in use at /www/cgi-perl/gb2.cgi line 109.

Any idea why this is happening?

..Tom
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: Specific limiting examples (was RE: Apache::SizeLimit for unsharedRAM ???)

2001-01-11 Thread Jimi Thompson

I think that the problem here is that we've asked for more info and he hasn't
supplied it.  He's given us generics and as a result has gotten generic
answers.

1) What are the average hits per second that you are projecting this box to
handle?
2) What is the peak hits per second that you are project this box to handle?
3) We know you have a gig of ram, but give us info on the rest of the platform?

4) What's your OS like? Solaris, AIX, HP-UX, Linux, FreeBSD, etc.  & which
version and/or flavor
5) What other processes are you running?
6) Do you have a Database?  Which one? A gig of ram is nothing to Oracle
6a) Will be running queries constantly or will you be caching a lot?
7)  What other modules are you running?  PhP? SpeedyCGI? Axkit? Cocoon?
In short what is the server DOING at any given moment.  Until folks have a feel
for this no one is going to be able to offer you any insight beyond what you
already have.

Perrin Harkins wrote:

> On Thu, 11 Jan 2001, Rob Bloodgood wrote:
> > Second of all, with the literally thousands of pages of docs necessary to
> > understand in order to be really mod_perl proficient
>
> Most of the documentation is really reference-oriented.  All the important
> concepts in mod_perl performance tuning fit in a few pages of the guide.
>
> > I mean, 1GB is a lot of ram.
>
> It's all relative.  If you have significant traffic on your site, 1GB RAM
> might not be nearly enough.
>
> > And finally, I was hoping to prod somebody into posting snippets of
> > CODE
> > and
> > httpd.conf
> >
> > that describe SPECIFIC steps/checks/modules/configs designed to put a
> > reasonable cap on resources so that we can serve millions of hits w/o
> > needing a restart.
>
> I think you're making this much harder than it needs to be.  It's this
> simple:
>
> MaxClients 30
>
> PerlFixupHandler Apache::SizeLimit
> 
>   use Apache::SizeLimit;
>   # sizes are in KB
>   $Apache::SizeLimit::MAX_PROCESS_SIZE   = 3;
>   $Apache::SizeLimit::CHECK_EVERY_N_REQUESTS = 5;
> 
>
> If you're paranoid, you can throw BSD::Resource in the mix to catch
> things like infinite loops in your code.
>
> None of this will make your code faster or your server bigger.  It will
> just prevent it from going into swap.  Having too much traffic can still
> hose your site in lots of other ways that have nothing to do with swap and
> everything to do with the design of your application and the hardware you
> run it on, but there's nothing mod_perl-specific about those issues.
>
> - Perrin

--
Jimi Thompson
Web Master
Link.com

"It's the same thing we do every night, Pinky."





Re: Need Some Help

2001-01-11 Thread Stas Bekman

On Thu, 11 Jan 2001, Perry Edward  (tsp2emp) wrote:

> I have just downloaded 2 Modules from cpan.org. They appear to be compiling
> and installing fine but I am having problems. I was hoping someone could
> give me some direction to look in
> DBI
> mod_perl
>
>
> When I start Apache I receive an error "Rebuild with -DPERL_STACKED_HANDLERS
> to $r->push_handlers at /usr/local/lib/perl5/site_perl/5.005/Apache/DBI.pm
> line 30."
>
> Apache is installed in /opt/Apache version 1.3
>
>
> I have enabled "PERL_CHILD_INIT" and "PERL_STACKED_HANDLERS" when compiling
> mod_perl and it showed as enabled but when compiling everything
> (Apache/Mod_Perl) the compilers commands show "-DNO_PERL_STACKED_HANDLERS"
> and "-DNO_PERL_CHILD_INIT".
>
> So I did a make clean
> did the configuration over again but before I did a make
> I went though ever Makefile and changed "-DNO_PERL" to "-DPERL_" but
> made no change in the out come of my problem.

Have you read the docs? Try:

  % perl Makefile.PL PERL_STACKED_HANDLERS=1

or

  % perl Makefile.PL EVERYTHING=1


>
>
> Any suggestions or direction would be most appreciated.
>
> Edward Perry
>
>
>
>



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: Specific limiting examples (was RE: Apache::SizeLimit for unsharedRAM ???)

2001-01-11 Thread Perrin Harkins

On Thu, 11 Jan 2001, Rob Bloodgood wrote:
> Second of all, with the literally thousands of pages of docs necessary to
> understand in order to be really mod_perl proficient

Most of the documentation is really reference-oriented.  All the important
concepts in mod_perl performance tuning fit in a few pages of the guide.

> I mean, 1GB is a lot of ram.

It's all relative.  If you have significant traffic on your site, 1GB RAM
might not be nearly enough.

> And finally, I was hoping to prod somebody into posting snippets of
> CODE
> and
> httpd.conf
> 
> that describe SPECIFIC steps/checks/modules/configs designed to put a
> reasonable cap on resources so that we can serve millions of hits w/o
> needing a restart.

I think you're making this much harder than it needs to be.  It's this
simple:

MaxClients 30

PerlFixupHandler Apache::SizeLimit

  use Apache::SizeLimit;
  # sizes are in KB
  $Apache::SizeLimit::MAX_PROCESS_SIZE   = 3;
  $Apache::SizeLimit::CHECK_EVERY_N_REQUESTS = 5;


If you're paranoid, you can throw BSD::Resource in the mix to catch
things like infinite loops in your code.

None of this will make your code faster or your server bigger.  It will
just prevent it from going into swap.  Having too much traffic can still
hose your site in lots of other ways that have nothing to do with swap and
everything to do with the design of your application and the hardware you
run it on, but there's nothing mod_perl-specific about those issues.

- Perrin




Need Some Help

2001-01-11 Thread Perry Edward (tsp2emp)



I have just 
downloaded 2 Modules from cpan.org. They appear to be compiling and 
installing fine but I am having problems. I was hoping someone could give me 
some direction to look in
DBI
mod_perl
 
 
When I start Apache 
I receive an error "Rebuild with -DPERL_STACKED_HANDLERS to $r->push_handlers 
at /usr/local/lib/perl5/site_perl/5.005/Apache/DBI.pm line 
30."
 
Apache is installed 
in /opt/Apache version 1.3
 
 
I have enabled 
"PERL_CHILD_INIT" and "PERL_STACKED_HANDLERS" when compiling mod_perl and it 
showed as enabled but when compiling everything (Apache/Mod_Perl) the compilers 
commands show "-DNO_PERL_STACKED_HANDLERS" and 
"-DNO_PERL_CHILD_INIT".
 
So I did a make 
clean 
did the 
configuration over again but before I did a make
I went though ever 
Makefile and changed "-DNO_PERL" to "-DPERL_" but made no change in the 
out come of my problem.
 
 
Any suggestions or 
direction would be most appreciated.
 
Edward 
Perry
 
 
 


RE: E-COMMERCE-SITE-DESIGN-HOWTO [was: Re: Specific limiting examples(was RE: Apache::SizeLimit for unshared RAM ???)]

2001-01-11 Thread Rob Bloodgood


> You simply cannot come forward and say, "look, I've got this big-assed
> linux box, why is my site sucking?" We don't know, and it's neither our

granted.  never my intention.
i described the box only to illustrate that i (should) have sufficient HW.

> The very, very best minds in production architecture out there will pine
> over how much accessing data from RAM sucks - they want all cache, all the
> time. There is not a linear falloff in performance from cache -> RAM ->
> disk, and you should not expect one from the applications which rely on
> those things.

F*** if I care about cache.  I just want to stay in RAM (where I can build
my own caches :-)

> The httpd.conf file is extremely well documented. There is a program in
> $APACHE/bin called 'ab,' and will give you a decent baseline from which to
> provision for your site, and etc.


I can see I gave the wrong impression by several miles.

I was never asking, "HOW DO I DO THIS?"  I have the same web and same
manpages and same apache/perl/mod_perl source as you do.

I'm a professional.  I have a big computing issue.  I was asking (other
professionals, who have similar big computing issues):

WHAT DID *YOU* DO?

Hopefully that's more clear.  I don't WANT to sound cocky or superior or too
lazy/cool to RTFM.  I just want to discuss EXAMPLES of solutions to this
(what seems to be rather common) type of issue.

L8r,
Rob




Confusion between script in mod_perl

2001-01-11 Thread Pierre Laplante


I am using Registry with mod_perl and virtual host.
Some time my scripts get confuse.
If I do a stack backtrace,

For example:

/usr/local/website/caisses/cgi-bin/caisses:1:SedNove::xml,
/usr/local/website/sednove/cgi-bin/nf,1079,SedNove::xml::raise,10,
2:SedNove::oper,
/usr/local/website/sednove/cgi-bin/nf,2943,SedNove::xml::xmlread,1,0,,,0,

As you can see the program is going from one script to the other one
without any reason.

I have a startup file that look like:

$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not Perl!";
 
use Apache::Registry ();   # for things in the "/programs" URL
 
 # pull in things we will use in most requests so it is read and compiled
 # exactly once

use CGI (); CGI->compile(':all');
use CGI::Carp ();
use DB_File;

The version of my program are:

Apache/1.3.12 (Unix) mod_perl/1.24

Any Idea why its doing that?


-- 
Pierre Laplante
SedNove Inc.





Re: Edmund Mergl

2001-01-11 Thread Edmund Mergl

John D Groenveld wrote:
> 
> Good to see you alive, well, and still coding Perl.
> 
> Months ago, about the time of the Perl conference so it may have slipped
> under everyone's radar, Jeff Horn from U of Wisconsin sent you some patches
> to Apache::DBI to use Oracle 8's re-authenticate function instead of
> creating and caching a separate Oracle connection for each user. Did you
> decide whether to incorporate them or to suggest another module name for
> him to use? I wasn't  able to participate in the discussion at the time,
> but I now have need for that functionality. I don't know if Jeff Horn is
> still around, but I'll track him down if necessary and offer to work on it.
> 

Last info from Jeff was, that he was working on a patch which would provide 
this functionality as a general feature. I don't like the idea to start 
putting DB-specific features into Apache::DBI. But if this feature is available 
for other databases as well, I would add it to the module.


> Also, I sent you a small patch to fix Apache::DBI warnings under Perl5.6.
> I hate to be a pest, but I'm rolling out software where the installation
> procedure requires the user to fetch Perl from Active State and Apache::DBI
> from CPAN. I'd rather not ship my own version of yours or any CPAN module.
> 
> Thanks,
> John
> [EMAIL PROTECTED]


Edmund


-- 
http://www.edmund-mergl.de
fon: +49 700 edemergl



Re: Too many connections with DBI

2001-01-11 Thread Edmund Mergl

Scott Alexander wrote:
> 
> Hi,
> 
> Why do I see this in the log
> 
> 13402 Apache::DBI need ping: yes
> 13402 Apache::DBI new connect to
> 'my_dbmy_usermy_passwdAutoCommit=1PrintError=1'
> 
> when I have in the startup.pl file
> 
> Apache::DBI->connect_on_init
>  ("DBI:mysql:my_db",
>   "my_user",
>   "my_passwd",
>   {
>PrintError => 1, # warn() on errors
>RaiseError => 0, # don't die on error
>AutoCommit => 1, # commit executes immediately
>   }
>  );
> 
> Is it because the child has reached it's maximum life ?


most probably, check the parameter MaxRequestsPerChild in httpd.conf.


> 
> How many connections can you have open from DBI to mysql ?
> 
> I have 9 db's with 10 children ~ 90 connections .
> 
> All use the same user.
> 
> Should I increase the memory from 256 MB to ?


the number of open connections to mysql may be limited
by the database, but it is not limited by DBI or Apache::DBI.
Memory might help if your machine is swapping. But low on
memory can not be the reason for any re-connect.


> 
> I have read http://perl.apache.org/guide/databases.html
> 
> Scott
> 
> _
> scott alexander
> tietoverkkosuunnittelija
> humak amk - finland
> +358(0)407505640


Edmund


-- 
http://www.edmund-mergl.de
fon: +49 700 edemergl



E-COMMERCE-SITE-DESIGN-HOWTO [was: Re: Specific limiting examples(was RE: Apache::SizeLimit for unshared RAM ???)]

2001-01-11 Thread Blue Lang


On Thu, 11 Jan 2001, Rob Bloodgood wrote:

> > RB> Alright, then to you and the mod_perl community in general, since
> > RB> I never saw a worthwhile resolution to the thread "the edge of
> > RB> chaos,"

(Warning, sweeping generalizations for the sake of illustration below.)

Hi Rob.

Here's how you design an e-commerce site:

Figure out how many users you want to service.
Figure out how much juice it takes to service each user.
Multiply.
Add 50%.
Build.

You simply cannot come forward and say, "look, I've got this big-assed
linux box, why is my site sucking?" We don't know, and it's neither our
job nor our business to know. I saw many very, very good explanations on
the 'edge of chaos' thread, a couple of which actually led me to make some
tweaks on my own site. I'll try to recap it:

You should never be anywhere near any fine line - the risk is just too
great. Swap kills web sites. Queueing kills web sites. People looking for
'graceful degradation' in a production web architecture are looking for
the wrong answer. Unix is not designed to degrade gracefully - Linux even
less so. They are both designed to go balls-out as long as they have CPU
and RAM space to do so, and that's what they do.

The very, very best minds in production architecture out there will pine
over how much accessing data from RAM sucks - they want all cache, all the
time. There is not a linear falloff in performance from cache -> RAM ->
disk, and you should not expect one from the applications which rely on
those things.

The httpd.conf file is extremely well documented. There is a program in
$APACHE/bin called 'ab,' and will give you a decent baseline from which to
provision for your site, and etc.

If you have a specific problem, and ask a specific question, you will get,
usually, an outstanding answer, with as much technicial depth as you care
to probe for. If your question is "I'm really, really smart, why should I
have to learn all of this stuff," well, I don't think this is the list for
ya.

Hope that helps,

-- 
   Blue Lang, Unix Voodoo Priest
   202 Ashe Ave, Apt 3, Raleigh, NC.  919 835 1540
"I was born in a city of sharks and sailors!" - June of 44




Specific limiting examples (was RE: Apache::SizeLimit for unshared RAM ???)

2001-01-11 Thread Rob Bloodgood

> RB> Alright, then to you and the mod_perl community in general, since
> RB> I never saw a worthwhile resolution to the thread "the edge of
> RB> chaos,"
>
> The resolution is that the machine was powerful enough.  If you're
> running your mission critical service at "the edge of chaos" then
> you're not budgeting your resources properly.  You should have at
> least a 50% room for expansion.  That is, you should run your machines
> around 50% of their maximum load so you have room to absorb the spikes
> in traffic.

Well, yes and no... the HW is PLENTY powerful enuff, and I *know* I'm not
budgeting resources properly.

First of all, I'm a true geek... I can melt *any* machine. :-)

Second of all, with the literally thousands of pages of docs necessary to
understand in order to be really mod_perl proficient, I'm not at all
surprised or embarrassed that there are things about tuning a high-powered
server environment that I don't know.

Thirdly, I don't have significant load, for the most part.  I have designed
everything I've written to have as little impact on each specific phase of
the transaction process as possible.  On my most important server, a dual
PIII/600 w/ 2GB of RAM, part of my problem is that I put in the second GB
when I'm *CONVINCED* that all I needed to do was find the fine line of
resource limitation that would prevent meltdown... I mean, 1GB is a lot of
ram.

And finally, I was hoping to prod somebody into posting snippets of
CODE
and
httpd.conf

that describe SPECIFIC steps/checks/modules/configs designed to put a
reasonable cap on resources so that we can serve millions of hits w/o
needing a restart.

I know I'm not dumb... in fact, I know I'm exceptionally good.  But with the
ridiculous number of things I have to keep track of (being head geek is
always a busy job), I still haven't been able to wrap my mind around the
correct usage(s) of the various resource limiting modules.  A working
example (even for a completely different machine) would make my job 10 times
easier.

L8r,
Rob




Installation Problems

2001-01-11 Thread David Campion



Apologies if this 
has been covered before but i'm new to this.
 
I am having problems 
compiling source files.  Every time I try I get errors say that cputype 
does not match architecture type.
 
I am running Mac OS 
X Server version 1.2.
 
Please can someone 
shed some light on my dilema.
 
Dave.


Re: How to recognize server shutdown?

2001-01-11 Thread Ernest Lergon

Doug MacEachern wrote:
>
>> I meant "is there a way to run a cleanup handler in the parent after it's
>> work is done?", but I don't see one.  Dave says the END block trick worked
>> for him, so maybe it only fails under certain circumstances.
>>
> of course, there is such a "trick"
> 
>[EMAIL PROTECTED]">http://forum.swarthmore.edu/epigone/modperl/thandflunjimp/[EMAIL PROTECTED]

Sorry, I should have dropped earlier into this thread: Doug's "trick"
works great for me!

Thanks!

Ernest




--
Yours sincerely
Mit freundlichen Grüßen

Ernest Lergon

VIRTUALITAS
Artists online, Fine Arts online, Poets online
http://www.virtualitas.com/




Re: How to recognize server shutdown?

2001-01-11 Thread Doug MacEachern

On Wed, 10 Jan 2001, Stas Bekman wrote:
 
> All we need is to add a $Apache::Server::Quitting or alike, in addition to
> the existing $Apache::Server::Starting and $Apache::Server::ReStarting,
> should be an easy patch in XS.

nooo, as i've mentioned before Starting,ReStarting variables were
mistakes, and they will be either deprecated or more likely non-existent
in 2.0





Re: How to recognize server shutdown?

2001-01-11 Thread Dave Rolsky

On Thu, 11 Jan 2001, Perrin Harkins wrote:

> I meant "is there a way to run a cleanup handler in the parent after it's
> work is done?", but I don't see one.  Dave says the END block trick worked
> for him, so maybe it only fails under certain circumstances.

Actually, I should have pointed out that I haven't yet tested it in
mod_perl.  I tested it in an environment where I was spawning some of my
own proceses.  That worked.  I'll test it in mod_perl soon.


-dave

/*==
www.urth.org
We await the New Sun
==*/




Re: How to recognize server shutdown?

2001-01-11 Thread Doug MacEachern

On Thu, 11 Jan 2001, Perrin Harkins wrote:

> > > but it's a bummer that the parent
> > > doesn't run END blocks.  Will it run cleanup handlers?
> >
> > Cleanup handlers are run by child processes. What it has to do with
> > parent? Or do I miss something?

cleanup handlers are run when a pool is cleared.  the request lifetime
pool is one pool, the server lifetime pool is another, etc.

> I meant "is there a way to run a cleanup handler in the parent after it's
> work is done?", but I don't see one.  Dave says the END block trick worked
> for him, so maybe it only fails under certain circumstances.

of course, there is such a "trick"
[EMAIL PROTECTED]">http://forum.swarthmore.edu/epigone/modperl/thandflunjimp/[EMAIL PROTECTED]




Re: [OT] Availability of Jobs -- was Re: [SOLICITATION] Programmer available for contracting..

2001-01-11 Thread Eric Strovink

Are you a programmer?  Have you showered recently?  You're married.

"J. J. Horner" wrote:

> "How do you expect women to know you[']r[e] married if you don't wear the ring?", 
>[my wife]
> asked.




Re: [OT] Availability of Jobs -- was Re: [SOLICITATION] Programmer available for contracting..

2001-01-11 Thread J. J. Horner

* Michael Bacarella ([EMAIL PROTECTED]) [010111 10:32]:
> > Is this an odd time of year for many contractors where the contract ends 
> > around the holiday season? Or is this starting to be a symptom of dotcoms 
> > going bust and the development market starting to level out?
> 
> I'm actually happily employed doing mod_perl (among things). I just
> wouldn't mind some extra income as well as an opportunity to meet
> new people.
> 
> *shrug*
> 
> -- 
> Michael Bacarella <[EMAIL PROTECTED]>
> Technical Staff / New York Connect.Net, Ltd
> Daytime Phone: (212) 581-2831

Yeah, who wouldn't mind some extra cash.  For instance:

My wife got mad at me for not wearing my wedding ring a few days in a row.
It has just slipped my mind, but she was a little hot over it.  
"How do you expect women to know your married if you don't wear the ring?", she asked.
"Honey," I replied," I'll just open my wallet.  They'll see the moths making a winter 
home
and know immediately that I'm married."

That didn't help matters much.  Imagine that.

-- 
J. J. Horner
[EMAIL PROTECTED]

Apache, Perl, mod_perl, Web security, Linux


 PGP signature


Re: Apache::ASP compiling extensions

2001-01-11 Thread Aaron Johnson

Joshua Chamas wrote:

> Aaron Johnson wrote:
> >
> > If what you are saying is that current EmbPerl code would be able to run
> > almost unchanged under ASP that would be very interesting, but presently
> > my biggest issues with Apache::ASP are:
> >
> > - Doesn't "help" with any HTML.
> >
>
> I think I know what you mean, and I'm not sure that's its worth
> developing those things, is this a big priority?
>
> Embperl:
> 
>   
> [+ $multi[$row][$col] +]
>   
> 
>
>  VS.
>
> ASP:
> 
>  <% for my $row (0..$#multi) { %>
>
><% for my $col (0..$#array) { %>
>  <%= $multi[$row][$col] %>
><% } %>
>
>  <% } %>
> 
>

There are other things, like auto href, form elements etc. that are very helpful.  
Perhaps it is the
lack of examples then on how to emulate some of the functions from other modules.

>
> > - QueryString and Form from the Response are separate, this makes a
> > programming headache if you are used to Embperl or if you are not sure
> > what type of input is coming in for some reason.

>
>
> sub Script_OnStart {
>   $Form = { %{$Request->{Form}}, %{$Request->{QueryString} };
> }
>
> does this need a config?
>

I think to help people coming from CGI or EmbPerl that are used to having all params 
in the same
place that having $Form be automatic is a must have. You can have it be an option in 
the globals if
there is any potential performance hit for doing it I suppose ( could it even be on if 
the passed
information was huge since it is referenced or does it have dereference then build a 
new reference?
).  One less thing to add to "remember/keep track" of.  Remember I am a Lazy Perl 
programmer :^).  I
want things under mod_perl to be as simple as possible for new comers, I think have 
POST and GET in
separate variables is only relevant to people coming from MS ASP platform, which is 
good, but not at
the expense of proficient CGI programmers.

>
> > Shouldn't they just be the same information?
> > Is there a need to keep them separate?
>
> Its the ASP API.  I just ported it.
>
> > - Slow processing time, on the Hello World test it is one of the slower
> > ones.  EmbPerl 2.0 is supposed to be even faster then the present
> > version.
> >
>
> Huh?  From http://www.chamas.com/bench/hello.tar.gz, so you
> can run it yourself ...
>
> hello]# ./bench.pl -version -time=15 ASP Embperl
>
> Test Name  Test File  Hits/sec   Total Hits Total Time sec/Hits  
> Bytes/Hit
>    -- -- -- -- 
>-- --
> Apache::ASP v2.09 2000 h2000.asp   229.1 3444 hits  15.03 sec  0.004365  
> 28997 byte
> HTML::Embperl v2.0a18 2000 h2000.epl   248.7 3732 hits  15.01 sec  0.004022  
> 28809 byte
> Apache::ASP v2.09  hello.asp   395.1 5933 hits  15.02 sec  0.002531  
> 241 bytes
> HTML::Embperl v2.0a18  hello.epl   461.4 6933 hits  15.03 sec  0.002167  
> 219 bytes
>
> Apache Server Header Tokens
> ---
> (Unix)
> Apache/1.3.14
> OpenSSL/0.9.6
> PHP/4.0.3pl1
> mod_perl/1.24
> mod_ssl/2.7.1
>
> PERL Version: 5.00503
>
> Operating System: Linux 2.2.14-5.0smp (root@porky) (gcc egcs-2.91.66) #1 2CPU [gate]
>
> Sorry, I can't get it much faster on hello world, Embperl is written
> in C, Apache::ASP in perl.  But check out the h2000 tests, much more
> representative of real world templates, not just startup time.
>

My bad, I hadn't looked at the latest results and I wasn't reading the h2000 results 
correctly.

>
> > - Poor error reporting.  This seems to be possibly a resurfaced bug, but
> > when use strict is turned on ( not the global one, but on a per page
> > level ) when testing a page for compliance it gives no intelligent error
> > message as to where the problem might be.  I see in the docs where this
> > has been addressed (fixed) before.
>
> I haven't seen this in a while, give me a test script & I'll fix it.
>

<%
use strict;
$greeting = "Hello";
print "$greeting";
%>
( used Apache::ASP 2.03 and it worked correctly, 2.07 on a different machine and it 
didn't )

This gets me undefined subroutine as the error message.  If I comment out 'use strict' 
it runs fine.

I am getting different messages on more complex pages, but this was working correctly 
before, but I
am not sure when it broke. ( post 2.03 maybe )

>
> > - No automatic variable clean up.  I think EmbPerl runs each page as its
> > own package to keep things "clean" is that possible under Apache::ASP?
> >
>
> ASP does have a UniquePackages feature that could possibly make use
> of this garbage collection, but then you are not in the same package
> as global.asa where you get to init easy to use globals & such,
> its a trade off.
>
> To do things really cleanly, keep one global hash for per
> process data, and then undef it in Script_OnEnd.  The rest
> should be caught by the UseStrict config.
>
> > - No auto form fillin.  I know this has been discussed, I have even made
> > crude code t

Re: Please help me get out of the list

2001-01-11 Thread Peter Farmer

Assil,

>From [EMAIL PROTECTED]

> If despite following these instructions, you do not get the
> desired results, please contact my owner at
> [EMAIL PROTECTED] Please be patient, my owner is a
> lot slower than I am ;-)

HTH


Peter

Peter Farmer
Systems Engineer
blueyonder
ICQ - 55297879

- Original Message - 
From: "Assil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 9:24 PM
Subject: Please help me get out of the list


> It is unbelievable !
> 
> Am not able to get out of this list.
> Unsubscribe emails say:"You are not on the list ..."
> 
> Please help, please help  !!!
> 
> 
> 
> Assil
> 




RE: modperl causing exception as NT service

2001-01-11 Thread Rich Buckley
Title: RE: modperl causing exception as NT service






> Has anyone experienced the following exception when stopping Apache 
> as a service. 


Found a patch in the archives submitted last Oct by John K. Sterling 
that would appear to be appropriate. Does anyone have a win32 modperl 
compiled that has this patch applied ?



--Rich 





Please help me get out of the list

2001-01-11 Thread Assil

It is unbelievable !

Am not able to get out of this list.
Unsubscribe emails say:"You are not on the list ..."

Please help, please help  !!!



Assil




modperl causing exception as NT service

2001-01-11 Thread Rich Buckley
Title: modperl causing exception as NT service





All,


WinNT 4 SP5
Apache 3.1.14
ActiveState perl 623
modperl 1.24_02-dev


Has anyone experienced the following exception when stopping Apache
as a service. 


    Apache.exe - application error
        The instruction at "0x2806cc79" referenced memory at 
        "0x0b74". The memory could not be "read".


If the modperl LoadModule line is commented out of http.conf, the error 
fails to appear. I am not sure if Apache, modperl or Perl is the cause 
of this error.


Many thanks,


--Rich






Re: ANNOUNCE: mod_perl guide ver. 1.28

2001-01-11 Thread Matt Sergeant

On Thu, 11 Jan 2001, Stas Bekman wrote:

>
> Une nouvelle version du guide de mod_perl est en ligne et habituels aux
> endroits (My Paris farewell release :)
>
> Online:
>   HTML: http://perl.apache.org/guide/
>   PDF : http://perl.apache.org/guide/mod_perl_guide.pdf.gz
>
> CPAN:
>   file: $CPAN/authors/id/S/ST/STAS/Apache-mod_perl_guide-1.28.tar.gz
>   size: 464878 bytes
>md5: 54e70986b2369762fc37b3c7838dbd85

FWIW, Take23 copy updated to reflect this new release.

-- 


/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\




ANNOUNCE: mod_perl guide ver. 1.28

2001-01-11 Thread Stas Bekman


Une nouvelle version du guide de mod_perl est en ligne et habituels aux
endroits (My Paris farewell release :)

Online:
  HTML: http://perl.apache.org/guide/
  PDF : http://perl.apache.org/guide/mod_perl_guide.pdf.gz

CPAN:
  file: $CPAN/authors/id/S/ST/STAS/Apache-mod_perl_guide-1.28.tar.gz
  size: 464878 bytes
   md5: 54e70986b2369762fc37b3c7838dbd85

Changes:

01.11.2001 ver 1.28

* Makefile.PL: fixed to generate a correct Makefile on Solaris:
  removed space/extra new line after some manually created targets
  (Lupe Christoph)

* databases.pod:

 o "the morning bug" section was updated

* scenario.pod:

  o updated the sample squid configuration directives to work with
version 2.3.STABLE2.

* strategy.pod:

 o corrected the math example with 56k modem, where the result was
   times and not seconds (Thanks to the students from my class at
   YAPC::Europe 2000)

 o corrected the math example using the MaxClient formula (for split
   code sets)

  o verified that squid's default read-ahead (send) buffer is of 16KB

* dbm.pod:

  o reviewed/rewritten/corrected

* performance.pod:

  o corrected another math example with calculating real MaxClients
when shared memory is taken into an account (Thanks to an
anonymous bearded student from from my class at YAPC::Europe 2000)

  o new section: "Measuring the Memory of the Process"

  o The "Forking and Executing Subprocesses from mod_perl" sections
has been almost completely rewritten

  o The "Global vs. Fully Qualified Variables" section was rewritten

* modules.pod:

  o Apache::PerlVINC has changed its interface, updating to ver .03
(Todd Finney)

* help.pod:

  o "Get help with DBI and SQL" updated with new resources

  o Added a link to a tuning manual of Solaris 2.x TPC/IP stack and
other webserver related info. Useful for all Unix flavors.

* install.pod:

  o removed the section with deb package links from David
Huggins-Daines, since the link to the package is dead.

* porting.pod:

  o new tip: "Redirecting STDOUT into a Scalar" (Chris Nokleberg)

* Minor corrections:

  o perl.pod: Jean-Louis Guenego
  o performance.pod: (Richard Chen, Ulrich Neumerkel)
  o install.pod: (Artur Zambrzycki)

Enjoy

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/






Re: mod_perl + multiple Oracle schemas (was RE: Edmund Mergl)

2001-01-11 Thread Tim Bunce

On Wed, Jan 10, 2001 at 07:53:23PM -0500, Ed Park wrote:
> John--
> 
> Another thing you may want to look into is just doing an
> "alter session set current_schema" call at the top of your mod_perl page.
> This is actually significantly faster than Tim's reauthenticate solution
> (about 7X, according to my benchmarks).

But, I believe, it only does a small part of what reauthenticate does so
would be appropriate in fewer cases (eg where security wasn't an issue).

(Worth adding to the docs though, patches welcome - as always.)

Tim.



Re: How to recognize server shutdown?

2001-01-11 Thread Perrin Harkins

> > but it's a bummer that the parent
> > doesn't run END blocks.  Will it run cleanup handlers?
>
> Cleanup handlers are run by child processes. What it has to do with
> parent? Or do I miss something?

I meant "is there a way to run a cleanup handler in the parent after it's
work is done?", but I don't see one.  Dave says the END block trick worked
for him, so maybe it only fails under certain circumstances.
- Perrin




Re: How to recognize server shutdown?

2001-01-11 Thread G.W. Haywood

Hi all,

On 10 Jan 2001, Randal L. Schwartz wrote:

> Here's an idea... in the startup code, create a pipe and fork.
> block the kid on a read.  ni-night, kid.

Nice, Randall!

73,
Ged.




Re: How to recognize server shutdown?

2001-01-11 Thread Stas Bekman

On Wed, 10 Jan 2001, Perrin Harkins wrote:

> On Thu, 11 Jan 2001, Stas Bekman wrote:
> > the parent process doesn't run the END block.
>
> Randal's solution is probably better,

But it's not a very nice solution if you want to release something on CPAN
that relies on this hack. A support from mod_perl seems like a much
simpler solution.

> but it's a bummer that the parent
> doesn't run END blocks.  Will it run cleanup handlers?

Cleanup handlers are run by child processes. What it has to do with
parent? Or do I miss something?

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: Apache::DBI problem and writting a perl module!!!

2001-01-11 Thread Stas Bekman

On Thu, 11 Jan 2001, R. K . Mallah wrote:

> Stas , I do not face the problem anymore and Apache::DBI is loading
> without any problem. But i remember of facing problem at one point of time.
> may be with some older version.

Ok

> Could u please explain me  what does Apache->module do and where is
> it defined ?

Why does it matter? You won't be able to test most of the Apache:: modules
from the command line, since the environment is wrong.

>From ch9 in the eagle book:

=item module()

If you need to find out if a Perl module has already been loaded, the
I method will tell you.  Pass it the package name of the
module you're interested in.  It will return a true value if the
module is loaded.

Example:

 do { #something } if Apache->module('My::Module');

This method can also be used to test if a C module is loaded.  In this
case, pass it the filename of the module, just as you would use with the
I directive.  It will return a true value if the
module is loaded.

Example:

 do { #something } if Apache->module('mod_proxy.c');


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: [SOLICITATION] Programmer available for contracting..

2001-01-11 Thread Matt Sergeant

On Thu, 11 Jan 2001, Matt Sergeant wrote:

> Take23 are working on their jobs code as you/we speak. We'll have forms
> for both seekers and offers, and the posts will then be moderated by the
> editors, and go live in the list which will display on the front page and
> with more details on a separate jobs page.

I should mention that this is not in competition with jobs.perl.org - we
are talking to each other, but since take23 is based on AxKit its likely
to get finished faster :-)

FWIW, we're using the industry standard hr-xml, so anybody should be able
to syndicate our jobs just as they can do our news and articles if they
wish to do so.

Matt.




Re: [SOLICITATION] Programmer available for contracting..

2001-01-11 Thread Matt Sergeant

On Wed, 10 Jan 2001, Ajit Deshpande wrote:

> On Wed, Jan 10, 2001 at 11:06:49PM +0100, Stas Bekman wrote:
> > On Tue, 9 Jan 2001, Michael Bacarella wrote:
> > 
> > > Disclaimer: If these are unwanted, please let me know. I couldn't
> > > find a list policy and Everyone Else Is Doing It(TM).
> > 
> > I think that we have stated many times that job offers/seekers are welcome
> > to post as long as the proper tag is used, so others could ignore the
> > message if they aren't interested in it.
> > [..]
> 
> Is there interest in a YAJP? (YAJP == Yet Another Jobs Portal). I can 
> start a sourceforge project for the following:
> 
>   - MySQL backed
>   - Based on HTML Mason
> 
> Something like a  not-for-profit yajp.take23.org  as a forum for Job
> seekers and Job hunters in mod_perl. Of course this will be a GPLed
> project. Folks interested contact me off the list ([EMAIL PROTECTED])

Take23 are working on their jobs code as you/we speak. We'll have forms
for both seekers and offers, and the posts will then be moderated by the
editors, and go live in the list which will display on the front page and
with more details on a separate jobs page.

Matt.