Re: New mod_perl Logo

2002-01-29 Thread John Armstrong

I could not agree more. I can not compute how much of my time would have 
been saved over the last few years had I been able to say something 
like  'We are using the Orwellian AppSphere 2002 running on Apache' to 
VC's and management rather then 'Mod Perl'.

Perception counts I am affectionate towards the mod_perl name after 
so many years but its really not optimal.

John-


On Tuesday, January 29, 2002, at 04:29 PM, Chris Thompson wrote:

 On Tue, 29 Jan 2002, Jonathan M. Hollin wrote:
 Ideas for logos, banners, powered by-type buttons are all welcome.

 Well, I'd like to just throw one idea into the mix. It's something 
 that's
 bugged me for a long time, no better time than the present.

 mod_perl is a lousy name.

 There, I've said it.

 For any number of reasons, perl does now and will always face an uphill
 struggle in any Enterprise application.




Strange Apache 2.0 rewrite/proxy issue

2002-01-03 Thread John Armstrong

This 'seems' to be a modperl issue.

My configuration. I needed a 1.1 compliant reverse proxy in order to 
support Chunked encoding for an xml gateway.

Since only Apache 2.0 has a 1.1 compliant reverse proxy I replaced my 
Apache 1.3.14 standard apache wth an Apache 2.0.28 with the proxy 
support compiled in.

My modperl server on the backend is still running as 1.3.14.

The 2.0.28 proxy uses mod_rewrite. When it rewrites url's internally to 
go to a static apache server all works great!

However, when it rewrites to my modperl 1.3.14 server apache 2.0.28 
children start segfaulting left and right with a code 11. I can not find 
any reference to this on the 2.0 mailing lists/groups.

Does anyone know why Apache 2.0 running as a rewrite reverse proxy would 
die only when it talks to my modperl servers? This is destroying my 
development time and about  to kill me on some significant deadlines :(

John-




Re: Strange Apache 2.0 rewrite/proxy issue

2002-01-03 Thread John Armstrong

I was looking at oops but it doesn't seem to suit my needs which are :

Reverse 1.1 compliant proxy with mod_rewrite style capabilities.

Squid is my next chance but I was hoping to get apache working since I 
don't want to run _3_ servers ( squid, static apache and modperl 
apache ).

John-

On Thursday, January 3, 2002, at 11:38 AM, Ilya Martynov wrote:

 On Thu, 3 Jan 2002 11:26:18 -0800, John Armstrong 
 [EMAIL PROTECTED] said:

 John This 'seems' to be a modperl issue.
 John My configuration. I needed a 1.1 compliant reverse proxy in order 
 to
 John support Chunked encoding for an xml gateway.

 John Since only Apache 2.0 has a 1.1 compliant reverse proxy I 
 replaced my
 John Apache 1.3.14 standard apache wth an Apache 2.0.28 with the proxy
 John support compiled in.

 You can try oops[1] also. It is a HTTP 1.1 proxy.

 [1] http://zipper.paco.net/~igor/oops.eng/

 --
  
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 | Ilya Martynov (http://martynov.org/)  TIV.net 
 (http://tiv.net/) |
 | GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B 
 DEE6 |
  
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




Re: Strange Apache 2.0 rewrite/proxy issue

2002-01-03 Thread John Armstrong

Because the front end reverse proxy needs to connect to one of 3 
different servers.

1) Static html server.
2) Mod Perl dynamic content server
3) Windows based xml servers that need to use 1.1 to communicate.

So for 3 we need chunked or the Content-Length, either way, we need 1.1. 
compatibility.

John-

On Thursday, January 3, 2002, at 12:33 PM, Igor Sysoev wrote:

 On Thu, 3 Jan 2002, John Armstrong wrote:

 This 'seems' to be a modperl issue.

 My configuration. I needed a 1.1 compliant reverse proxy in order to
 support Chunked encoding for an xml gateway.

 Why do you need chunked encoding from backend ?




Re: Strange Apache 2.0 rewrite/proxy issue

2002-01-03 Thread John Armstrong

Correct, with 1.0 we lose persistency and things slow down significantly.

I guess I should have just said 'Persistency' in the first place, sorry 
about that :)

John-

