On Tue, 18 Jan 2005 10:43:02 +, Peter Haworth
<[EMAIL PROTECTED]> wrote:
> On Mon, 17 Jan 2005 17:46:17 -0800, Chris Ochs wrote:
> > It looks like $r->child_terminate does what I need. In the case of
> > Postgresql it eats the memory when you execute the query, regar
>
> Also ask yourself if you really need all of the data at
> once. You may be able to filter it down in the query or
> build some incremental data structures using row-by-row
> iteration instead of fetchall_arrayref.
Ya I do, it's basically a customer list export from the database that
I write o
> > Yes. Many databases support sending the results a few rows at a time
> > instead of all at once. For specific advice on this, you might check
> > your DBD documentation or ask on the dbi-users list. You can also have
> > your program schedule the current apache process to exit after finishin
Is there a way to do large queries that return lots of data without
having my apache process grow by the equivalent size in ram of the
data returned? The only thing I can think of is to run a separate
script outside of mod perl for queries like this.
Chris
ns.
A workable hack would probably be to have Apache::Session::Lock::File
always set Transaction to 1 if the backend store was postgres.
Chris
On Thu, 30 Dec 2004 23:41:16 -0800, Chris Ochs <[EMAIL PROTECTED]> wrote:
> > > I tried setting Lock to File instead of Null, but there is
> > I tried setting Lock to File instead of Null, but there is some sort
> > of contention issue because after the first request all other requests
> > hang like they are waiting for a lock to be release.
>
> This usually means you have a scoping bug in your code. If the session
> object never go
>
> > I tried setting Lock to File instead of Null, but there is some sort
> > of contention issue because after the first request all other requests
> > hang like they are waiting for a lock to be release.
>
> This usually means you have a scoping bug in your code. If the session
> object never
> So you have a lost update problem. There is probably a way to structure
> things to avoid this (maybe not using sessions for it), but some form of
> mutually exclusive locking would fix it, at the expense of making your
> site slower, since each frame will have to wait for its turn. You might
>
On Thu, 30 Dec 2004 10:00:32 +0200, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
> If this happens only in pages with frames, try creating a page without
> frames.
Umm no, I want a solution not a work around. This application is used
by a lot of people on a lot of different sites with the file bac
This question could go to one of several different lists, but I
thought this might be a good place to start.
I have an application based on mod perl and the Template Toolkit. For
session tracking I am using Apache::Session with the postgresql
backend store.
The issue I am having is that the post
> > I'm also confused about the documentation for PerlRequire. It say's
that
> > files loaded via PerlRequire are compiled only once, but my startup.pl
file
> > is definitly being compiled twice.
>
> My impression is that it's just broken, since I recall seeing the same
> behavior. This has come
ng?
Chris
- Original Message -
From: "Chris Ochs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 26, 2004 12:57 PM
Subject: reading from STDIN on startup
>
> this is apache 1.3.29/mod_perl 1.28
>
> I use connect_on_init for database co
this is apache 1.3.29/mod_perl 1.28
I use connect_on_init for database connections, and I want to read the
password from STDIN instead of putting the password into the startup.pl
file. I was reading that apache initializes the modules twice when it
starts up, but I'm confused by the behavior I a
> On Wed, 2004-08-11 at 11:53, Chris Ochs wrote:
> > I thought I would chime in here. Many are probably not aware of the new
> > security regulations by Visa and Mastercard that are now in effect.
>
> Thanks for the info, Chris. Is Payment Online a Verisign competi
I thought I would chime in here. Many are probably not aware of the new
security regulations by Visa and Mastercard that are now in effect.
Basically, anyone who stores or handles credit card data has to comply. If
you use an online processing company such as Verisign they take care of most
of i
We have our own application server built on mod perl and the template
toolkit. Most of the application specific sql queries all run as a single
user which is great for Apache::DBI. Every end user also has 3-4 tables
they can query (using the template toolkit DBI plugin) using their own
username,
We have our own application server built on mod perl and the template
toolkit. Most of the application specific sql queries all run as a single
user which is great for Apache::DBI. Every end user also has 3-4 tables
they can query (using the template toolkit DBI plugin) using their own
username,
In startup.pl I read a passphrase from STDIN into a global variable, but the
global is undef outside of startup.pl. If I set the global with just a
simple assignment ($global::pass = 'pass') it works fine and is visible in
my handlers.
Is there some sort of tainting or something going on when re
Yep sticking it in a global and handling it like Apache::DBI works.
- Original Message -
From: "Perrin Harkins" <[EMAIL PROTECTED]>
To: "Chris Ochs" <[EMAIL PROTECTED]>
Cc: "Modperl List" <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 20
- Original Message -
From: "Perrin Harkins" <[EMAIL PROTECTED]>
To: "Chris Ochs" <[EMAIL PROTECTED]>
Cc: "Modperl List" <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 2004 1:12 PM
Subject: Re: BerkeleyDB with mod perl
> On Thu, 2004-04-22 a
I know this isn't exactly mod perl specific, but since there isn't a mailing
list for BerkeleyDB and this is an issue I know people using BerkeleyDB and
mod perl have probably run accross I thought I would post it here.
I'm using the latest BerkeleyDB perl module on freebsd 5.2 with mod perl
1.xx.
: "Chris Ochs" <[EMAIL PROTECTED]>
To: "Perrin Harkins" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, March 21, 2004 5:51 PM
Subject: Re: tied hashes frustration
> Ah yes pnotes. You know actually I think you mentioned this once before
in
> a
Ah yes pnotes. You know actually I think you mentioned this once before in
a similar thread I brought up, not sure why I didn't remember it.
> > since some of the methods in my modules are called from the template
toolkit
> > via callbacks, it's really difficult to make sure those methods have
ac
I have an application that lets users load their own modules into it.
Following is the code I use to run it under Safe.pm:
$result = $safe->reval(require "$file.pm", $obj = $mod->new,
$obj->$command);
Problem is if there is a compilation or runtime error, I cant' figure out
how to catch it so I
I use apache::session in my application which runs as a handler, and the
session variables are needed by just about every module in the application
(14 modules in all). Now the problem is that when the application dies
unexpectedly, the session locking leaves a lock on the session file.
I have ha
- Original Message -
From: "Perrin Harkins" <[EMAIL PROTECTED]>
To: "Chris Ochs" <[EMAIL PROTECTED]>
Cc: "Modperl List" <[EMAIL PROTECTED]>
Sent: Monday, March 08, 2004 6:27 AM
Subject: Re: Apache::Session and DB_File problems
> On S
>
> On closer inspection I think it's mostly okay because the session object
> is supposed to go out of scope and get destroyed (and thus untie) after
> every interaction, and the locking should mean that only process is
> writing during that time. You could run into trouble though if a
> process
This must be my day... I am stress testing a new application that uses
apache::session with the DB_File backend store. When hitting it with apache
bench after a few hundred connections something with the db file gets
wacked, and apache starts to segfault until I delete the .db file, at which
po
I have a really strange problem and although I'm not 100% sure it's due to
Apache::Reload, it seems the most likely candidate. This is apache 1.3.29
and mod perl 1.29 with perl 5.6.1 on freebsd 5.2.1. My code is a perl
handler and with all the modules preloaded via startup.pl each apache
process
What you want to be using is Apache::DBI. Sounds like someone made a bad
attempt at making their own cached connections in the code you have.
Apache::DBI handles everything transparently for you. But you are going to
have to dig in and get rid of all the caching stuff that is currently in
your
Just to jump in here..
A few weeks ago I was looking for a session manager like the one you are
describing. The key feature that I cannot find in any session manager is to
use cookies if they exist, else fall back to using the query string. This
is pretty much mandatory for ecommerce sites. I
Our application uses apache::session as a base, using cookies if they are
supported, and the query string if not. The application is a perl handler
and we are using the template toolkit.
To avoid having to always set the query string manually in the a href links
on all the pages, I was thinking
I have an application where known users connect, and normally I do a db
query to get their configuration information. What I would like to do is
preload all of this information into memory, say into a global hash where
all the mod perl processes can access it.
I could have each process load the
- Original Message -
From: "Stas Bekman" <[EMAIL PROTECTED]>
To: "Chris Ochs" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, December 17, 2003 10:11 AM
Subject: Re: Apache::Singleton
> Chris Ochs wrote:
> > I'm just tr
> >
> > > I have a hash for the posted cgi variables but
> > > that gets cleared out when it's reset anyways, and I have about 30
> global
> > > variables that I just set explicitly at the start of the code.
> >
> > That sounds fine. Eventually you should probably look at turning those
> > into
work then it's worth for me. I have a hash for the posted cgi variables but
that gets cleared out when it's reset anyways, and I have about 30 global
variables that I just set explicitly at the start of the code.
Chris
- Original Message -
From: "Perrin Harkins" <[EMAI
handler {
$r = shift;
print_header();
init();
return OK;
}
sub print_header{
$r->send_http_header('text/html');
}
sub init{
&testing::test;
}
package testing;
sub test {
my $test = Test::One->instance();
print $test->{var1};
}
1;
- Original Mes
Hmmm after playing around with Apache::Singleton I am having a hard time
understanding exactly how you use it. I failed to find even one complete
example of it's use, just bits and pieces, and I'm afraid I don't
understand
how it all fits together. I read the Class::Singleton manpage and th
Will this work to undefine everything in package Test ?
sub ClearGlobals {
my $globalspace = "Test";
foreach (keys %{"${globalspace}::"}) {
unless ($_ eq 'dbh') { ## Don't undef the cached database handle!
local *symbol = "${globalspace}::${_}";
undef $symbol;
undef @sym
he program is run, or do I need to do some kind of foreach iteration
through %Q and undefine everything first?
- Original Message -
From: "Stas Bekman" <[EMAIL PROTECTED]>
To: "Chris Ochs" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tues
I'm still a little unclear after reading the appropriate perl docs, or maybe
just want to make sure I understand it correctly.
If I declare some package globals with use vars(), will the values be
persistant in mod_perl, or will they go undefined after the code is done
executing?
Chris
--
Repo
Am I nuts or does Apache::Request not exist in mod perl 1.28? I decided to
get familiar with using content handlers and ditching CGI.pm, but something
is wrong. Apache::Request doens't exist in my %INC as far as I can tell,
it's not in the mod perl dist files as far as I can tell, and it's not a
I am using CGI.pm with mod perl, and simply because I hate using
$q->param('var') I use $q->import_names('CGI') so I can reference the post
variables as $CGI::var. CGI.pm does not clear this namespace and I am not
sure of the best way to clear an entire namespace. Any ideas?
Chris
--
Reportin
43 matches
Mail list logo