Are you using PerlFreshRestart?
Same behavior, on or off.
That's strange. With PerlFreshRestart on, it is supposed to clear things
out when restarting, which seems consistent with what you're seeing. Are
you sure there is no difference in that trace at all when you turn it on or
off?
what about
$r-headers_out-add(Connection = 'close');
Good idea! I'll put that into a future release.
- Perrin
IPC::ShareLite freezes/thaws the whole data structure, rather than just
the
hash element being accessed, IIRC, so is probably going to have extremely
poor scaling characteristics. Worth adding to check, of course.
No, it's probably not worth it. It would be worth adding IPC::Shareable
I can use a primer on researching WebMail programs
http://users.ox.ac.uk/~mbeattie/wing/
When using Mail::Sender only the first email is sent on my mod_perl
server.
When I investigated, I realised that the socket to the SMTP server was
staying open after the completion of that first email (presumably mod_perl
is responsible for this persistence).
Is there any way to defeat the
I'm using Apache::SizeLimit (on both Solaris and Linux) and getting the
error_log entry:
[Tue Dec 11 15:01:19 2001] (2520) Apache::SizeLimit httpd process too big,
exiting at SIZE=44964 KB SHARE=10900 KB REQUESTS=389 LIFETIME=9505
seconds
But the child process often doesn't exit right
All is well until you reach the end,
where it starts reloading everything, and the namespace is
now completely gone.
Are you using PerlFreshRestart?
I posted this once before and got blown off -- a pox
on to those who tell me to check @INC or what not.
No need to get testy. If this is
I sat down the other day and wrote a test script to try
out various caching implementations.
Very interesting. Looks like Cache::Mmap deserves more attention (and
maybe a Cache::Cache subclass).
Have I missed something obvious?
Nothing much, but I'd like to see how these numbers vary with
That was it. The child exited immediately when I hit the limit with
KeepAlive Off. Now the question is: Is there a way to force an exit
even
with KeepAlive On?
As Jay already pointed out, you usually don't want KeepAlive on with
mod_perl. However, you could try changing the call
That was it. The child exited immediately when I hit the limit with
KeepAlive Off. Now the question is: Is there a way to force an exit
even
with KeepAlive On?
As Jay already pointed out, you usually don't want KeepAlive on with
mod_perl. However, you could try changing the call
One important aspect missing from my tests is the actual concurrency
testing.
Oh, I guess I should have checked your code. I thought these were
concurrent. That makes a huge difference.
2. Lock some part of cache for a request
(Cache::Mmap buckets, MLDBM pages?)
MLDBM::Sync locks the
e.g. $r-read($in,$r-header_in('Content-length'));
or $in=$r-content();
give's my handler the data, but unfotunately exclusive - so the data don't
reaches Apache::Registry and the cgi-script.
Any suggests?
Apache::RequestNotes.
- Perrin
I'm curious about one thing: How easy is it to do fill-out forms
with pipelining templating systems like AxKit? I'd think that in
such cases the stylesheet would have to do so much work that it
would become, in essence, like a CGI script.
Can you explain what work you're talking about
I looked at Memory Usage at my perl-status page and was horrified: the
biggest modules are:
File::Find 1205208 bytes | 2597 OPs
Convert::ASN1::parser1058185 bytes | 3069 OPs
However, if I go inside File::Find, I can't figure out
I do preload the module. How do I find out what it really uses?
In addition to Paul's advice, make sure you understand the output of
your system's top command (or whatever you use to see process size).
Usually there are multiple numbers, and some indicate real memory used
while others indicate
I think the OpenInteract sample apps might do what you want. By the
way, please put the text of your message in the body of the mail rather
than as an attachment.
- Perrin
I'm a java programmer. I don't know anything about
perl. I just want to know whether it's possible to
call servlets from perl scripts after validating some
data provided by the user.
There's no simple way to use both in the same request. Maybe a
subrequest would work, or maybe you could use
Accessing the protected site blows up because the Apache object
referent is undef (see below for examples). No doubt I've screwed
up some part of the httpd.conf but cannot figure out what at this
point...
Without knowing anything much about the AuthCookie module, I would guess
your problem
Just to let anyone who was wondering (and for the benefit of the
archives),
I ended up ditching sessions all together. Instead, I'm using
Apache::AuthDBI to do authentication, and am making calls directly to
my
database server to maintain state. Its not the most pleasant way of
maintaining
I would like to propose a new Apache module before I send it off to
CPAN. The name chosen is Apache::CacheContent.
This is very cool. I was planning to write one of these, and now I don't
have to. Your implementation is short and interesting. I was planning to
do it with a PerlFixupHandler
It uses wildcard DNS and some other goodies to extend the
mod_perl-server-via-proxy-from-static-server setup
Why not just use name-based virtual hosts for the backend and avoid all the
monkeying with DNS?
- Perrin
Now, how did I know I was going to get flamed?? :/
Anyway thanks for the example. Some manuals are too hard to read, you
have to be a goddamn PhD to read some of them out there to untangle the
mess of cross references and incomplete examples. :/
Some are, but this one isn't. This is also
On Tue, 27 Nov 2001, [EMAIL PROTECTED] wrote:
I have put mod_perl handler inside a virtual host section
then inside the virtualhost section, i also put location
directives to override overall modperl handler in some
situations, with sethandler default-handler.
for instance
Alias
On Thu, 22 Nov 2001, Jonathan M. Hollin wrote:
My code now includes:
35: # Session handler...
36: my %session; undef my $session_id;
37: use Apache::Session::MySQL;
38: tie %session, 'Apache::Session::MySQL', $session_id,
39: { DataSource = 'dbi:mysql:sessions', UserName =
There's a simple solution:
http://kobesearch.cpan.org/
Not sure if this is mod_perl related, but i hope someone can help me
anyway. When i do DBI queries from mod_perl handler and put all
returned
results in array then array's first element is empty, I wonder why? I
don't like to shift off first element every time i return the result.
Has anyone
* initialize everything in the parent Apache, just make sure to create
new DBI connections in the children.
That's what I would do. It increases the amount of shared memory.
Disconnect the DBI connection when you're done with it. Apache::DBI
doesn't cache connections during startup, so
I wonder if this has something to do with the multiple init thing
http://marc.theaimsgroup.com/?l=apache-modperlm=100510779912574w=2
It does. It's exactly the same bug.
if the interpreter is really being entirely broken down on each restart
(including the initial one that Apache does when
IIRC, I ran a test with only httpd.conf.default with only these additions
PerlModule My::Foo
then
package My::Foo;
warn initializing...;
in lib/perl and I got 'initializing' on each restart. no
Apache::ReadConfig
going on here.
And no PerlFreshRestart?
I changed Apache::Session::DBI to Apache::Session::MySQL and tried
again.
What's the version number of your Apache::Session? It should be 1.54.
42: tie %session, 'Apache::Session::DBI',
43: {DataSource = dbi:$db_driver:sessions:$db_address};
With Apache::Session::MySQL, the docs say you
How can you specify a Location for these paramters,
or can they be used only from within the current section?
$r is a request object, so modifications only affect the current request.
If you want to affect all requests, you need to do it in the configuration
stage.
- Perrin
So mod_perl has a slight speed edge over fastcgi (which is overthrottled a
little with four servers).
Really? Maybe this is because multi-process handling isn't as fast on NT.
Does it change much if you vary the number of servers?
My goal is to give some kind of useful suggestion to people
on 11/19/01 8:05 PM, Joshua Chamas at [EMAIL PROTECTED] wrote:
It has been a while, but here's a new set of Hello World benchmarks!
There was a recent announcement of HTML::Template::JIT, and Template Toolkit
has an XS option now. Any chance you could put those into the next round?
- Perrin
I seem to recall at least one major Apache module having an option
to use URL-based authentication instead of cookie-based... but I can't
seem to find that from a cursory perusal of CPAN.
Apache::ASP does this.
- Perrin
In my opinion, trying to abstract that stuff away in a web application
causes to more problems than it solves, especially where back buttons
and
bookmarks are concerned.
We haven't found this to be the case. Our servers are sessionless,
so bookmarks work fine.
These are different
Here we insert a session id on all requests, with Apache::Session whether
the request is for a static or dynamic page and have a TransHandler to
strip
the session id and insert it into %ENV which seems to work for us. With
this
approach we don't necessarily need cookies, but verifying if a
Excuse my question if it seems dumb I'm not 100% on NAT and
proxies, but the Eagle book says to 1 Choose a secret, 2 Select fields to
be
user for the MAC. It also suggests to use the remote IP address as one of
those fields. 3 Compute the MAC via a MD5 hash and store in the clients
browser.
I'll try to show how Apache::ASP could help here. In Apache::ASP,
scripts can be executed as subroutines, even with return values,
and I think this goes to the heart of what you need here.
The original e-mail was confusing, but I think what he's after is not so
much the ability to call pages
If it was running under CGI, it would be compiling CGI.pm on each
request,
which I've seen take .3 seconds. Taking that long just to create the
new
CGI instance seems unusual. How did you time it? Are you using
Apache::DProf?
Wouldnt it be compiled at the use-statement ?
Yes, but
1. Can this be done (nicely) as a
authentication/authorization handlier?
Sure, or you could do it as part of another phase if it's easier for you.
There are good exmples on CPAN or in the Eagle book.
2. Do most hosting companies allow
authentication/authorization handlers? (Using
Seemingly I can do Apache handlers though, so I *might* be
okay.
If you look at http://perl.apache.org/guide/, there's information on how to
determine if you're really running mod_perl or not. If you can get a
PerlHandler directive to work, you have mod_perl.
I rather ambigously asked the
What about an additional requirement:
The site should be validated sucessfully by validator.w3.org
Maybe we should give the horse a chance to catch up to the cart...
Once there is a design that people are satisfied with, you are more than
welcome to submit patches to fix validation problems.
One run of my script takes about 2 seconds. This includes a lot of
database-queries, calculations and so on. about 0.3 seconds are used
just for one command: $query=new CGI;
That's really awfully slow. Are you positive it's running under mod_perl?
Have you considered using Apache::Request
What about an additional requirement:
The site should be validated sucessfully by validator.w3.org
Maybe we should give the horse a chance to catch up to the cart...
Once there is a design that people are satisfied with, you are more than
welcome to submit patches to fix validation problems.
Basically, I'm trying to understand when to use Cache::Cache, vs. Berkeley
DB, and locking issues. (Perrin, I've been curious why at etoys you used
Berkeley DB over other caching options, such as Cache::Cache).
Cache::Cache didn't exist at the time. BerkeleyDB seemed easier than
rolling our
In my script a simple use Image::Magick; results in the following lines
being added to my error.log everytime the script is called:
Are you using PerlRun or Registry?
Prototype mismatch: sub
Apache::ROOT::shapeshifter::system::pm_files_2ecgi::Transparent vs ($;@)
at
Hi,
I am sending this after a suggestion that was given to me during in
a
perlmonks discussion.
I was the one who suggested it. Why don't you take a shot at writing
it? The modperl.pod seems like the logical place to patch. Then Stas
could add your information to the guide as well. If
Hi,
ScriptAlias is a CGI thing, not a mod_perl thing. If you're trying to run
thing with Apache::Registry, you should use Alias instead. If you're trying
to use CGI and need help with that, try posting your question on
http://perlmonks.org/.
- Perrin
Will the different child processes created by Apache share the same
variable? Or will each child create an additional instance?
Each child has a separate interpreter and thus a separate instance of
your global. If you need to co-ordinate data between processes, you
might want to look at
1- Currently I have designated a /pm directory to contain my mod_perl
codes, a collection of classes. I then have instances of these
launched
from non /pm directory. I did this so that I don't have to be back at
cgi-bin perdicament where all my CGIs are in one directory. I never
liked that
If i run this code from command line or under mod_cgi, it work fine.
But if it run repeatedly under mod_perl, it occasionally give me a
database access timeout message (see code above), but error value $!
still empty.
What return value are you getting from tie?
Incidentally, since this is
The mod_perl servers are the work horses, just like the custom
servers. In a classical OLTP system, the customer servers are
stateless, that is, if a server goes down, the TM/mod_proxy server
routes around it. (The TM rollsback any transactions and restarts the
entire request, which is
Sorry if I came off sounding harsh. I spend a lot of my personal time
answering newbie questions on this list, and it bothers me when people
say that newbies don't get helped here. They generally get a lot of
help here.
If someone says it's in the guide and you can't find it, ask for a
link to
LPorcano wrote:
I am trying to set up a Apache::SSIChain to process the output from a
cgi running under Apache::Registry
I am using the following line in the conf file:
PerlHandler Apache::OutputChain Apache::SSI Apache::Registry
Shouldn't that be
PerlHandler
Perrin or others involved in the old eToys (or anyone in the new
Toys) --
does anyone know if this is the same mod_perl technology you guys wrote?
I'm not involved in that anymore, so I don't have first-hand information.
However, a brief look at the site makes me think they are not using any
Steve Piner wrote:
Perrin Harkins wrote:
Chris Allen wrote:
[...]
Is $ENV{foo}='bar'; in startup.pl equivalent to PerlSetEnv foo bar
in httpd.conf?
Yes.
Are you sure? I experimented a few months ago, and found that
$ENV{foo}='bar'; would only last in each child until
[EMAIL PROTECTED] wrote:
I'm surprised that no one has, jokingly, suggested PEE.
Sorry, couldn't resist. :)
Neither could these people: http://pee.sourceforge.net/
Matthew Kennedy wrote
Is there a Perl equivalent to Struts? Mason seems to come close if you
keep yourself disciplined somewhat.
I mentioned a couple of tools in the article that are specifically aimed
at MVC: OpenInteract, and Apache::PageKit.
Actually, I think it's pretty easy to replace
John Michael wrote:
I am attempting first to ge them to run correctly under.
Apache::PerlRum
Be careful of PerlRum! It will give you a wicked hangover!
PerlRun is a quick way to port dirty scripts that you can't take the
time to fix. It's the slowest way to run anything in mod_perl, but if
John Michael wrote:
I don't know if this will help. I know very litlle about mod perl, but most
of the people on this list don't seem to answer questions from beginners.
Hmmm. You asked some questions that made it sound like you hadn't read
the documentation, and you stil got 3 answers in
Chris Allen wrote:
If site::products calls functions from site::customers, do I need
a 'use site::customers' in site::products, when I have already
done a 'use' in my startup.pl?
No, but I always do. It's good documentation, to remind you that if you
ever ran this code outside of mod_perl
Matt Sergeant wrote:
OK, so what are we missing?
Based on the comments I've seen here over the years, and some on
Slashdot, the thing that seems to worry people the most is the lack of
an obvious message queue API in Perl. I've seen plenty of
implementations, but there isn't a plug-n-play
Matthew Kennedy wrote:
On Mon, 2001-10-22 at 21:27, Perrin Harkins wrote:
It sounds like the limitation there is that you're interfacing with systems
that can't notify you when something new happens. That's not Perl's fault.
If you wrote your daemons in Java alpahabet soup, they'd still have
Stephen Adkins wrote:
If no one suggests an appropriate list, I propose starting a p2ee group
Can I just say that P2EE is a horrible, horrible name? It includes the
Java version number (when is J3EE coming out?), as well as Sun's
desperate attempt to make it sound like something you buy
on 10/22/01 11:13 AM, Matthew Kennedy at [EMAIL PROTECTED] wrote:
Why was Berkeley DB chosen for caching when a RDBMS (mysql in this case)
was already being used?
It's faster and less resource-intensive for this kind of thing. We just
wanted a really fast persistent hash, and didn't need SQL
Thanks to all for the kind words. This article actually went up a little
bit before it was supposed to, and there should be a revision going up soon
with some grammatical fixes and a set of graphics to illustrate parts of it.
I'll post a follow-up when that happens in case anyone wants to go and
What I'd love to see is the avg spec and numbers of machines in each
section. So how many proxy, mod_perl and search servers were required to
give the phenomenal performance you managed to achieve.
Well, this was a long time ago (I wrote the article over a year ago), and I
don't remember
Wasn't this seasonal rush at least partly caused by the so-called toywar
(www.toywar.com) between eToys.com (the online retailer) and etoy.com
(the art group)?
There were a lot of DoS attacks (and some even uglier, nastier ones) in 1999
as a result of that. Most of that was dealt with
Is there a standard way of dealing with users who are on high
bandwidth
connections who hit refresh (hold down F5 in IE for example) many
times
on a page that generates alot of database activity?
Try this:
http://www.stonehenge.com/merlyn/LinuxMag/col17.html
- Perrin
By making 'ThreadsPerChild 1' - the entire server runs as a single
thread, mod_perl and any other requests (e.g. images) that come in -
this is why the server slows to a snails pace. I've set up two
instances now, one to handle all incoming requests, the other to serve
as a backend proxy
On http://www.firstworks.com/sqlrelay/programming/perldbd.html it says:
For the duration of the session, the client stays connected to a
database connection daemon. While one client is connected, no other
client can connect. Care should be taken to minimize the length of a
session.
Converting all the globals to Module variables has been a piece of cake,
but
I've run into one big issue. Depending on how you log into the system, the
user will connect to different databases. When they do this, I store the
Database Handle from DBI/DBD as $main::dbh. This variable has the
Please make sure that it's possible to do a plain ordinary literal
text string search. Nothing fancy, no case-folding, no automatic
removal of puctuation, nothing like that. Just a literal string.
Last night I tried to find perl -V on all the search engines
mentioned on the mod_perl home
It *seems* that the script can run once, but
that the next time it is accessed, it cannot connect to the $server
anylonger, it dies with a 'connection timed out' message ... What
'gotcha' is causing this?
It sounds like this problem:
I am trying to make IPC::Shareable work with my script, however I get
this error:
IPC::Shareable::SharedMem: shmget: Permission denied
at /usr/local/lib/perl5/site_perl/5.005/IPC/Shareable.pm line 456
[Tue Oct 16 14:44:15 2001] [error] Could not create shared memory
segment: Permission
is there a delete method/operation any where? Could not find anything
in
the perldoc docs indicating a method like that!
It supports the same interface as normal hashes, so you can delete keys
in the same way. You may also want to read the MLDBM documentation if
you haven't already.
- Perrin
Unfortunately, I've now noticed that my server is unbearably slow -
setting 'ThreadsPerChild 1' in my httpd.conf made my server slow to a
snails pace (and it really is a pretty quick server on a T1 line
dedicated to it, pretty much).
That's odd. On Win32, mod_perl runs as a single blocking
Apache::DBI's ping check worked fine, but when the dbh was ejected from
the cache (and so went out of scope), something in the DESTROY stack
was blocking, and holding the child up for 12m. I'm guesing the
underlying DBD::Oracle code was trying to do a nice shutdown on the
dbh, but
I don't want to reinvent the wheel and I'm sure this has been done a
zillion times, so does anyone know of a module in CPAN that I can use
for this?
Have you tried searching on http://search.cpan.org/?
DBIx::FullTextSearch
DBIxTextIndex
Search::InvertedIndex
Plus lots of other stuff like
I need to find out why Apache-request is not being found and assigning a
value.
If I had to guess, I'd say your mod_perl is not installed correctly. I
would rebuild Perl, apache, and mod_perl (static, not DSO) and see if that
fixes the problem.
If you want to troubleshoot it more before
PH Another solution is to have the child process exit if the ping
PH fails. You get one failed request, but you clear out the messed
PH up processes quickly and replace them with new ones that can
PH connect safely.
Yeah, good point. Although our poor little WAP service (for
Try doing my $r=Apache::Request-new($r);
You're confusing Apache::Request with Apache-request(), which is easy to
do. Apache::Request is a different class, which is part of the libapreq
distribution. Apache-request() returns the current request object
(commonly called $r).
- Perrin
Got a server which is getting hit really bad.
Have to keep it up.
You didn't really give us enough information to guess at what your problem
is. You describe one symptom in this message: slow ping times. What else
is wrong? Are pages loading slowly? Failing to load? What applications
are
We are using perl 5.6.0 for Apache 1.3/20, with mod_perl 1.26.
Are you sure? There was a problem with %INC and PerlModule, but I thought
it was fixed in 1.26.
- Perrin
At 18.07 -0400 10/11/2001, Perrin Harkins wrote:
We are using perl 5.6.0 for Apache 1.3/20, with mod_perl 1.26.
Are you sure? There was a problem with %INC and PerlModule, but I
thought
it was fixed in 1.26.
- Perrin
Indeed, like I said, I tested it by dumping %INC myself
Is there anything special about putting things, like, [OT] in the subject
line, other than being informative?
No, but it does allow people to use automatic mail filters to ignore OT
messages.
Is there a reference that provides a list of lists for apache.org that can
be used to direct the
Are there any benchmark comparisons between apache::dbi and mysql
relay?
I've never heard of this mysql relay before. A Google search found
this:
http://www.firstworks.com/sqlrelay.html
Is that it? Looks interesting!
We're planning on having four sql servers, one of them will do all of
Is there a reason NOT to put the
images in a database?
There are many.
1) You can't manipulate them with file-based tools any more.
2) Handling a request for an image consumes many more resources, since there
is now application code and a database involved rather than just a simple
static
Here is Apache::Session::Generate::* variants, which especially
uses Apache standard C-modules.
Apache::Session::Generate::ModUniqueId
http://bulknews.net/lib/archives/Apache-Session-Generate-ModUniqueId-0.01.ta
r.gz
Perrin Harkins wrote:
I believe the limiting done by BSD::Resource is pretty harsh and may
actually be at the kernel level. I don't think you can catch the signal
and
deal with it yourself. What you should do is use Apache::SizeLimit to
handle your size constraints, and just use BSD
I've just created a form like that just for testing and it worked fine,
(form name=zbr method=POST action=/cgi-bin/printenv/zbr/?zbr=t)
I think that's just a coincidence. IIRC, the spec doesn't require this to
work, and it doesn't work in all browsers. The only real solution is to not
do it.
it just killed the task at soft limit without calling cleanup. what is
wrong?
I believe the limiting done by BSD::Resource is pretty harsh and may
actually be at the kernel level. I don't think you can catch the signal and
deal with it yourself. What you should do is use Apache::SizeLimit to
@PerlModule = qw(Blah); # add others to the list
Might as well just say use Blah;, I think.
- Perrin
Now take the amount you want to make and divide it by the number
of hours you came up with above ($40,000 / 1,000). You get $40.
That's your target hourly rate. And despite what they high-flying
.com weanies were saying a year ago, that's going to be a nice
living for a young guy unless
* Jeffrey W. Baker ([EMAIL PROTECTED]) [011003 19:52]:
I'd love to hear any other experiences with using the DOM to build
output
from scratch. I'd also like to hear people's opinions on XML::DOM (I
think it stinks and I've replaced it with a C DOM implementation).
I can't speak to
It doesn't much matter whether you're using stacked handlers or not, or
pushing vs. replacing, because the $r-child_terminate method seems to
simply call the C exit(0) function under certain conditions (Win32, old
version of apache, anything else?). Not much chance of any further action
if
Alex Harper wrote:
Aha! That's where the problem lies. I had recently added:
PerlCleanupHandler +Apache::Sizelimit
to my httpd.conf. I placed it there so the sizelimit would be enforced
post-request. Removing the line fixed my problem.
Whoa! This could be bad. Apache::SizeLimit
Alex Harper wrote:
I'm using a mod_perl 1.26 RPM I built using the RedHat RPM prep files
and dropping in the 1.26 code. I believe it is built EVERYTHING=1.
Apache::Status indicates all hooks are enabled, including:
PerlStackedHandlers Enabled
Okay. Would you mind putting some
I am currently using Apache::Resource to limit the maximum amount of ram
the apache childs are allowed to use.
It would be better to use Apache::SizeLimit for that. It's more flexible
and allows requests to complete before shutting down the process.
Apache::Resource is more useful as a safety
We have an application written in Java using MVC which we would like to
port
to mySQL/Perl platform. We have used Struts,to create tags.
Any inputs in this regards will be appreaciated.
You will probably find that Struts tags can be ported nicely to Template
Toolkit
701 - 800 of 1288 matches
Mail list logo