On Thursday, January 3, 2002, at 01:44 PM, Igor Sysoev wrote:

 On Thu, 3 Jan 2002, John Armstrong wrote:

 Because the front end reverse proxy needs to connect to one of 3
 different servers.

 1) Static html server.
 2) Mod Perl dynamic content server
 3) Windows based xml servers that need to use 1.1 to communicate.

 So if one will make request to xml server with HTTP/1.0 then
 he will receive response with error code ?
 Can not it work in HTTP/1.0 at all ?

 So for 3 we need chunked or the Content-Length, either way, we need 
 1.1.
 compatibility.

 John-

 On Thursday, January 3, 2002, at 12:33 PM, Igor Sysoev wrote:

 On Thu, 3 Jan 2002, John Armstrong wrote:

 This 'seems' to be a modperl issue.

 My configuration. I needed a 1.1 compliant reverse proxy in order to
 support Chunked encoding for an xml gateway.

 Why do you need chunked encoding from backend ?

 Igor Sysoev





Re: Strange Apache 2.0 rewrite/proxy issue

2002-01-03 Thread John Armstrong

Correct.

The overall goal here is to allow Apache 2.0 to handle the URL rewriting 
and redirection for all different types of requests. Currently we use 
Apache 1.3.14 for some items and the F5 load balancing box for others. 
The F5 has a hard limit of 100 rules in its latest version and we would 
rather not run into that so we decided to give Apache 2.0 a shot.

Until 2.0 is ready for prime time we'll just stick with the F5 and be 
careful about how many rules we add.

Thanks
J

On Thursday, January 3, 2002, at 02:08 PM, Igor Sysoev wrote:

 On Thu, 3 Jan 2002, John Armstrong wrote:

 When the reverse proxy connects to the windows boxes it needs to
 maintain a persistent connection since the client is an appliance, 
 not a
 browser.

 So if you will have persistent connection between client and frontend
 and have non-persistent connection between frontend and xml backend
 will it slow down your things significantly ?

 Igor Sysoev

 This works fine with 2.0 when 2.0 is not segfaulting :)

 Think I'll just get out of apache land and let the F5 handle it for 
 now,
 we won't hit the 100 rule limit for a few more months and hopefully
 apache 2.0 is more stable by then and can take over the URL rewriting.

 John-

 On Thursday, January 3, 2002, at 01:58 PM, Igor Sysoev wrote:

 On Thu, 3 Jan 2002, John Armstrong wrote:

 Correct, with 1.0 we lose persistency and things slow down
 significantly.

 I guess I should have just said 'Persistency' in the first place, 
 sorry
 about that :)

 OK. Where do you need persistent connection - between frontend and
 xml backend or between client and frontend ?

 On Thursday, January 3, 2002, at 01:44 PM, Igor Sysoev wrote:

 On Thu, 3 Jan 2002, John Armstrong wrote:

 Because the front end reverse proxy needs to connect to one of 3
 different servers.

 1) Static html server.
 2) Mod Perl dynamic content server
 3) Windows based xml servers that need to use 1.1 to communicate.

 So if one will make request to xml server with HTTP/1.0 then
 he will receive response with error code ?
 Can not it work in HTTP/1.0 at all ?

 So for 3 we need chunked or the Content-Length, either way, we need
 1.1.
 compatibility.

 John-

 On Thursday, January 3, 2002, at 12:33 PM, Igor Sysoev wrote:

 On Thu, 3 Jan 2002, John Armstrong wrote:

 This 'seems' to be a modperl issue.

 My configuration. I needed a 1.1 compliant reverse proxy in order
 to
 support Chunked encoding for an xml gateway.

 Why do you need chunked encoding from backend ?

 Igor Sysoev





Re: mod_perl vs. C for high performance Apache modules

2001-12-14 Thread John Armstrong

Investors suck like that. I have had to fight many of these battles.

The first thing to do is find out specifically _why_ the investor thinks 
that so you can counter their claims. Trying to counter vague notions of 
'terrible' is impossible. The opponent has to commit to an opinion 
before you can fight it.

Then just point to many of the well-known sites on the success pages 
that are high volume and do quite well with mod_perl

Explain that to do this project in Java or C or CGI would have costed 
more, taken longer and given negligible benefits.

Thats what I do. I usually also show how my architecture can interact 
with other architectures via XML or directly at teh data store level.

Good luck
J

