Re: mod_perl on Solaris notes..

2003-06-16 Thread Ged Haywood
Hi there,

On Mon, 16 Jun 2003, Ryan Dietrich wrote:

 mod_perl on Solaris

Thanks for the tips!

 things ended up being ridiculously stable (they haven't rebooted since last
 February I'm told)..

Hehe:

www2:~$  top -bn1 | head


  9:57am  up 421 days, 19:57,  1 user,  load average: 0.03, 0.10, 0.08
134 processes: 131 sleeping, 1 running, 0 zombie, 2 stopped
CPU states:  0.0% user,  0.1% system,  0.0% nice,  0.0% idle
Mem:   971560K av,  452444K used,  519116K free,  105828K shrd,  101196K buff
Swap: 1044184K av,1032K used, 1043152K free   64372K cached

  PID USER PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
 9912 ged   11   0   916  916   652 R   0 34.9  0.0   0:01 top


:)


73,
Ged.





mod_perl on Solaris notes..

2003-06-15 Thread Ryan Dietrich
Long time lurker (2 years on list I think), first time poster..

I dealt with mod_perl on Solaris during the creation of the Chicago Police
Department's mug shot database (running on twin E6800's / Oracle 9i).  I was
the primary author of this beast, and getting mod_perl to play nicely with
everything else that was running on the box wasn't easy..

The copy of perl that comes default with Solaris is compiled with their
Forte C compiler.  It of course costs money, and is used by many other parts
of the system.  One of my sun engineers disagreed with me to uninstall all
traces of this rogue copy of perl and instead forced me to work with to
complete installations on one system at the same time..  Ugh.  Forte is
incapable of building libapreq as far as I am concerned, later versions that
I did get to build weren't terribly stable (trying it right now on my old
dev box shows a few tests still fail).. Besides, do you really want to pay
for their compiler?

It all of course can be done.

Instead of getting a gcc compiled package of Perl from somewhere like
sunfreeware.com, I decided it would be best to build everything from
scratch.  I went with Sun's package of GCC, and from there compiled Perl
using the SRPM from Redhat as notes on how to build a stable instance of
Perl.  The main things to be concerned about with Solaris is the overall
system configuration (at least, it was for me, processor affinity, shared
memory,  heck, we even tinkered with process priority [TS:ts_maxupri and
TS:ts_maxkmdpri]...)

DBD::Oracle seemed a little tricky for us at first (strange lag times, but I
think veritas was getting in the way), we had a few issues early on with
Apache::DBI, but once we got the on startup connection issues worked out
things ended up being ridiculously stable (they haven't rebooted since last
February I'm told).. Make sure you have the latest Oracle (or any DB for
that matter) client libraries before you even download the DBD source..
(sorry, that may seem infantile to mention, but we lost a week due to an
older build being loaded once..)

To assist my cohorts on future builds (heh, a police joke, sorry), I wrote a
simple korn shell script that would go out and install all of this stuff for
them.  I should probably release this, as it's fairly useful for people
interested in getting mod_perl up and walking with Solaris..

Thankfully, we now have a book like Practical mod_perl to guide us through
some of the insanity of building and installing mod_perl.  Thanks Mr.
Bekman.  (I'm a big fan of mod_perl cookbook as well, if anyone is looking
for other good reading material)..

In the end, do not trust Sun to package anything related to free software
correctly.  Most of the time it is not build for an enterprise environment,
or just has really weird default path's compiled into the binary.  To anyone
who thinks the compiler does not matter between apache, perl, mod_perl, or
ANY of the modules used by the result, they are mistaken.  Symbol tables
won't match, untraceable core dumps will occur at random, with
incomprehensible errors.  Thank the guys at Red Hat for putting the time to
build decent SRPM's, so you can just copy off of their hard work ;-) ..
(hmm, at the time I think I still had a copy of their internal
apache-heavy SRPM that used as a reference, thanks Paul and Tom!)

-Ryan Dietrich

intelligent software solutions
www.iswsolutions.com



Re: mod_perl on Solaris notes..

2003-06-15 Thread Stas Bekman
Ryan Dietrich wrote:
Long time lurker (2 years on list I think), first time poster..

I dealt with mod_perl on Solaris during the creation of the Chicago Police
Department's mug shot database (running on twin E6800's / Oracle 9i).  I was
the primary author of this beast, and getting mod_perl to play nicely with
everything else that was running on the box wasn't easy..
The copy of perl that comes default with Solaris is compiled with their
Forte C compiler.  It of course costs money, and is used by many other parts
of the system.  One of my sun engineers disagreed with me to uninstall all
traces of this rogue copy of perl and instead forced me to work with to
complete installations on one system at the same time..  Ugh.  Forte is
incapable of building libapreq as far as I am concerned, later versions that
I did get to build weren't terribly stable (trying it right now on my old
dev box shows a few tests still fail).. Besides, do you really want to pay
for their compiler?
It all of course can be done.

Instead of getting a gcc compiled package of Perl from somewhere like
sunfreeware.com, I decided it would be best to build everything from
scratch.  I went with Sun's package of GCC, and from there compiled Perl
using the SRPM from Redhat as notes on how to build a stable instance of
Perl.  The main things to be concerned about with Solaris is the overall
system configuration (at least, it was for me, processor affinity, shared
memory,  heck, we even tinkered with process priority [TS:ts_maxupri and
TS:ts_maxkmdpri]...)
DBD::Oracle seemed a little tricky for us at first (strange lag times, but I
think veritas was getting in the way), we had a few issues early on with
Apache::DBI, but once we got the on startup connection issues worked out
things ended up being ridiculously stable (they haven't rebooted since last
February I'm told).. Make sure you have the latest Oracle (or any DB for
that matter) client libraries before you even download the DBD source..
(sorry, that may seem infantile to mention, but we lost a week due to an
older build being loaded once..)
To assist my cohorts on future builds (heh, a police joke, sorry), I wrote a
simple korn shell script that would go out and install all of this stuff for
them.  I should probably release this, as it's fairly useful for people
interested in getting mod_perl up and walking with Solaris..
Thankfully, we now have a book like Practical mod_perl to guide us through
some of the insanity of building and installing mod_perl.  Thanks Mr.
Bekman.  (I'm a big fan of mod_perl cookbook as well, if anyone is looking
for other good reading material)..
In the end, do not trust Sun to package anything related to free software
correctly.  Most of the time it is not build for an enterprise environment,
or just has really weird default path's compiled into the binary.  To anyone
who thinks the compiler does not matter between apache, perl, mod_perl, or
ANY of the modules used by the result, they are mistaken.  Symbol tables
won't match, untraceable core dumps will occur at random, with
incomprehensible errors.  Thank the guys at Red Hat for putting the time to
build decent SRPM's, so you can just copy off of their hard work ;-) ..
(hmm, at the time I think I still had a copy of their internal
apache-heavy SRPM that used as a reference, thanks Paul and Tom!)
Thanks for the notes, Ryan. If you can write a Solaris-specific section for 
http://perl.apache.org/docs/1.0/guide/install.html, it'd make a great addition 
to our ever-growing knowledge base. You can download the source file (in pod), 
by clicking on the [src] icon on that page.



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com