Re: Installing modperl under different directory tree
On 6 Feb 2004, at 19:54, Hamilton, Henrique H wrote: Does anyone know of a way to install modperl 2 under a different directory tree (say under /opt/modperl_1.9.12) in Redhat Linux 7.X? What are you doing with apache? Typically, there are two courses of action: 1. Be a slave to Redhat and do the RPM thing. 2. Build your own apache/mod_perl system. Which of these are you doing? -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Installing modperl under different directory tree
On 6 Feb 2004, at 21:37, Hamilton, Henrique H wrote: I'm building modperl2 from source. Against a stock RH RPM? I was hoping that since I plan on building it as a dso I would be able to compile the dso to point to a different directory. Why? -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Installing modperl under different directory tree
On 6 Feb 2004, at 21:53, Hamilton, Henrique H wrote: I haven't found anywhere that has rpm's for modperl2 on RH 7.3. I also haven't had much luck building modperl2 statically into apache2.0.48. Which means I have to build the rpm myself. (This rpm will eventually be part of an apache2/Tomcat5 rpm) Before I can begin to automate this build process (we'll probably have to push this package out to multiple linux boxes) I need to see if I can build it by hand. My personal preference is to put any non standard software under the /opt filesystem for ease of administration. My preference would be to do the classic APACI type build targetted at /opt and then just rsync it out. But I never got on with rpms ;-) which part of the build was giving you trouble? Are your RH7.3s up to date? -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: CDB_File
On 20 Mar 2004, at 0:54, Lester Vecsey wrote: I'm serving many web requests with an apache modperl handler, and I'm doing lookups on a CDB_File within the handler, using 'tie' to open the cdb file for every request that comes through. Is there a way to gain more performance by somehow doing a tie/open just once when the apache servers starts, and then again only when the cdb file changes, if needed? Exactly what you just said. Open read-only though! You'll probably need a 'use vars' in startup.pl to make the handle global. -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: mod_perl performance question
On 8 Apr 2004, at 16:48, Pascal Felber wrote: We have noticed some "strange" behavior when stress-testing one of our perl modules and we haven't managed to find an explanation or workaround in the mod_perl documentation. We have reproduced this problem with a minimal module, installed as a PerlResponseHandler, that simply sends am HTTP 302 redirection message to the client. The server is a [EMAIL PROTECTED] 512MB, running linux 2.4.18-3, Apache 2.0.48, and mod_perl 1.99_08. We have run benchmarks using the `siege' application with an increasing number of clients and we have measured the latency of every request. I have put a graph online at http://www.eurecom.fr/~felber/mod_perl.gif that illustrates the problem. The response time of the server is roughly constant but we observe some pretty high spikes in the latency every 30 seconds or so, as if the server was interrupted for a short period of time (approx. 300 ms). The delay of 300 ms seems very high for tasks like shared memory accesses or garbage collection, given that our test module does almost nothing. When running the same test using mod_alias for redirections, there are no such spikes; so it really looks like they are due to mod_perl rather than the OS, Apache, or the network. There might be an obvious explanation but we have limited expertise with mod_perl and we would very much appreciate some help from other users on this list. What else is running on the machine? what does vmstat show? -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: which API to use for listing files ? (newbie question)
On 9 May 2004, at 0:29, aravind elango wrote: Hi, I am new to programming in modperl and am trying to do a recursive listing of files in a directory. Sounds like you need the File::Find module from CPAN. -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: environment not getting reset
On 15 May 2004, at 19:38, Alex Krohn wrote: Hi, I'm facing a weird problem that's proving difficult to track down. After a certain number of hits to our mod_perl apps, the environment no longer gets reset per request. For example, if you have a script that just dumps the environment, after hitting some piece of code, that script will show PATH_INFO from a previous request (only when you don't pass any path_info in, if you do pass it in, it shows the proper one). It's a rather large site, and I'm struggling to track down what is causing this. Any tips on what I should look for? i.e. any pitfalls in how you handle the environment that might cause it to no longer get reset per request? I just for bitten by exactly this. It was PerlSetupEnv. I took that out (don't know why I even put it in there!) and everything was fine. Alternatively, any pointers on where I could put some debugging to see if the env is really getting reset? It looks like I need to edit mod_perl.c, perl_setup_env(), but am not sure. I was suspicious of CGI::Session and CGI.pm and probably would have ended up where you are now but for a lucky guess. This is with perl 5.8.3, Apache 1.3.31, mod_perl 1.29. And I was on perl 5.8.0 and latest Apache 2.0 and whatever mod_perl. -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: One and Two again.
On 9 Jul 2004, at 19:25, David Arnold wrote: My question to the people on this list: How to proceed? Can modperl1 and modperl2 coexist? Can they both run with the latest apache? Can someone outline the steps I should take to achieve my goal? Especially if there is someone on the list who has experience giving this a try? If you're tinkering, I'd do two completely separate installs and run them on different ports. If they're live, do exactly the same, but put an apache 2.0 on the front end and do the reverse proxy-fu as wonderfully specced by Stas. -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Light image server in low-traffic conditions?
On 4 Aug 2004, at 00:48, Larry Leszczynski wrote: On Tue, 3 Aug 2004, Philippe M. Chiasson wrote: I've had lots of success with a light reverse proxy (httpd or squid) in front of my mod_perl servers. I would recommend it, as it's simpler than 2 completely separate servers for dynamic content and static stuff. I like squid for this, as it's virtually drop-in and play. I also prefer a reverse proxy to separate servers, but I generally prefer httpd to squid mainly because I really like having mod_rewrite available, just in case - it's really handy in a pinch and has gotten me out of a lot of jams when unexpected situations arise... Squid can pipe URIs to an arbitrary process (usually perl ;-) for rewriting. All the power of perl, none of the power of sendmail... -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Hosting provider disallows mod_perl - "memory hog / unstable"
On 11 Sep 2004, at 20:35, Will Yardley wrote: But businesses don't just let various random people off the street write code and then load it on their servers. Explain the success of PHP then. Apparently the cross-site holes were tolerable for long enough... Will Yardley (of DreamHost) You guy suck a lot less than most ;-) -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
mod_perl hosting
Hi all, I'm currently hosting a site which is to be hosted elsewhere. It's got a small mod_perl gadget embedded that does a little magic with charsets and the Template Toolkit. The site runs to about 60G of bandwidth per month and has a faar few mailing lists. And thoughts on reasonable cost hosting? Ta, Dave -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: How to get a core dump
On 8 Nov 2004, at 14:39, Marc Gracia wrote: So, my question is... There is any way to force apache to dump a coredump file? I suppose I'm forgotting something but I really desperate... Yes. As root, you need to do the ulimit magic and then start the server. My question is: do you *really* need to debug this? For sure, the process has got its knickers in a twist, but this is happening at cleanup time anyway and not during any request. I'm sure you have better things to worry about. Cheers, Dave -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Email::Valid returns "invalid domain" for goood email addresses?
On 26 Nov 2004, at 17:43, Mike Ward wrote: Hi, I'm using Email::Valid to check the validity of submitted email addresses, and for some reason, it thinks that "mike[at)skybird-travel.com" (replace [at) with @, obviously) contains a invalid domain. I'm using the module like so: eval { $addr = Email::Valid->address( -address => $value, -mxcheck => 1, -tldcheck => 1, ); }; Knock the switches out and see which one triggers it... -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: CGI::Session or CGI::Application
On 15 Jan 2005, at 05:29, Octavian Rasnita wrote: Hi, If I want to use CGI::Session or CGI::Application, can I do it if I use mod_perl or there are better modules for using with MP? CGI::Application JFW for me under mod_perl. -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands
Re: modperl 2.0.0-rc4 statically linked with httpd-2.0.53
On 1 Mar 2005, at 21:58, Gokul P. Nair wrote: how do i find out if mod_perl is statically linked to apache or dynamically? the reason i need to know this is because in order to install HTML::Mason, it is strictly reccomended that mod_perl be statically linked to apache. httpd -l Try it as a dso. on recent builds it should be fine. -- Dave Hodgkinson CTO, Rockit Factory Ltd. http://www.rockitfactory.com/ Web sites for rock bands
Re: is there a templating system that....
On 15 Aug 2005, at 06:06, jonathan vanasco wrote: HTML::Template got ruled out because the only way to get templates to render as xhtml valid is to use info as comments Huh? you want to validate templates? A template is just that. What it renders to should be validated!
Re: is there a templating system that....
On 15 Aug 2005, at 23:02, David Nicol wrote: (getting tired of this thread) It's also now firmly off topic of the mod_perl list! Dave // Having spent most of today explaining the principle of doing \\ the least possible computation at run time...
Re: apache children waits for each other?
On 16 Aug 2005, at 06:55, Badai Aqrandista wrote: Badai Aqrandista wrote: My mod_perl web app uses memcached to cache most of the (MySQL) database query results and as the session storage (Apache::Session::Memcached). Would it be a problem for your application if you suddenly lost all of your session data? That could happen with memcached. Yes, I'm aware of that. The problem is that the database structure is a reminiscent of the old version, which creates one database per client. It used to be only 40 clients and one web server. Now we have 300+ clients (=300+ databases) and 2 web servers. I always get 'Too many connections' error when I test the application with more than 100 concurrent request. Any other ideas? Yes, really read an understand the chapters in the mod_perl guide about setting up two_tier servers and what the implications are. You may need to do some MySQL tuning too if you haven't already. There are parameters in there to do with the number of concurrent open databases.
Re: Question about using Apache::DBI with Postgres/MySQL
On 18 Aug 2005, at 18:18, Jonathan Vanasco wrote: Instead of connecting to the DB and having DBI cache the handle after-the-fork, would it make sense to subclass Apache::DBI, have the parent process create a defined number of connections, and then use some sort of roundrobin/checkout to sign out a handle during a request? You're asking "why?" and i'm responding that i dont really know i just remembered that i'll likely have to up my connection limit to my db based on the number of apache children No, don't do that. Front-end your fat apache with squid or a thin apache and MaxClients-limit the backend. Keeps concurrency issues on the backend server to a minimum too. It's all in the guide.
Re: Question about using Apache::DBI with Postgres/MySQL
On 18 Aug 2005, at 18:58, Jonathan Vanasco wrote: i'm thinking about moving to pgsql for stored procedures too (yes my5 has it, but its beta), but thats an entirely OT discussion. And you have pgpool too. But you're still trying to optimise prematurely. Treat your fat apaches as application servers and have few enough that if they're all running, they max out your CPU. For example, I have a MaxClients of 2 on one box that only renders Template::Toolkit, but 10 on a server where the PHP has to wait for a few SQL requests to come back. Oh, and in this situation, consider running separate apaches for your different applications. Tune your startup.pl for maximum sharing, keep MaxClients low and therefore your memory usage predictable.
Re: maintaining shared memory size (was: Re: swampedwithconnection?)
On 29 Aug 2005, at 01:15, Badai Aqrandista wrote: I think I have to write some of the code in C. I can't find any other places in the code to optimize (or probably I uncounciously don't want to make changes because I don't have any test suites)... Then how do you know what to write in C? Read and understand the chapter(s) in the mod_perl guide on profiling and see where that takes you. Franky, if your code is CPU bound (rather than waiting for the database) then a MaxClients of 3 will serve your purposes. You *do* have KeepAlive off in your httpd, right?
Re: maintaining shared memory size (was: Re: swampedwithconnection?)
On 30 Aug 2005, at 01:56, Badai Aqrandista wrote: You *do* have KeepAlive off in your httpd, right? No... I mean in the backend Apache, not the frontend whatever. When you're happering your server, is the CPU on the server running at or near 100%? If not, you have other problems.
Re: maintaining shared memory size (was: Re: swampedwithconnection?)
On 30 Aug 2005, at 10:16, Badai Aqrandista wrote: I used to use A::S::MySQL, but it created 2 connections for every process. This caused 'Too many connections' error. So I tried to use memcached. Now that I know how to make one connection per process (using database.table identifier on all sql queries), I'll probably try to use A::S::MySQL again. But now you have reduced MaxClients, that shouldn't happen.
Re: a faster html::template?
On 2 Sep 2005, at 03:53, Foo Ji-Haw wrote: Hi all, I'm a happy user of HTML::Template on my mp2 setup. But when it comes to performance, I notice that to populate a loop of some 1500 records, the system takes 2-3 seconds on my P4 2GHz machine. I think that's way too long, especially on a development machine. I tried to load the template with 'cache=>1', but the performance improvement is not much. I hear some talk on the newsgroup about HTML::Template::JIT. Is there anyone who has optimised on a 1000+ record loop in HTML::Template? I am a strong believer in templating engines, and I think reverting to embedded code should be avoided at best. 1500 record? don't do it: page or use AJAX. Been there. It was horrible.
Re: a faster html::template?
On 7 Sep 2005, at 21:07, Perrin Harkins wrote: On Wed, 2005-09-07 at 20:41 +0300, Octavian Rasnita wrote: I have used Template-Toolkit, and the time used for parsing those templates used to double the whole time the program needed to run, so the speed of template parsing could be important. I suspect you had one of the following problems: - Incorrectly configured template caching - Heavy use of method calls in your template - Use of a plugin that fetches data (e.g. DBI queries or a Class::DBI object) - Programming logic in the template that belongs in the perl code instead - Heavy use of INCLUDE rather than PROCESS I often see people make one or more of these mistakes (which are not possible to make with HTML::Template) and conclude that TT is slow. Put this checklist in the docs please!
Apache::ExtUtils
Hi, I have a little C code that’s bound into mod_perl 1.3, 2005-era code. We’re trying to get everything up to date, so 2.0.10 from EPEL it is. However, this code uses Apache::ExtUtils which no longer exists. Is there a replacement or is binding C code in easier these days? Thanks, David
Re: Apache::ExtUtils
> On 24 Aug 2017, at 11:10, David Hodgkinson wrote: > > Hi, > > I have a little C code that’s bound into mod_perl 1.3, 2005-era code. We’re > trying to get everything up to date, so 2.0.10 from EPEL it is. > > However, this code uses Apache::ExtUtils which no longer exists. > > Is there a replacement or is binding C code in easier these days? > > Thanks, > > David > Found a hint: https://perl.apache.org/docs/2.0/devel/porting/porting.html <https://perl.apache.org/docs/2.0/devel/porting/porting.html>
Re: Compiling with Apache 2.4
> > This doesn't work. I just throw up my hands at this point. ModPerl is > obviously so broken now that it can no longer be used. Having spent a few months coaxing some 2005-era apache and mod_perl into modern life, I kicked out all the self-build apache, mod_perl, perl from Bamboo and went with the latest RPMs from RHEL 7. I do not regret this decision. And don’t talk to me about mod_perl 1.x.
Re: Future MPM Support?
We’re all about the Plack these days. > On 7 Jun 2018, at 18:21, John Dunlap wrote: > > Are there any plans for mod_perl to support mpm_event, mpm_worker? Every time > I try to use something other than mpm_prefork I am plagued by segfaults. > > -- > John Dunlap > CTO | Lariat > > Direct: > j...@lariat.co > > Customer Service: > 877.268.6667 > supp...@lariat.co > <100x60.png>
Re: Future MPM Support?
No. Different concept. > On 7 Jun 2018, at 18:52, John Dunlap wrote: > > Is Plack backwards compatible with mod_perl? > >> On Thu, Jun 7, 2018 at 5:44 PM, David Hodgkinson wrote: >> We’re all about the Plack these days. >> >>> On 7 Jun 2018, at 18:21, John Dunlap wrote: >>> >>> Are there any plans for mod_perl to support mpm_event, mpm_worker? Every >>> time I try to use something other than mpm_prefork I am plagued by >>> segfaults. >>> >>> -- >>> John Dunlap >>> CTO | Lariat >>> >>> Direct: >>> j...@lariat.co >>> >>> Customer Service: >>> 877.268.6667 >>> supp...@lariat.co >>> <100x60.png> > > > > -- > John Dunlap > CTO | Lariat > > Direct: > j...@lariat.co > > Customer Service: > 877.268.6667 > supp...@lariat.co
Re: Future MPM Support?
Moving your method handlers to the framework. I like catalyst. Stand on the shoulders of giants. Mojolicious makes me itch. > On 7 Jun 2018, at 19:21, John Dunlap wrote: > > What is involved in porting an application from mod_perl to starman? > > On Thu, Jun 7, 2018 at 6:18 PM, Clive Eisen wrote: >>> On 7 Jun 2018, at 19:13, David Hodgkinson wrote: >>> >>> No. Different concept. >>> >>>> On 7 Jun 2018, at 18:52, John Dunlap wrote: >>>> >>>> Is Plack backwards compatible with mod_perl? >>>> >>>>> On Thu, Jun 7, 2018 at 5:44 PM, David Hodgkinson >>>>> wrote: >>>>> We’re all about the Plack these days. >>>>> >> >> This. >> >> We have moved entirely to >> >> nginx (doing the ssl where appropriate) -> starman (which uses plack) and >> Dancer2 >> >> Life is a LOT better >> >> — >> Clive >> > > > > -- > John Dunlap > CTO | Lariat > > Direct: > j...@lariat.co > > Customer Service: > 877.268.6667 > supp...@lariat.co