On Friday, December 14, 2001, at 12:12 PM, Jeff Yoak wrote:


 Hi All,

 Recently I did a substantial project for a client in using 
 mod_perl.  That client is happy with the work, but an investor with 
 their company is very angry because of what a horrible choice mod_perl 
 is for high-load web applications compared with Apache modules and even 
 CGI programs, written in C.  If anyone on this list could forward any 
 resources that do comparisons along these lines, or even analysis of 
 mod_perl's handling of high-load web traffic, I would be very grateful.

 Cheers,
 Jeff



 -- Jeff Yoak   626-705-6996





Re: mod_perl vs. C for high performance Apache modules

2001-12-14 Thread John Armstrong

I dont think its your responsibility anymore. If the investor had a 
preference he should have stated it BEFORE work began. If your client 
did not keep him informed then your client has that burden to bear.

You did your job, the client likes what you did, it works. Let them 
fight the political battle.

Comparing mod_perl 'years ago' is totally irrelevant. Modperl has grown 
up so much since 'years ago' that its not even funny.

J-

On Friday, December 14, 2001, at 12:58 PM, Jeff Yoak wrote:

 At 09:15 PM 12/14/2001 +0100, Thomas Eibner wrote:
 The key to mod_perl development is speed, there are numerous 
 testimonials
 from users implementing a lot of work in a very short time with 
 mod_perl.
 Ask the clients investor wheter he wants to pay for having everything 
 you
 did rewritten as an Apache module in C. That is very likely going to 
 take
 a lot of time.

 Thank you for your reply.  I realized in reading it that my tone leads 
 one to the common image of a buzzword driven doody-head who wants this 
 because of what he read in Byte.  That's certainly common enough, and 
 I've never had a problem dealing with such types.  (Well... not an 
 unsolvable problem... :-)

 This is something different.  The investor is in a related business, 
 and has developed substantially similar software for years.  And it is 
 really good.  What's worse is that my normal, biggest argument isn't 
 compelling in this case, that by the time this would be done in C, I'd 
 be doing contract work on Mars.  The investor claims to have evaluated 
 Perl vs. C years ago, to have witnessed that every single hit on the 
 webserver under mod_perl causes a CPU usage spike that isn't seen with 
 C, and that under heavy load mod_perl completely falls apart where C 
 doesn't.  (This code is, of course, LONG gone so I can't evaluate it 
 for whether the C was good and the Perl was screwy.)  At any rate, 
 because of this, he's spent years having good stuff written in C.  
 Unbeknownst to either me or my client, both this software and its 
 developer were available to us, so in this case it would have been 
 faster, cheaper and honestly even better, by which I mean more 
 fully-featured.

 So he's upset.  Everyone acknowledges that given our particular 
 circumstances, it would have been better to build upon what we already 
 had, but because of his previous experience he feels that mod_perl 
 wasn't even a responsible choice even within the limits of our lack of 
 knowledge of his software and its availability.

 So I'm trying to show that mod_perl doesn't suck, and that it is, in 
 fact, a reasonable choice.  Though within these limits it is still 
 reasonable to point out the development cycle, emotionally it is the 
 least compelling form of argument, because the investor has a hard time 
 removing from consideration that given our particular situation, there 
 was a very fast solution in using his C-based routines.

 Take a look at Joshua Chamas benchmarks (Although they're only hello
 world style apps) it shows that mod_perl is pretty fast.

 I will look for this particularly.  Thanks.

 Cheers,
 Jeff




 -- Jeff Yoak   626-705-6996





[JOB-SF Bay Area] Looking for someone to join my Web apps team at EFI/PrintMe

2001-11-27 Thread John Armstrong

Hello all-
I got my head count for the next few months and was given another 
spot to fill on the team! Hooray!

We are building a next generation internet printing system here at 
Electronics For Imaging (EFII). The Web apps portion is heavily 
Apache/ModPerl/HTML::Mason/Oracle based running under Linux and Solaris. 
I am looking for someone that can help round out the team and work on 
more back-end functionality. Initially this is the e-commerce/ERP 
integration, XML integration with other system components as well as 
'modernizing' our initially developed architecture and helping to clean 
up the code base so that moving forward is not quite so painful.

EFI is a mid-sized( 1000 employees or so ) public company that is 
doing just fine in the current market. We have not had any lay-off's and 
are growing at a comfortable rate, our stock is stable and we always 
meet our market expectations. All in all its a comfortable place to 
weather this storm. The PrintMe team runs as an 'internal startup', that 
means its pretty relaxed and divorced from many of the day-to-day issues 
that would normally come with working in a larger company.

