Re: Logging to a file

2006-09-22 Thread James Smith

Can you get away with using the apache logs to do this - use
mod_log_config and add save your information in a sub_process_env
variable - and add a %{my_env_var} entry into the logging directive?

James

On Fri, 22 Sep 2006, Jonathan wrote:

> I need to introduce some new functionality to my webapp app, and I'm
> not quite sure if i can do it in MP.  Hoping someone here can offer a
> suggestion.
>
> essentially, I have a high traffic syndicated image server that is
> currently serving from a vanilla apache instance.
> right now, its not logging anything - but i need to change that.
>
> i not need to log some basic request info ( comparable to what is in
> the access log ) , along with the value of a certain cookie if it
> exists- for later parsing ( faster than tossing into a db )
>
> composing the info i need to log under mp is trivial
>
> i'm a bit uneasy about actually logging to a file though-- it looks
> like under a prefork model ( i need 2+ servers to handle this ), i'd
> need to lock / open / write / close / unlock the log file per request
>
> does anyone know of a facility that will let me just log
> straightforward ?
>
> if not, i can hack this together using a non-apache  server pretty
> quickly.   i'd rather just limit my configuration files though :)
>


Re: Logging to a file

2006-09-22 Thread Sean Davis
On Friday 22 September 2006 03:34, James Smith wrote:
> Can you get away with using the apache logs to do this - use
> mod_log_config and add save your information in a sub_process_env
> variable - and add a %{my_env_var} entry into the logging directive?
>
> James
>
> On Fri, 22 Sep 2006, Jonathan wrote:
> > I need to introduce some new functionality to my webapp app, and I'm
> > not quite sure if i can do it in MP.  Hoping someone here can offer a
> > suggestion.
> >
> > essentially, I have a high traffic syndicated image server that is
> > currently serving from a vanilla apache instance.
> > right now, its not logging anything - but i need to change that.
> >
> > i not need to log some basic request info ( comparable to what is in
> > the access log ) , along with the value of a certain cookie if it
> > exists- for later parsing ( faster than tossing into a db )
> >
> > composing the info i need to log under mp is trivial
> >
> > i'm a bit uneasy about actually logging to a file though-- it looks
> > like under a prefork model ( i need 2+ servers to handle this ), i'd
> > need to lock / open / write / close / unlock the log file per request
> >
> > does anyone know of a facility that will let me just log
> > straightforward ?

You can create a simple logger under mod_perl that logs to a database directly 
using DBI.  You would, of course, want to benchmark anything like this, but 
it isn't hard to code one.

Sean


Re: Logging to a file

2006-09-22 Thread Philip M. Gollucci
Sean Davis wrote:
>>> i not need to log some basic request info ( comparable to what is in
>>> the access log ) , along with the value of a certain cookie if it
>>> exists- for later parsing ( faster than tossing into a db )
mod_log_sql (written in C) works in both httpd 1.x and 2.x.
Its been "professionally" benched to be almost non existant overhead.

I use it all the time.

-- 

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..
No matter how I try My love I cannot hide


Re: Logging to a file

2006-09-22 Thread Jonathan Vanasco


On Sep 22, 2006, at 6:33 AM, Sean Davis wrote:

You can create a simple logger under mod_perl that logs to a  
database directly
using DBI.  You would, of course, want to benchmark anything like  
this, but

it isn't hard to code one.


No DBI.  This is a high traffic server.  I can't handle the overheard  
of the DB.  I need to write to file, then batch process stuff later.   
Using a DB cuts my performance down to 1/15th of what apache can/ 
needs to handle.



On Sep 22, 2006, at 6:38 AM, Philip M. Gollucci wrote:

mod_log_sql (written in C) works in both httpd 1.x and 2.x.
Its been "professionally" benched to be almost non existant overhead.


