quickly, which will drive
the load up. Yes, that would be bad, but probably not as bad as swapping.
- Perrin
instructed to die at the end of the current request?
It's not a hard limit, and I actually only have it check on every other
request. We do use hard limits with BSD::Resource to set maximums on CPU
and RAM, in case something goes totally out of control. That's just a
safety though.
- Perrin
pplication, you could segregate that on it's own mod_perl
server so that it won't bring anything else down with it, but the
usefulness of this approach depends a lot on the situation.
- Perrin
PID to
see if it's the parent.
- Perrin
epare"
without a package or object reference at /syst$
It looks like your real problem is that you ran out of memory. Have a
look at the information in the guide about MaxClients and
Apache::SizeLimit. You may not have a DBI problem at all.
- Perrin
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 a bummer that the parent
doesn't run END blocks. Will it run cleanup handlers?
- Perrin
ot;, but I don't see one. Dave says the END block trick worked
for him, so maybe it only fails under certain circumstances.
- Perrin
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
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
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 pare
changing the code.
My guess is that my handler will clearnup the cache before
Apache::DBI's handler gets a chance to auto-rollback.
You might get some errors about undefined methods and such from that.
- Perrin
On Mon, 15 Jan 2001, Dave Armstrong wrote:
I just moved from dedicated to virtual hosting sigh, and was
wondering how to configure mod_perl to install the modules to a
private lib, outside of @INC.
http://perl.apache.org/guide/install.html#Installing_Perl_Modules_into_a_D
- Perrin
is that
it won't kill off processes when there isn't a problem. It also catches
situations where you occasionally do something that raises the size of a
process significantly by killing those off sooner.
- Perrin
a similar machine where you can test a new
package. Short of that, the symlink suggestions people have made are
probably the best you can do.
- Perrin
more as soon as it can. Of course PerlRunOnce is a huge
liability. Getting rid of that would surely help a lot.
- Perrin
to handle a surge and have to spawn a whole
bunch.
- Perrin
if MaxClients is not configured
correctly. That may be what Sam was seeing.
- Perrin
a separate server that runs just
mod_perl, and having your jserv (or whatever) server send requests for
mod_perl apps to it using mod_proxy. See the mod_perl Guide for more info
on using a proxy with mod_perl.
- Perrin
to run it too close
to the edge since you don't want to have to axe a process that's in the
middle of doing something just because it got a little too big (i.e. no
hard limits on per-process memory usage).
You can't change MaxClients while the server is running, can you?
- Perrin
kind of bug,
but I don't understand why you're doing it this way. Why don't you just
put a reference to the %session hash in pnotes and use it in the second
handler, instead of putting the ID in and re-creating it? That should
be considerably more efficient.
- Perrin
r of servers spawned per check. I don't
have much motivation to do this investigation myself, since I've already
tuned our MaxClients and process size constraints to prevent problems
with our application.
- Perrin
inux and Apache from it. If I get the
chance this weekend, I'll try some tests of my own.
- Perrin
$MyConfig::DBI_DSN = 'foobar';
/Perl
- Perrin
onstant ID = 2;
sub new {
my $self = [];
$self-[ NAME ] = 'spot';
$self-[ ID ] = 7;
return bless $self;
}
Or something like that, and make accessors for the member data. I think
there are CPAN modules which can automate this for you if you wish.
- Perrin
efficiency and
code readability and wrote hashes when we meant hashes. Of course, since
this stuff is OO code, we could always go back and change the internal
implementation to pseudo-hashes if it looked like it would help.
If pseudo-hashes work for you, go ahead and use them. If it ain't
broke...
- Perrin
ng is kind of
obfuscated. But maybe I just don't understand what you're doing from these
small snippets.
- Perrin
hard limits on
memory and CPU consumption. Second, you may be bale to register a
handler for a signal that will generate a stack trace. Look at
Devel::StackTrace (I think) for how to do it.
- Perrin
mod_perl, and some other mechanism
(package vars like I'm using now?) under everything else.
We do that. It's pretty simple. Just make get and set subs (or
methods) that check for exists $ENV{'MODPERL'} and use pnotes or a
global hash depending owhich they are running under.
- Perrin
for
the one Randal wrote, but it's not exactly what you're asking for.
- Perrin
Gunther Birznieks wrote:
GoF did not introduce Model-View-Controller architecture. But it is
discussed in Wiley's "A System of Patterns: Pattern-Oriented Software
Architecture".
MVC is frequently used in mod_perl apps. For example, see
Apache::PageKit.
- Perrin
Dave Rolsky wrote:
On Mon, 5 Feb 2001, Perrin Harkins wrote:
First, BSD::Resource can save you from these. It will do hard limits on
memory and CPU consumption. Second, you may be bale to register a
handler for a signal that will generate a stack trace. Look at
Devel::StackTrace
Joshua Chamas wrote:
Hey,
Per Perrin Harkin's advice, and my client's consent, I hacked
up Apache::SizeLimit to support MAX_PROCESS_UNSHARED_SIZE config,
where instead of limiting by the apparent process size, one limits
by the amount of unshared memory being used.
I actually did submit
.
To make sure your stash is getting cleared, try putting some other object
into it (by passing it to process) and see if it gets destroyed. If it
does, then there's something about the way your plugin is written that's
causing the problem. If not, TT has a problem.
- Perrin
?
No, don't do that. You need $tt to stick around, so that you can get the
large speed increase from using the in-memory cache.
- Perrin
and write
conversion scripts every time I change an object attribute, or does
SPOPS try to use some sort of "generic" schema?
And just out of curiosity, are you familiar with any of the similar
projects that others have worked on, like Iaido (formerly Iaijutsu) or
Jellybean?
- Perrin
your session reference in $r-pnotes instead of the
actual plugin object. Then the session will get destroyed at the end of
the request even if the plugin object doesn't.
- Perrin
list.
- Perrin
just tried the code you posted under mod_perl and it worked fine.
I changed a couple of lines having to do with locations and package names,
and I commented out the PRE_PROCESS/POST_PROCESS stuff. The plugin object
reported being destroyed.
- Perrin
no equivalent that I could see.
In short, Zope wants to be more, but currently is difficult to figure
out. That could be just my Perl experience, but I understood more of
OpenInteract in half an hour than I did with Zope after several tries over
the last few years.
- Perrin
vils might be fixed by a clean install.
- Perrin
probably write something like Iaido as an object publisher for
it. I know Iaido has quite a few whizbang features that aren't currently
in OI, but I think they could be fit into it, to the benefit of all.
- Perrin
putting this in your
httpd.conf, right after the PerlRequire:
Perl
print join (':', @INC);
/Perl
- Perrin
iming spec for your Perl app and just use
the cron triggers as a constant clock?
- Perrin
our server. What's wrong with making individual cron jobs that call
individual URLs (think of it as RPC) to cause actions on your web server
exactly when you want them done? Doesn't that sound a whole lot simpler?
- Perrin
On Wed, 14 Feb 2001, Pierre Phaneuf wrote:
I guess two persons "simpler" aren't always the same: I find it easier
laying out a table and querying it than hacking something to fiddle with
my crontab safely.
As far as I know, crontab -e is perfectly safe.
- Perrin
On Thu, 15 Feb 2001, Stas Bekman wrote:
I might be barking at the wrong tree, but why cron? Why don't you use
at(1).
And there's a CPAN module for it: Schedule::At. It claims to be
cross-platform, and I believe NT has a version of at(1).
- Perrin
strange.
The original post didn't say that the goal was to modify the scheduled
jobs dynamically from mod_perl, and that does add a new wrinkle. I still
think a good Perl interface to cron would be more obvious and more
reliable.
- Perrin
could look at
Apache::Compress.
- Perrin
(not DB_File) which should provide a similar level of
performance.
- Perrin
they
probably shouldn't. See
http://forum.swarthmore.edu/epigone/modperl/crachoupro/Pine.LNX.4.30.0102231
[EMAIL PROTECTED] for more info and a workaround.
- Perrin
for ideas on interface
changes that might solve your problem.
- Perrin
I am writing an apache perl module which logs HTTP
environment variables. This is fine for static content
(html, images) but is a problem for dynamic content
such as php.
Why doesn't Log Format work for you?
- Perrin
cookies and to count hits within a time window rather
than CPU. It uses files, and doesn't have to lock them. Quite fast under
Linux, and even works over NFS if you need a clustered solution.
- Perrin
buffer, but theoretically
the file system buffer could do it since that's managed by the kernel.
- Perrin
"Daniel Little (Metrex)" wrote:
Along the same lines, how about making SizeAwareMemoryCache as well so that
you can specify just how much data you want stored in the cache.
Sounds like Joshua Chamas' Tie::Cache module. It provides a
size-limited LRU cache.
- Perrin
.
That would be a nice option. Take a look at Cache::Mmap before you
start.
- Perrin
ons on how to use it. If you're interested in using
Berkeley DB, this might save you some trouble.
(Stas, after the conference you might want to grab the info from our
article in the conference handouts and add it to the Berkeley DB section
of the Guide. Or I could do it and send it to you.)
- Perrin
I have some preliminary benchmark code -- only good for relative
benchmarking, but it is a start. I'd be happy to post the results
here if people are interested.
Please do.
- Perrin
ely faster?
It is, and it's now part of the standard distribution.
http://www.astray.com/pipermail/foo/2000-August/000169.html
- Perrin
by a
BTree in shared memory. IPC::ShareLite only works for individual scalars.
It wouldn't surprise me if a file system approach was faster than either of
these on Linux, because of the agressive caching.
- Perrin
:
By default, mod_perl does not send any headers by
itself, however, you may wish to change this:
PerlSendHeader On
That seems to say that if you want mod_perl to handle headers for
you, cange it to On.
That's correct.
- Perrin
h mod_cgi, PerlSendHeader will not send the
MIME type and a terminating double newline. Your script must send that
itself..."
- Perrin
aders" it is misleading; it seems to indeicate that mod_perl
will send "Content-Type: text/html\r\n\r\n" all by itself, and that
conversely, to disable that PerlSendHeaders should be Off.
Would it help if it said "PerlSendHeader On makes mod_perl act just like
CGI with regard to headers"?
- Perrin
an include.
There are lots of discussions on how to do this in the mailing list
archives.
- Perrin
On Mon, 19 Mar 2001, Joshua Chamas wrote:
A recent API addition allows for a secondary cache layer with
Tie::Cache to be automatically used
When one process writes a change to the dbm, will the others all see it,
even if they use this?
- Perrin
insulting Perl! I consider it poor form.
Incidentally, there are some nice mod_perl clones for Python, based
partially on Doug's work.
- Perrin
ered? Any comments?
- Perrin
te.pm" it runs fine. Whe I run it
as part of the web server, it fails in the connect statement in the
Tie:DBI routine.
What is the exact error message? Have you tried searching the mailing
list archive for that message? Are you using PHP in your server?
- Perrin
that does
locking coupled with sync() and it worked fine.
You mean with DB_File? There's a big warning in the current version
saying not to do that, because there is some initial buffering that
happens when opening a database.
- Perrin
from every DBI call. If you haven't turned
PrintError off, DBI will issue a warning that goes to your log when it
fails to connect.
- Perrin
something else?
You have to look at SHARE. Subtract SHARE from RSS.
- Perrin
with a SDBM_File
is pretty fast.
I'll update the Guide to mention your module in the dbm section.
- Perrin
still have problems with this technique, unless you
tie/untie every time. I'm looking at the perldoc for DB_File version
1.76, at the section titled "Locking: the trouble with fd". At the very
least, you'd have to call sync after acquiring a write lock but before
writing anything.
- Perrin
. For read/write, you have to tie/untie every time. Or
use BerkeleyDB.
- Perrin
, if it does do
the right thing and re-read from disk, it's probably not much better than
re-opening the database. I suppose it would avoid some Perl object creation
though, so it would be at least a little faster.
- Perrin
have done a search on CPAN for "resume" and "cv" did not come up with
anything
like what i am doing
http://www.zeuscat.com/andrew/work/resume/formats.shtml
- Perrin
to change.
- Perrin
on NFS.
Since NFS-shared sessions already work with Apache::ASP, you could try it,
benchmark it for your expected traffic, and then decide.
- Perrin
to
avoid this, you'll need to do your own locking, or just use Apache::Session.
- Perrin
're posing. There are replication tools for MySQL which
are supposedly fairly easy to run.
- Perrin
could use Filter::CPP with #ifdefs for this.
#ifdef DEBUGGING
print STDERR $some_thing;
#endif
- Perrin
Matt Sergeant wrote:
Is there a way I could use LocationMatch to specify a not condition?
as in
LocationMatch !~ "/(thisfile|thatDir|whatever).*"
SSLVerifyClient require
/LocationMatch
That would let me list the exceptions, and everything else would be
restricted by default..
.
- Perrin
.
- Perrin
It might be easier and more bulletproof to build the conf file
off-line with
a simple perl script and a templating tool. We did this with Template
Toolkit and it worked well.
- Perrin
That would be fine and dandy, but it's not exactly what I'm going after.
Currently if I want
/modperl/message/27943
- Perrin
could steal code from
there.
However, dbm is a good choice for this. You may find SDBM_File faster than
DB_File if your records are small enough for it (I think the limit is 2K per
record).
- Perrin
ree, and do
not hide the fact that it doesn't support transactions. There's no need for
this kind of vitriol.
- Perrin
kit.org/docs/default/index.html.
- Perrin
code
simple and let the data model objects do the input checking, you have to
bubble it back up somehow. I'm still kind of unsatisfied with how difficult
some of the user exception handling turned out to be, and I'll probably try
something different next time
- Perrin
in an eval block, but this no longer works since all Registry scripts
are already in one huge eval block.
It should still work. An eval{} is scoped like any other block. Maybe you
have a typo? Post your code and we'll look at it.
- Perrin
using dbm
files or something similar that doesn't need to keep the whole thing in
memory at once.
- Perrin
It's not hard to do, but it is potentially dangerous since you could
overwrite globals like $/ and change the behavior of your program. In
general, it's best to avoid cluttering the symbol table.
- Perrin
with a scalar that
takes up more than 700K in each child. If you can't live with that, you
might try breaking up the file more so that you can access it in smaller
chunks.
- Perrin
trouble with that is that you will have a separate copy in every
child taking up 700K or more. You can only avoid that if you restart the
server or use some kind of shared memory approach.
- Perrin
sounds like a cookie to me. What makes you think it isn't one? Or
else they just don't care who you are until you hit the shopping cart, and
then they keep your identity with URLs and hidden form fields.
- Perrin
have to make exceptions for things like
AOL proxies that can blast you with legitimate traffic. If thousands of AOL
users all click on an ad banner in the same 10 seconds, you don't want to
ban them.
- Perrin
optimized XS version of the TT stash.
- Perrin
. There is no difference in the amount of parsing going on, since
it's all cached after the first time (per child).
- Perrin
that information?
You could use LWP to make the request instead of using a subrequest, or you
could use a modified version of Apache::PerlRun or Apache::Registry that
fakes CGI and captures the output. You can look at Apache::Filter for some
ideas.
- Perrin
301 - 400 of 1298 matches
Mail list logo