Looking for the usual skill-set, experience with mod-perl/apache, 
ability to build your own architecture and framework from the ground-up 
and the ability to write code that plays well with others. I really 
enjoy people that come to the table with an overall understanding of how 
things work together and a somewhat proven track-record.

If your interested drop me an email. We are located in Foster City, 
CA, just south of San Francisco.

See us on the web at http://www.printme.com/ or http://www.efi.com/

John-




Re: Seeking Legal help

2001-11-22 Thread John Armstrong

 From experience in the dotcom world I can tell you this, its a hard 
balance to fight. The more you push and threaten the lower on the pile 
of bills you will go.

If this company is going to file for Chapter 11 they have no incentive 
to pay you at all. In fact, I remember watching management purposefully 
pushing the more aggressive debtors to the bottom of the list knowing 
full well they would never get paid.

Best strategy from my perspective is to offer them a better deal. Take 
say $15k and write it off to a bad debt. They are much more likely to 
respond to a nice guy offer of 'I know things are tough, lets make a 
deal' then 'I will get my lawyer to yell at you at which point you will 
ignore me until you go out of business'.

Debt collection is nasty when the players are not solvent.

John-

On Wednesday, November 21, 2001, at 03:21 PM, Robert Landrum wrote:


 Contact a lawyer.  Then tell the client that you have contacted a 
 lawyer.  Put this in writing and sign it.  Be specific and let them 
 know what it is exactly that you want, and that if they do not comply, 
 you'll be forced to enlist the service of a lawyer and file suit.

 Most of the time, this will be enough to get them to pay...  Nobody 
 want's a legal battle, least of all a small business.

 If they fail to pay, you have two options.  Bite the bullet and move on 
 or sue them.

 I am not a lawyer, but this is the process that my friend went through 
 when he did about $20,000 worth of work for a client that was more than 
 180 days delinquent.  After court costs and lawyer fees, etc., he 
 walked away with
 $8,000.

 Not great, but better than nothing.

 Rob


 --
 Only two things are infinite: The universe, and human stupidity. And 
 I'm not
 sure about the former. --Albert Einstein




Re: [OT] pdf creation

2001-10-28 Thread John Armstrong

I once did a project using html2pdf under Unix. It worked great for 
converting the Human Resources forms ( in html ) to printable PDF's that 
contained variable user information.

Worked well and did not cause any real trouble.

John-

On Sunday, October 28, 2001, at 04:29 PM, Drew Taylor wrote:

 At 04:01 PM 10/28/2001 -0600, Lon Koenig wrote:
 I apologize for the OT post, but the members of this list seem to be 
 authoritive resource for all web/perl solutions.

 I'm currently bidding a project, and the client's all in favor of a 
 mod_perl solution. Phase 2 of the project requires on-the-fly pdf 
 creation.

 Does anyone have success/horror stories generating pdf files under 
 mod_perl?
 Recommendations?

 I've used PDFLib for several projects, and it works wonderfully. The 
 core is written in ANSI C with interfaces for every popular language. 
 It's not free, but it does a lot and works very well.
 http://www.pdflib.com/


 Drew Taylor JA[P|m_p|SQL]H
 http://www.drewtaylor.com/  Just Another Perl|mod_perl|SQL Hacker
 mailto:[EMAIL PROTECTED]  *** God bless America! ***
 ICQ: 135298242








Re: IBM patents Template Systems?

2001-10-17 Thread John Armstrong

Is this applying to an application based tool only or does it also apply 
to web based tools? We have a product that we have licensed out for 4 
years or so that does exactly this via the web( approx 5000 sites are 
using it now ). I am sure others do as well.

Just not sure what the scope of this lame patent is.

John-