i  saw it earlier.  it uses mysql, which means i'd need to get  
another dedicated machine to run it on.  my db box is pg, my webapp  
boxes have pg for some support services.  running mysql + pg on a box  
= io nightmare :(
  I liked the preserve mode.  I thought about running it off a dead  
connection to force that, then regexing the contents to work with PG.


On Sep 22, 2006, at 3:34 AM, James Smith wrote:

Can you get away with using the apache logs to do this - use
mod_log_config and add save your information in a sub_process_env
variable - and add a %{my_env_var} entry into the logging directive?


Brilliant.  That will totally do it.


Re: Logging to a file

2006-09-22 Thread Frank Wiles
On Fri, 22 Sep 2006 03:38:52 -0700
"Philip M. Gollucci" <[EMAIL PROTECTED]> wrote:

> Sean Davis wrote:
> >>> i not need to log some basic request info ( comparable to what is
> >>> in the access log ) , along with the value of a certain cookie if
> >>> it exists- for later parsing ( faster than tossing into a db )
> mod_log_sql (written in C) works in both httpd 1.x and 2.x.
> Its been "professionally" benched to be almost non existant overhead.
> 
> I use it all the time.

   Another option you can use is Sys::Syslog, it's very light weight if
   you just want to get data out to a file.  Plus, you get the added 
   benefits of logrotates, being able to send it off to a remote system,
   etc, etc. 

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://www.wiles.org
 -



Re: Logging to a file

2006-09-22 Thread Drew Wilson

Have you looked at pgLOGd? Or its successor, dbWebLog?

Both of these claim to offer low-overhead robust logging.

Drew

On Sep 22, 2006, at 7:52 AM, Jonathan Vanasco wrote:



On Sep 22, 2006, at 6:33 AM, Sean Davis wrote:

You can create a simple logger under mod_perl that logs to a  
database directly
using DBI.  You would, of course, want to benchmark anything like  
this, but

it isn't hard to code one.


No DBI.  This is a high traffic server.  I can't handle the  
overheard of the DB.  I need to write to file, then batch process  
stuff later.  Using a DB cuts my performance down to 1/15th of what  
apache can/needs to handle.



On Sep 22, 2006, at 6:38 AM, Philip M. Gollucci wrote:

mod_log_sql (written in C) works in both httpd 1.x and 2.x.
Its been "professionally" benched to be almost non existant overhead.


i  saw it earlier.  it uses mysql, which means i'd need to get  
another dedicated machine to run it on.  my db box is pg, my webapp  
boxes have pg for some support services.  running mysql + pg on a  
box = io nightmare :(
  I liked the preserve mode.  I thought about running it off a dead  
connection to force that, then regexing the contents to work with PG.


On Sep 22, 2006, at 3:34 AM, James Smith wrote:

Can you get away with using the apache logs to do this - use
mod_log_config and add save your information in a sub_process_env
variable - and add a %{my_env_var} entry into the logging directive?


Brilliant.  That will totally do it.




Re: Logging to a file

2006-09-22 Thread Jonathan Vanasco


On Sep 22, 2006, at 1:35 PM, Drew Wilson wrote:


Have you looked at pgLOGd? Or its successor, dbWebLog?

Both of these claim to offer low-overhead robust logging.



yeah.  no dice.

the problem isn't about the overhead on apache-- its about the  
overhead of the database.  i believe pgLogD used a buffer to queue  
logging items, but had an db connectivity issue.. and dbWebLog was  
trying to address that.


but they both run into the issue of: your server gets slammed and  
you're continually doing db writes


for a page content server, any of these options would be fine..  but  
this is for a syndicated content server. its just tossing out 5 files  
- but onto other sites - as it does a lot of hit-tracking.   in  
private beta, its only serving 20k day -- which is more than fine for  
any of those issues.  but i'm looking at going into public beta next  
week,  and i fear that for my db.




// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -





running Perl CGI using mod_perl 2 and suexec?

2006-09-22 Thread Laurent MARTIN
Hi!First of all this is my very first post on this mailing list. I've browsed the web but I haven't been able to find the answer I'm looking for, so..my question: is it possible to run a Perl (5.8.6) CGI using Apache 2.2.3 w/ mod_perl 2.0.2 and suexec enabled? It seems that the answer is "no!" w/ mod_perl 1, but what about mod_perl 2?Apache 2 is configured with www/www as "normal" user/group and the virtualhost in which mod_perl 2.0.2 is enabled is configured (using suexec) with laurent/laurent as user/group. With these settings, a simple Perl CGI is not able to create a file in a directory owned by laurent/laurent but a simple CGI script written in Shell can do it :-/Any advice welcome! TIA. -- Laurent MARTIN   .:: GIDE ::.Tel/Fax: +33 (0)2.40.89.92.83/81http://www.gide.net 

Re: Apache::Cookie -> Apache2::Cookie API Change?

2006-09-22 Thread Derek R. Price
Philip M. Gollucci wrote:
> http://svn.apache.org/viewvc?view=rev&rev=447770
> How's that ?

Looks good to me.  Dave?

Derek
-- 
Derek R. Price
CVS Solutions Architect
Get CVS support at Ximbiot !
v: +1 248.835.1260
f: +1 248.835.1263