On Wednesday, October 17, 2001, at 11:12 AM, Nathan Torkington wrote:

 Joe Schaefer writes:
 A causal reading seems to suggest that most mod_perl-based
 templating systems do exactly what this patent will cover:
 i.e. set up a non-HTML based website where templates
 dynamically convert non-HTML files into HTML.

 IANAL (and IVAGINAL too, but that's for a different time :-) but as
 far as I can see, the patent applies to applications that interact
 with the user to build the website.  In other words, mod_perl's
 character-based DIY stuff wouldn't count.

 http://patft.uspto.gov/netacgi/nph-
 Parser?Sect1=PTO2Sect2=HITOFFp=1u=/netahtml/search-
 bool.htmlr=10f=Gl=50co1=ANDd=ft00s1=HTMLOS=HTMLRS=HTML

 Abstract
 A software tool is provided for use with a computer system for 
 simplifying
 the creation of Web sites. The tool comprises a plurality of pre-stored
 templates, comprising HTML formatting code, text, fields and formulas. 
 The
 templates preferably correspond to different types of Web pages and 
 other
 features commonly found on or available to Web sites. Each feature may 
 have
 various options. To create a web site, a Web site creator (the person 
 using
 the tool to create a web site) is prompted by the tool through a series 
 of
 views stored in the tool to select the features and options desired for 
 the
 Web site. Based on these selections, the tool prompts the web site 
 creator
 to supply data to populate fields of the templates determined by the 
 tool
 to correspond to the selected features and options. Based on the 
 identified
 templates and supplied data, the tool generates the customized Web site
 without the web site creator writing any HTML or other programming code.
 Based on roles-based, multi-level security, certain users of the web 
 site
 may have access to certain information and others may not.

 Nat





Re: Questions Concerning Large Web-Site

2001-06-11 Thread John Armstrong

I'd convert each 'module' into a real Perl module( YourPackage::Search.pm
etc ) and then configure it at the directory level.

Location /search
SetHandler perl-script
PerlHandler YourPackageSpace::Search
/Location

Or you can just take your script and throw it into a single module's
handler() routine :

Location /
SetHandler perl-script
PerlHandler YourPackageSpace::YourNewModule
/Location

Your modules will be pre-compiled and your source is much more manageable in
the future for other people involved in the project. I find it best to
'break' the boundary between CGI and ModPerl by generally _not_ writing
'.pl' scripts and instead moving everything into pure modules. It just makes
the conceptual jump between CGI and mod perl much easier for newbies who
join the team. I'm sure it has performance and integration impacts that I am
not to knowledgeable on though.

John-


On 6/11/01 10:28 AM, Purcell, Scott [EMAIL PROTECTED] wrote:

 Hello,
 I have a large asset-management system that is web-based. In the past I have
 always used cgi and perl. I need to rewrite it so that it works with
 mod-perl or PerlEx
 Anyway, I used to tie my site together with a main, and a ton of requires
 (which required pages of subroutines). I would use a hidden variable to do
 the navigation. So each time the user hit something, I directed them back to
 the main and used a hidden variable to go spawn a different subroutine. So
 it was basically a nested application. The site got large (a lot of perl
 code, over 20,000 lines), and it got slow because each user ended up
 recompiling the code for each submit.
 
 Lately as I am thinking about rebuilding the site, but not using a nested
 config, but just offering each page to be its own perl file. So when the
 user submits for a search, I just point them at the search.pl file. Sounds
 simple enough, but I work alone, and do not know how the world builds large
 sites. I was hoping to hear some simple input from people who have
 architected good, sound sites, and was hoping for some good feedback, or
 some old sample code that I can study and find out how the other half live.
 
 I hope this is not asking too much, Any input would be most helpful.
 
 Sincerely
 
 Scott Purcell
 
 




Re: Questions Concerning Large Web-Site

2001-06-11 Thread John Armstrong

The Eagle book ( linked to from http://perl.apache.org/ ) is a good
resource.

Generally speaking though you can get what you need to start in the guide (
http://perl.apache.org/guide/ ), its pretty simple to get started.

John-

On 6/11/01 12:42 PM, Ron Beck [EMAIL PROTECTED] wrote:

 
 Is there a good tutorial or book on the subject of constructing Perl
 modules?  I too have done some of this and would like to create actual
 modules instead of required subroutines.
 
 Ron
 
 John Armstrong wrote:
 
 I'd convert each 'module' into a real Perl module( YourPackage::Search.pm
 etc ) and then configure it at the directory level.
 
 Location /search
 SetHandler perl-script
 PerlHandler YourPackageSpace::Search
 /Location
 
 Or you can just take your script and throw it into a single module's
 handler() routine :
 
 Location /
 SetHandler perl-script
 PerlHandler YourPackageSpace::YourNewModule
 /Location
 
 Your modules will be pre-compiled and your source is much more manageable in
 the future for other people involved in the project. I find it best to
 'break' the boundary between CGI and ModPerl by generally _not_ writing
 '.pl' scripts and instead moving everything into pure modules. It just makes
 the conceptual jump between CGI and mod perl much easier for newbies who
 join the team. I'm sure it has performance and integration impacts that I am
 not to knowledgeable on though.
 
 John-
 
 On 6/11/01 10:28 AM, Purcell, Scott [EMAIL PROTECTED] wrote:
 
 Hello,
 I have a large asset-management system that is web-based. In the past I have
 always used cgi and perl. I need to rewrite it so that it works with
 mod-perl or PerlEx
 Anyway, I used to tie my site together with a main, and a ton of requires
 (which required pages of subroutines). I would use a hidden variable to do
 the navigation. So each time the user hit something, I directed them back to
 the main and used a hidden variable to go spawn a different subroutine. So
 it was basically a nested application. The site got large (a lot of perl
 code, over 20,000 lines), and it got slow because each user ended up
 recompiling the code for each submit.
 
 Lately as I am thinking about rebuilding the site, but not using a nested
 config, but just offering each page to be its own perl file. So when the
 user submits for a search, I just point them at the search.pl file. Sounds
 simple enough, but I work alone, and do not know how the world builds large
 sites. I was hoping to hear some simple input from people who have
 architected good, sound sites, and was hoping for some good feedback, or
 some old sample code that I can study and find out how the other half live.
 
 I hope this is not asking too much, Any input would be most helpful.
 
 Sincerely
 
 Scott Purcell
 
 
 




Totally annoyed at IE ( Cookie oddity )

2000-06-23 Thread John Armstrong

Trying to get IE to take a cookie in either an error header or a 
standard header has just been driving me insane tonight. After every 
possible iteration I ended up with the following and a redirect. Note 
that $r-header_out() worked without a redirect as well.

$r-err_header_out('Set-cookie' = "AF_SID=".$session{ _session_id 
}."; path=/; expires=Tue, Jun 23 2021 10:26:12 GMT; domain=.spa.com" 
);


The following did _not_ work for IE but did work for every other 
browser I tested ( NS 4.5/5 on Win/Linux/Mac ).

$r-err_headers_out-add('Set-cookie' = "AF_SID=".$session{ 
_session_id }."; path=/; expires=Tue, Jun 23 2020 10:26:12 GMT; 
domain=.spa.com" );
$r-err_headers_out-{ 'Set-cookie' } = "AF_SID=".$session{ 
_session_id }."; path=/; expires=Tue, Jun 23 2020 10:26:12 GMT; 
domain=.spa.com;" ;


So the question is, why does IE accept a single header but not 
multiple headers? I did not see this anywhere in the mailing list of 
the Eagle book and have never really come across this issue before.

Just looking for a reason so that I am not treating this like some mystery.

John-



Re: Apache children hanging

2000-06-01 Thread John Armstrong

I have had this problem to varying degrees in all of my high traffic 
mod perl installations. The thing that saves me is Apache::Resource. 
In my httpd.conf I put :

PerlModule Apache::Resource
PerlSetEnv PERL_RLIMIT_DATA 32
PerlSetEnv PERL_RLIMIT_CPU 640
PerlChildInitHandler Apache::Resource

That kills off any bad children. Before I installed this things were 
regularly spinning out of control. You could sit and watch them go 
nuts. After installing it you could watch them _attempt_ to go nuts 
and then watch apache clean house. Its a lifesaver.

Why does it happen? A variety of reasons but I have just accepted it 
as the cost of doing business with mod_perl and gone on with things. 
Not the most proactive response but so be it :(

John Armstrong


At 3:33 PM -0700 6/1/00, Gustavo Duarte wrote:
Hi there people,

I have inherited a web server running mod_perl and I am experiencing a
somewhat critical problem: http processes sometimes get into an infinite
loop, using 100% cpu time, and given enough time bring the machine to a
halt.

I've done a lot of testing, and there isn't a specific http request that
triggers the behaviour, eventhough it always happens after a request. It
seems to happen every few hours: the httpd process simply starts hogging
up the CPU, and won't let go of it. After a while, I have a few of these
processes running, and the machine's load average skyrockets. Sometimes
it's bad enough I'm not even able to log in via console.

I'll upgrade all the software to new versions, but apparently this
problem has been ocurring for a while, and survived a couple of
hardware/software upgrades. I'll also be rewriting the perl code running
there to see if it stops the problem (the code isn't too clean - lots of
global variables, not written under strict, etc, but "it works").
However, it would be cool if someone could enlighten me on what's going
on, and possibly suggest a fix :).

Thanks a lot!

signed,
gustavo

begin debugging info

= our OS is:

[root@blueland /root]# uname -a
Linux blueland 2.2.14-5.0 #4 Wed Apr 12 20:28:28 MDT 2000 i586 unknown

= Apache:

Server Version: Apache/1.3.6 (Unix) mod_perl/1.19 mod_ssl/2.2.8
OpenSSL/0.9.2b

= let's look into one of the monster processes:

497 ?R288:06 /usr/local/apache_1.3.6/bin/httpd

= (nice cpu time there...)
= now for gdb...

[root@blueland /root]# gdb /usr/local/apache/bin/httpd 497
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.

Attaching to program: /usr/local/apache/bin/httpd, Pid 497
Reading symbols from /lib/libNoVersion.so.1...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from
/usr/lib/perl5/5.00502/i586-linux/CORE/libperl.so...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from
/usr/lib/perl5/site_perl/5.005/i586-linux/auto/Sybase/DBlib/DBlib.none...done.

Reading symbols from /opt/sybase/lib/libsybdb.so...done.
Reading symbols from /opt/sybase/lib/libinsck.so...done.
Reading symbols from /lib/libnss_nisplus.so.2...done.
Reading symbols from /lib/libnss_nis.so.2...done.
0x80a7407 in free_blocks ()

= let's see what the stack tells us...

(gdb) i s
#0  0x80a7407 in free_blocks ()
#1  0x80a7660 in ap_clear_pool ()
#2  0x80a76a1 in ap_destroy_pool ()
#3  0x80be71a in ap_destroy_sub_req ()
#4  0x8070d8a in XS_Apache__SubRequest_DESTROY ()
#5  0x400d0f45 in Perl_pp_entersub () at pp_hot.c:1965
#6  0x4007aa8d in perl_call_sv () at perl.c:1008
#7  0x400d9d4c in Perl_sv_clear () at sv.c:2418
#8  0x400da451 in Perl_sv_free () at sv.c:2418
#9  0x400d24ab in do_clean_objs (sv=0x8385744) at sv.c:338
#10 0x400d237c in visit (f=0x400d2410 do_clean_objs) at sv.c:306
#11 0x400d263f in Perl_sv_clean_objs () at sv.c:359
#12 0x40077fa5 in perl_destruct () at perl.c:1008
#13 0x80635a3 in perl_shutdown ()
#14 0x80645c5 in perl_child_exit ()
#15 0x8064430 in perl_child_exit_cleanup ()
#16 0x80a8dd6 in run_cleanups ()
#17 0x80a762c in ap_clear_pool ()
#18 0x80a76a1 in ap_destroy_pool ()
#19 0x80b3b03 in clean_child_exit ()
#20 0x80b6773 in child_main ()
#21 0x80b6e14 in make_child ()
#22 0x80b716e in perform_idle_server_maintenance ()
#23 0x80b7665 in standalone_main ()
#24 0x80b7cd3 in main ()

= registers have:

(gdb) i r
eax0x8a3e408144958472
ecx0x8608414140542996
edx0x8a3e408144958472
ebx0x8239208136548872
esp0xb90c   0xb90c
ebp0xb910  

Running file based sessions via NFS

2000-05-09 Thread John Armstrong

Lots of folks are saying the running File based sessions over NFS is 
problematic. We are doing it without any noticeable issues so far but 
I am _very_ curious as to what we need to watch out for. I'd like to 
meet the evil before I have to do battle with it if you get my drift.

If anyone has any insight with some fairly specific examples that 
would be awesome. We're running our sessions off of a Network 
Appliance Filer and so far performance is fantastic as is data 
integrity..

John-



Re: Session management moudle suggestions?

2000-05-08 Thread John Armstrong

We are using HTML::Mason and Apache::Session with great results. 
Apache::Session::DBI was killing us for some reason but moving it to 
our network appliance box and Apache::Session:File has really pumped 
up our performance. When you really start using sessions you can get 
some cool stuff out of them, we use them for all sorts of read only 
data now, not just users. Using Mason and Apache::Session has really 
increased our speed of development.

John-

At 11:41 AM -0700 5/8/00, Stephen Zander wrote:
I've avoided session management like the plague until now (intranets
let you get away with that sort of thing :)) but rolling out web-based
LDAP is forcing session management upon me.

Other than Apache::Session what are my choices?  How well do any of
these play with templating (Embperl, Mason et al)?

--
Stephen

"So.. if she weighs the same as a duck.. she's made of wood."  "And
therefore?"  "A witch!"




oracle : The lowdown

2000-01-11 Thread John Armstrong

Hello all-
I just got the word from down high that VC's will freak out 
if they see we are using mysql and now we are looking at an Oracle 
solution.

The product is a mid level mod perl application that will 
receive ~500,000 hits a day. I want to engineer it to withstand up to 
2 million hits per day ( not unique users ).  Does anyone have good 
or bad stories about using Oracle with mod_perl/DBI/Apache::DBI? I 
would love to hear both sides of the coin. I personally think Oracle 
is overkill but I don't have any major issues with it.

I am also searching the archives for problem reports but I was hoping 
for some anecdotal evidence about the positive or negative of this 
move.

Thanks!
John Armstrong


---
'Gone With The Wind' is going to be the biggest flop in the history 
of Hollywood. I'm just glad it'll be Clark Gable who's falling flat
on his face and not Gary Cooper.
-Gary Cooper, 1938



RE: oracle : The lowdown

2000-01-11 Thread John Armstrong

On this thread, I am seeing a lot of things in the archives hinting 
at issues and problems with Apache::Session ( DBI usage ) and high 
end DB's like Oracle and SyBase.

What sort of success is anyone seeing using Oracle/SyBase with 
Apache::Session. Apache::Session in a DBI context is crucial to our 
development effort so that is a huge factor.

We are also looking at using Mason but I don't see any problems with 
that right offhand.

John-

At 4:09 PM -0500 1/11/00, David Harris wrote:
David Harris wrote:
  What about PostgreSQL (www.postgresql.org)? It looks like it has
transaction
  management (commit, rollback) with the whole concurrency control thing. I
  don't know if has views. I've got a small project that I am figuring on
  using PostgreSQL for, so I'm curious to hear what people might have to say
  about it.

This link was just posted to the IMP list a couple min ago:

"Low-Cost Unix Database Differences"
http://www.toodarkpark.org/computers/dbs.html

Stas, this might be a good link to drop somewhere in the guide.

 - David Harris
   Principal Engineer, DRH Internet Services





Today I sniffed
Many dog butts-I celebrate
By kissing your face.
-Doggie Haiku



JOB: Carte blanche in a fast track start-up

2000-01-05 Thread John Armstrong

We are building an e-commerce/infomediary  for a segment of the 
luxury travel market that is set to explode. This Internet startup is 
an awesome opportunity and is on the acquisition/high valuation path. 
The founders are some of the best I've worked with and are doing 
things they everyone said were impossible on a daily basis. The 
greatest thing is, we have carte blanche to build the greatest 
mod_perl apps we can.

Lead investors and advisors include members of the former and current 
management teams of top Internet companies such as E*trade and 
Excite.  The company is on track to take over its particular space 
and the management team understands that in order to have the best 
product in the space they need to be using mod_perl and other open 
source packages. Our business goals are being met (and exceeded) 
rapidly and now we need to assemble a small, competent team of 
developers to bring the systems live.

We need 2 web technologists that understand mod_perl in a UNIX 
environment( FreeBSD/Linux ). No NT expectations here, we want 
stability, functionality and speed. I know you're probably not in the 
market for a job, but we have carte blanche to build great mod_perl 
apps and the company really is on the fast track.

We are based in Redwood City, CA. Contact me anytime, give me a call 
at the office : 650-216-9900 or drop me some email : [EMAIL PROTECTED]

John Armstrong
VP, Technology
Xaca.com ( soon to be Spa.com )



--
During his 1983 visit to Japan, President Reagan gave a speech 
praising freedom of the press. At his request, the entire speech
was off the record.
-Uncle John's Fourth Bathroom Reader



Re: headers problem.

1999-10-24 Thread John Armstrong

If you are going to print your own headers to mod_perl then you must 
send the OK response header first like so :

print qq(HTTP/1.1 200 OK\n) ;
print qq(Content-Type: text/html\n\n);

If you do not mod_perl says 'Hey, I did not get a valid header!' and 
goes about printing its own before it even looks at what you are 
outputting.

I generally use CGI.pm and its $q-header method which solves the 
problem in one easy line.

John-

Hi,

  I'm having problems with headers.  I know there is tons of stuff about
headers in the archives but none that I could find matches my situation.

  I have one script blah.cgi

  use strict;

  print qq(Content-Type: text/html\n\n);




With Perl your free to do The Right Thing, howver you care to define it.
  - Larry Wall , Programming Perl - 2nd Edition