Re: Apache::DBI - consistently encountering about a .00667% error rate

2024-10-10 Thread Perrin Harkins
DBI is supposed to install the driver when you call connect(), although that does mean any code loaded there isn't shared in memory. My question would be, did you get any actual failed responses in your load test, or just these error log messages? If all the requests succeeded, then I would suspec

Re: Confusion about SQL results - row counts and contents differ

2023-01-26 Thread Perrin Harkins
Maybe you haven't committed some manual change on the server, so it isn't visible to other connections. On Thu, Jan 26, 2023 at 8:56 PM Steven Haigh via modperl < modperl@perl.apache.org> wrote: > > > On Fri, Jan 27 2023 at 09:50:42 +0800, demerphq > wrote: > > On Fri, 27 Jan 2023, 09:43 Steven

Re: mod_perl alternatives

2021-03-18 Thread Perrin Harkins
I don't think there's any sudden urgency to switch to something else, since nothing has actually changed about the state of mod_perl. However, if you do want to migrate to something else, you should look at Plack: https://metacpan.org/pod/Plack Plack is not a drop-in replacement for mod_perl, but

Re: MP framework

2017-08-02 Thread Perrin Harkins
You can run Dancer on mod_perl using Plack. The Dancer documentation covers it. Or there's Catalyst. These frameworks are trying to be independent of the web server they run on, so they don't tie in to mod_perl beyond taking advantage of the speed. That doesn't stop you from mixing them with mod_p

Re: Multiple documents/files with same subroutine name

2017-08-01 Thread Perrin Harkins
Hmm, that's not expected behavior with the code you're showing here. Are you running this under ModPerl::Registry? It's supposed to generate a unique package name for every file that prevents subs from colliding. There are some things to watch out for when using subroutines in code you run under R

Re: capture exception

2017-05-30 Thread Perrin Harkins
https://www.effectiveperlprogramming.com/2011/03/know-the-different-evals/ On Tue, May 30, 2017 at 10:49 AM, Dirk-Willem van Gulik < di...@webweaving.org> wrote: > > On 30 May 2017, at 16:43, John Dunlap wrote: > > How is it a security hole? > > …. > > > my $ret = eval { $m->...() }; > > > Just

Re: Apparent memory leak

2016-09-06 Thread Perrin Harkins
for my customers because this problem is only happening on >> heavily loaded servers. I can't reproduce it locally. >> >> On Tue, Sep 6, 2016 at 11:26 AM, Perrin Harkins >> wrote: >> >>> Hi John, >>> >>> The key is usually finding ou

Re: Apparent memory leak

2016-09-06 Thread Perrin Harkins
Hi John, The key is usually finding out what the request was that caused it. You can add the pid to your access logging, or write a more complete mod_perl handler to log the complete data input along with the pid. Then you just go back and look at what it was after you see which process was killed

Re: Bad rap

2016-06-14 Thread Perrin Harkins
As mentioned in this article, nginx is a great reverse proxy for mod_perl sites. On Tue, Jun 14, 2016 at 10:28 AM, John Dunlap wrote: > https://www.nginx.com/blog/nginx-vs-apache-our-view/ > > On Tue, Jun 14, 2016 at 2:35 AM, André Warnier wrote: > >> On 13.06.2016 14:09, John Dunlap wrote: >>

Re: Bad rap

2016-06-13 Thread Perrin Harkins
I invited him to stop by for help understanding what he's got running and what his options are. He doesn't know perl, so this is probably all a black box to him. On Sat, Jun 11, 2016 at 2:11 PM, Vincent Veyron wrote: > Hi all, > > See this post on reddit : > > > https://www.reddit.com/r/linuxadm

Re: recompiling perl

2016-05-10 Thread Perrin Harkins
Rather than trying to mess with an existing RPM, I'd suggest you build from source. When you run mod_perl's Makefile.PL, run it with the perl binary you want to build against. - Perrin On Tue, May 10, 2016 at 10:13 AM, Hiram Gibbard wrote: > Hi All, > > If I want to recompile the mod_perl modu

Re: close connection for request, but continue

2016-04-21 Thread Perrin Harkins
On Thu, Apr 21, 2016 at 9:48 AM, Iosif Fettich wrote: > I'm afraid that won't fit, actually. It's not a typical Cleanup I'm after > - I actually want to not abandon the request I've started, just for closing > the incoming original request. The cleanup handler could relaunch the slow > back reque

Re: close connection for request, but continue

2016-04-21 Thread Perrin Harkins
On Thu, Apr 21, 2016 at 5:20 AM, Iosif Fettich wrote: > > I'm trying to achieve the following: when there is an incoming request, I > want to set a time limit in which an answer should be delivered to the > client, no matter what. > > However, since the work triggered by the initial request (ther

Re: Thread-safe & vars scope clarification

2016-04-04 Thread Perrin Harkins
like threads could have an interest, but according to your message, > should not be a general case. > > Thank you, > > Ben > > Le 4 avr. 2016 à 22:49, Perrin Harkins a écrit : > > Hi Ben. > > Before you get too far into the details of using threads, can I ask why >

Re: Thread-safe & vars scope clarification

2016-04-04 Thread Perrin Harkins
Hi Ben. Before you get too far into the details of using threads, can I ask why you're considering it? The memory footprint and performance of using forked processes with Perl is generally going to be better than that of threads, due to copy-on-write. - Perrin On Mon, Apr 4, 2016 at 4:44 PM, Ben

Re: Weird variable scope problem

2016-03-31 Thread Perrin Harkins
the start of the request, and then I get an > error for attempting to call a function on an undefined value. > > I know that the code for some older areas of the application are loaded > dynamically through evals and requires. Is it possible for that kind of > dynamic loading to result i

Re: Weird variable scope problem

2016-03-25 Thread Perrin Harkins
On Fri, Mar 25, 2016 at 10:11 AM, John Dunlap wrote: > > Basically, I have a module which has a some lexically scoped variables in > it. These variables are used by accessor methods in the package. The > problem is that, if I use this module in certain parts of my application, > these variables ar

Re: Large File Download

2015-03-28 Thread Perrin Harkins
Yeah, sendfile() is how I've done this in the past, although I was using mod_perl 1.x for it. On Sat, Mar 28, 2015 at 5:55 AM, André Warnier wrote: > Randolf Richardson wrote: > >> I know that it's possible(and arguably best practice) to use Apache to >>> download large files efficiently and qui

Re: Singletons

2015-03-10 Thread Perrin Harkins
Yes, that code just uses an ordinary global variable to store the instance, and those survive between requests. Keep in mind there is no magic here to share the instance between processes, so you'll have a different one in every process. - Perrin On Mon, Mar 9, 2015 at 5:25 PM, John Dunlap wrote

Re: mod_perl for multi-process file processing?

2015-02-03 Thread Perrin Harkins
I agree, either threads or Parallel::ForkManager, depending on your platform and your perl, will be a lot faster than mod_perl for this. Of course there might be other reasons to use mod_perl, e.g. it's useful to have this available as a remote service, or you want to call this frequently for small

Re: mod_perl for multi-process file processing?

2015-02-03 Thread Perrin Harkins
Cache::FastMmap is a great module for sharing read/write data, but it can't compete with the speed of loading it all into memory before forking as Alan said he plans to do. - Perrin On Tue, Feb 3, 2015 at 2:05 AM, Cosimo Streppone wrote: > Alan Raetz wrote: > > So I have a perl application tha

Re: Errors in the wrong place and wrong format

2014-11-20 Thread Perrin Harkins
I think that only redirects errors logged with Apche2::Log, not all of STDERR. There might be a workaround for capturing STDERR. I'd try searching the mailing list archives. - Perrin On Mon, Nov 17, 2014 at 6:28 PM, worik wrote: > My virtual host has errors redirected to: > > Worik.errors.log >

Re: Prototype mismatch

2014-11-20 Thread Perrin Harkins
Hi Worik, This happens when you reload code that uses prototypes. In this case, those constants are using prototypes. It's similar to this: http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Constant_subroutine_XXX_redefined Not really a problem, but it will not happen if you stop and sta

Re: Disconnect database connection after idle timeout

2014-11-14 Thread Perrin Harkins
On Fri, Nov 14, 2014 at 1:32 PM, Xinhuan Zheng wrote: > Are you implying that the performance will be suffered when using > mod_perl-enabled server processes as the front tier servers? Not performance, scalability. You can't handle as many requests per second if you use mod_perl without a front

Re: Disconnect database connection after idle timeout

2014-11-14 Thread Perrin Harkins
On Fri, Nov 14, 2014 at 7:58 AM, Vincent Veyron wrote: > If I understand correctly, I could also use Apache::DBI and a persistent > connection for a similar result, modulo what you wrote in an earlier > message regarding the connection being more explicit (which I don't quite > grasp, I'll have t

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
On Thu, Nov 13, 2014 at 5:38 PM, Xinhuan Zheng wrote: > We have load balancer cache that can cache images and JavaScripts. This > functions seems a bit duplicate. It's not about caching. Here's a quote from that link I sent earlier: "Another drawback of this approach is that when serving outpu

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
On Thu, Nov 13, 2014 at 5:29 PM, Vincent Veyron wrote: > I stash a reference to a DBI handle in pnotes during the HeaderParser > phase of my requests; I then refer to this handle for every request in my > PerlResponseHandlers. > > This seems to have been working fine for several months. Am I doin

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
On Thu, Nov 13, 2014 at 2:41 PM, Xinhuan Zheng wrote: > From the description of the document, the “proxy” server acts much like a > memcache but it appears the difference is the “proxy” understands the HTTP > protocol while memcache does not. Not exactly. While it is possible to do some caching

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
On Thu, Nov 13, 2014 at 2:48 PM, Vincent Veyron wrote: > But then, what is the point of using connect_cached? You can use it outside of mod_perl. You can also use instead of Apache::DBI if you don't want the connection to be more explicit (instead of magically overriding the connect() call). K

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
> On Thu, Nov 13, 2014 at 2:23 PM, Perrin Harkins > wrote: > >> Yes, it's an HTTP proxy. It handles sending out the bytes to remote >> clients, so that your mod_perl server doesn't have to. A popular >> high-performance choice these days is nginx. >> &

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
e/strategy.html - Perrin On Thu, Nov 13, 2014 at 2:12 PM, Xinhuan Zheng wrote: > Hi Perrin, > > I don’t quite understand what you mean by setting up a front-end proxy. > What would you expect this “proxy” do? Does it take HTTP request? > > Thanks, > - xinhuan > > From:

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
On Thu, Nov 13, 2014 at 12:19 PM, Xinhuan Zheng wrote: > Having another tier (like DBD::Gofer) looks like really messy in > infrastructure plus it’s not certain who is going to maintain that module’s > quality. I'd only recommend trying it after you set up a front-end proxy, tune your mod_perl

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
On Thu, Nov 13, 2014 at 12:21 PM, Vincent Veyron wrote: > Nobody suggested using connect_cached, where the documentations says : > > The cached database handle is replaced with a new >connection if it has been disconnected or if the "ping" method fails > > Would that not solve OP's proble

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
On Thu, Nov 13, 2014 at 11:29 AM, Dr James Smith wrote: > From experience - and having chatted with our DBAs at work, with modern > Oracle and with MySQL keeping persistent connections around is no real gain > and usually lots of risks It's certainly good to know how long it takes to get a fres

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
On Thu, Nov 13, 2014 at 10:29 AM, Xinhuan Zheng wrote: > We don’t have any front end proxy. I think I see the problem... ;) If you use a front-end proxy so that your mod_perl servers are only handling mod_perl requests, and tune your configuration so that idle mod_perl servers don't sit around

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Perrin Harkins
Hi, Can you explain what problem you're trying to solve? Apache processes don't have the option of doing things when there is no request to serve, so you can't easily have them disconnect. It may be possible with alarms or cron jobs or something, but it's probably not a good idea. If you tune you

Re: Shared Dirty memory of Apache parent process

2014-09-18 Thread Perrin Harkins
On Thu, Sep 18, 2014 at 5:35 AM, Nageswara rao Gurram < nageshgurra...@gmail.com> wrote: > As the traffic is increasing shared memory in parent is increasing , thats > what puzzling me ! If childs write into shared of parent, then it should > come into private of child(copy on write) but why share

Re: Shared Dirty memory of Apache parent process

2014-09-17 Thread Perrin Harkins
On Wed, Sep 17, 2014 at 1:18 PM, Mark Hedges wrote: > For example, you could use a tied DBM/MLDBM hash, DBD::SQLite > or another file-based database with access locking for your > cache, and save it in a shared memory filesystem like /dev/shm. > I would suggest that too, if it fits the use case.

Re: Shared Dirty memory of Apache parent process

2014-09-16 Thread Perrin Harkins
Hi, Loading data in the parent process is a common strategy for data that you won't modify. Do you need to change this data from the child processes? If so, does it matter if the other child processes see the changes? - Perrin On Tue, Sep 16, 2014 at 10:28 AM, Nageswara rao Gurram < nageshgurra.

Re: Something wrong with CPAN ?

2014-06-09 Thread Perrin Harkins
The address for reporting technical issues is cpansea...@perl.org, although I'm sure they've heard about it by now. There's a good alternate search at https://metacpan.org/. - Perrin On Mon, Jun 9, 2014 at 7:23 AM, André Warnier wrote: > Hi guys. > > Is it only me, or does the search box in ww

Re: Trouble with script execution

2014-05-19 Thread Perrin Harkins
On Sun, May 18, 2014 at 9:47 PM, Worik Stanton wrote: > I am sure I read somewhere that mod_perl monitors scripts and reloads > them if the modification date changes. You're probably thinking of Apache::Registry/ModPerl::Registry. They do that with your CGI scripts. - Perrin

Re: API Docs

2014-05-16 Thread Perrin Harkins
The $r there is the Apache2::RequestRec object. It gets passed to your handler. See the handler example in the overview: https://perl.apache.org/docs/2.0/user/intro/start_fast.html - Perrin On Wed, May 14, 2014 at 7:52 PM, Worik Stanton wrote: > I am still trying to fathom the API. > > I have

Re: Trouble with mod_perl API: E.g., Apache2::Directive::conftree()

2014-05-14 Thread Perrin Harkins
Hi Worik, Your ErrorLog question isn't really a mod_perl issue, but I'd suggest you check for warnings at startup. You may not have APACHE_LOG_DIR defined, etc. I don't use Apache2::Directive, so I can't vouch for it. I prefer simpler things like PerlSetVar. There is an automated test for this

Re: Apache::DBI and Pgbouncer

2014-04-22 Thread Perrin Harkins
ing Apache::DBI and benchmarking. - Perrin On Tue, Apr 22, 2014 at 12:33 PM, John Dunlap wrote: > use Apache::DBI (); appears in our startup.pl but the application code uses > DBI directly. > > > On Tue, Apr 22, 2014 at 12:30 PM, Perrin Harkins wrote: >> >> Thanks Joh

Re: Apache::DBI and Pgbouncer

2014-04-22 Thread Perrin Harkins
s that > running the pool on the web server eliminates the overhead of establishing > new connections(DNS lookups, establishing TCP connections, authentication, > waiting for the database to spool up a new process, etc). > > > On Tue, Apr 22, 2014 at 12:18 PM, Perrin Harkins wrote: &

Re: Apache::DBI and Pgbouncer

2014-04-22 Thread Perrin Harkins
Interesting. Why did you have to install PgBouncer? Can't Postgres handle remote connections from your web server? I don't use Postgres, but reading the description of PgBouncer I can see some things you'd want to consider. First, Apache::DBI prevents you from making persistent connections befo

Re: support for Apache 2.4

2014-02-15 Thread Perrin Harkins
On Fri, Feb 14, 2014 at 8:01 PM, Jie Gao wrote: > The link http://svn.apache.org/snapshots/modperl-2.0/ on page > http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution > returns 404; http://perl.apache.org/dist/ is full of broken links. Apologies for the disrupt

Re: Singleton Persistence

2014-02-03 Thread Perrin Harkins
On Mon, Feb 3, 2014 at 5:33 PM, Chris Bennett wrote: > Right now I am using pg_1_.pl and pg_2.pl on the different hosts, but > the code is identical, except that some data is pulled in from a config > file for the different databases, etc used. > > Can I safely use pg.pl on both VirtualHosts or do

Re: Singleton Persistence

2014-02-03 Thread Perrin Harkins
On Sat, Feb 1, 2014 at 8:14 PM, John Dunlap wrote: > In mod_perl, can instantiated singletons survive requests? Sure, anything you put in a global will survive until the httpd child process is shut down. How many requests each child serves depends on your configuration. When a new child starts

Re: Returning 200 status from my handler

2014-01-14 Thread Perrin Harkins
Hi John, > I notice, in the getting started documentation, that I am supposed to return > Apache2::Const::OK to indicate an HTTP 200 success status Actually, that's not about sending a HTTP 200 success status. You return Apache2::Const::OK to tell httpd that your handler ran correctly. > When I

Re: Apache::DBI connect

2013-11-11 Thread Perrin Harkins
On Fri, Nov 8, 2013 at 2:58 PM, Xinhuan Zheng wrote: > The query is from the application code not the 'select 1' test query. > OK, then it seems like Apache::DBI may not have a problem. > While most of time I saw Apache::DBI->connect is called but sometime from > a process, it will print out it

Re: Apache::DBI connect

2013-11-08 Thread Perrin Harkins
On Thu, Nov 7, 2013 at 11:06 PM, Xinhuan Zheng wrote: > As I turned on more debugging, when the problem occurs, the Apache cached > connection reference is different than the database handle reference the > query is using. Which query are you talking about? The ping in Apache::DBI? Or somethin

Re: Apache::DBI connect

2013-11-07 Thread Perrin Harkins
})) { > > What's the difference between the two? Why the code in favor of "or" > instead of "and"? > > - xinhuan > > From: Perrin Harkins > Date: Thursday, November 7, 2013 3:05 PM > > To: Xinhuan Zheng > Cc: Adam Prime , "modperl@

Re: Apache::DBI connect

2013-11-07 Thread Perrin Harkins
reconnects to database OK. I ran it multiple > times and every time it reconnects OK. But Apache::DBI doesn't work. You > saw the previous debugging info. Where is the problem? > > - xinhuan > > From: Perrin Harkins > Date: Thursday, November 7, 2013 1:00 PM > To

Re: Apache::DBI connect

2013-11-07 Thread Perrin Harkins
;On 13-11-07 11:29 AM, Xinhuan Zheng wrote: > >> one correct - In both cases, the return value is evaluated to false. > >> > >> How do you distinguish? > >> > >> - xinhuan > >> > >> From: Xinhuan Zheng >> <mailto:xzh...@christ

Re: Apache::DBI connect

2013-11-07 Thread Perrin Harkins
On Thu, Nov 7, 2013 at 9:46 AM, Xinhuan Zheng wrote: >The $ok is undef. In the case if the test does succeed (like the first select), $ok returns 0E0. That all sounds good. 0E0 is a true value in Perl. It means "zero but true." And undef is a false value. You don't need to test for undef. >

Re: Apache::DBI connect

2013-11-07 Thread Perrin Harkins
(DBD ERROR: OCIStmtExecute). > > Process 3861 establishes a new connection. and it says "already > connected to" database. While the query execution failed with "ORA-03114" > and the httpd process is in CLOSE_WAIT state. How does it thinks it's > already connected while it's actually not? > > >- xinhuan > > >

Re: Apache::DBI connect

2013-11-06 Thread Perrin Harkins
On Wed, Nov 6, 2013 at 4:07 PM, Xinhuan Zheng wrote: > I wonder this line of code should be changed to 'DBI->connect(@args) if > ($@)'. If ping failed, that means the connection is already closed, $drh > may be no longer valid, will $drh->connect always return a valid new > connection? What's the

Re: mysql connection pooling

2013-10-25 Thread Perrin Harkins
details of implementation. I have Apache httpd with mod_perl and > DBI. Without many code changes, what does the proxy server look like to > achieve the database connection pooling? What is "Apache running DBI Gofer" > as shown in the slides page 26? > > Thanks, > -

Re: Qu: installing mod_perl2 outside of apache2 and perl install directories

2013-09-10 Thread Perrin Harkins
I suspect there's a way to fix the issue, but my general advice is this: don't be a slave to running the tests if you already have some way to know if the module is working. It's fine to force install rather than spend hours fighting with a test setup. - Perrin On Tue, Sep 10, 2013 at 8:11 PM,

Re: mysql connection pooling

2013-06-27 Thread Perrin Harkins
Hi, There is nothing exactly like the database pool in JDBC. However, there are solutions for this problem. The first thing you should do is run a reverse proxy in front of your mod_perl server. That typically reduces the number of mod_perl processes by a factor of 10, i.e. 1000 mod_perl proces

Re: Apache::DBI "connection lost contact" error

2013-06-13 Thread Perrin Harkins
tion during server startup, read the docu !!" message at > all. It appears this new version only works with Apache2 but not Apache1. > Is that possible to fix it with Apache1? > > Thanks, > - xinhuan > > From: Perrin Harkins > Date: Wednesday, June 12, 2013 5:53 AM > To

Re: Apache::DBI "connection lost contact" error

2013-06-12 Thread Perrin Harkins
Thanks Fred! On Wed, Jun 12, 2013 at 3:29 AM, Fred Moyer wrote: > Apache-DBI 1.12 was just pushed to CPAN with this update. Thanks for > the great work on the fix Perrin. > > On Thu, Jun 6, 2013 at 2:53 PM, Perrin Harkins wrote: > > That's great! I'll commit the p

Re: Apache::DBI "connection lost contact" error

2013-06-06 Thread Perrin Harkins
r anymore. The patch looks good to me. > > Thanks, > - xinhuan > > From: Perrin Harkins > Date: Thursday, June 6, 2013 3:02 PM > To: Xinhuan Zheng > Cc: "modperl@perl.apache.org" > > Subject: Re: Apache::DBI "connection lost contact" error > &g

Re: Apache::DBI "connection lost contact" error

2013-06-06 Thread Perrin Harkins
On Thu, Jun 6, 2013 at 12:22 PM, Xinhuan Zheng wrote: > The database handle that is created in startup.pl needs to be really disconnected (not overloaded disconnect) so that won't leave an idle server > process running on the database side. Once it's really disconnected, the server process can be

Re: Apache::DBI "connection lost contact" error

2013-06-05 Thread Perrin Harkins
On Tue, Jun 4, 2013 at 2:32 PM, Xinhuan Zheng wrote: > I have seen in other web servers when apachectl starts, there is no "connect lost contact" error but it did happen when apachectl stops. If your server does not receive constant requests, you may see this error on shutdown because cached data

Re: Apache::DBI "connection lost contact" error

2013-06-04 Thread Perrin Harkins
On Tue, Jun 4, 2013 at 9:59 AM, Xinhuan Zheng wrote: > Will the new connection that's created be cached after then and the connection that's not ping-able will be discarded? Yes. > Will this cached the new connection last until the child process exit? Yes, unless it times out on the Oracle side

Re: Apache::DBI "connection lost contact" error

2013-06-04 Thread Perrin Harkins
On Mon, Jun 3, 2013 at 4:36 PM, Dave Morgan wrote: > As an administrator I still rely and depend on Apache::DBI, even if it is unsupported. Can we kill this rumor please? Apache::DBI is supported. - Perrin

Apache::DBI "connection lost contact" error

2013-06-03 Thread Perrin Harkins
On Monday, June 3, 2013, Xinhuan Zheng wrote: > What is the check to see if the server is restarting? Is that new child processes spawning? It's a test for whether or not we're running in the parent process, used to skip caching connections during startup. It's this, line 128: if (Apache2::ServerU

Re: Apache::DBI "connection lost contact" error

2013-06-01 Thread Perrin Harkins
On Fri, May 31, 2013 at 5:45 PM, Xinhuan Zheng wrote: > 2520 Apache::DBI skipping connection during server startup, read the docu !! > 2520 Apache::DBI skipping connection during server startup, read the docu !! That's good. > 2521 Apache::DBI push PerlChildEx

Re: [OT] Apache::DBI

2013-05-31 Thread Perrin Harkins
many, many programmers worldwide. >>>> >>>> André >>>> >>>> >>>> Jim Schueler wrote: >>>> >>>>> >>>>> I still use Alpine. And they never fixed the bug where ctrl-c (to >>>>> cancel >

Re: Apache::DBI

2013-05-31 Thread Perrin Harkins
longer supported and has > been superceded by newer modules. Especially if no one responds and > explicitly accepts the responsibility, this seems like the most appropriate > answer for the poster of the original thread. > > I owe you a :) from a couple posts ago. :) > > -

Re: Apache::DBI

2013-05-31 Thread Perrin Harkins
s::DBI > or DBIx::CLASS). Beyond that is the following: > > Edmund Mergl was the original author of Apache::DBI. It is now supported > and maintained by the modperl mailinglist, see the mod_perl documentation > for instructions on how to subscribe. > > Unless Perrin Harkins agr

Re: Apache::DBI "connection lost contact" error

2013-05-31 Thread Perrin Harkins
gt;> >> Thanks, >> - xinhuan >> >> On 5/31/13 9:02 AM, "Jim Schueler" wrote: >> >> Perrin is right. But fundamentally, I'd say that you're confusing >>> 'local' and 'my' variable scoping: >>> >>>

Re: Apache::DBI "connection lost contact" error

2013-05-31 Thread Perrin Harkins
Don't know why. > - xinhuan > > On 5/30/13 8:31 AM, "Jim Schueler" wrote: > > >Did this solve your problem? > > > > -Jim > > > >On Wed, 29 May 2013, Perrin Harkins wrote: > > > >> Hi, > >> Apache::DBI is supposed

Re: Apache::DBI "connection lost contact" error

2013-05-29 Thread Perrin Harkins
Hi, Apache::DBI is supposed to skip caching if you connect during startup. You should just need to disconnect your database handle after you finish with it. It sounds like you're opening it and then leaving it open. - Perrin On Wed, May 29, 2013 at 3:24 PM, Xinhuan Zheng wrote: > Hi, > > I

Re: How best to get my mod_perl programs to run under CGI for non-mod_perl users?

2012-12-17 Thread Perrin Harkins
Hi Chris, One approach would be to modify your applications so they use some kind of abstraction layer, like Plack, that runs on top of both CGI and mod_perl. There's more on Plack here: http://plackperl.org/ Another option, since you used Registry, would be to change your use of Apache::Reques

Re: Does mod_perl-2.0.4 support threads?

2012-12-14 Thread Perrin Harkins
All of the 2.x series supports threads. Your Perl has to be compiled for threads though. - Perrin On Fri, Dec 14, 2012 at 2:58 AM, Grant wrote: > I'm stuck on mod_perl-2.0.4 for now and I'm seeing something in Gentoo > which makes me think it doesn't support threads. Is that true? > > - Gran

Re: use "global" data in handler (was : custom proxy setup with mod_perl)

2012-11-25 Thread Perrin Harkins
It sounds like you have it right. If you don't define the package variable $URLS during startup, it will be undef when the child process handles the first request and will keep whatever data you put into it after that. - Perrin On Sat, Nov 24, 2012 at 8:09 AM, André Warnier wrote: > First, I m

Re: X-Forwarded-For

2012-10-14 Thread Perrin Harkins
On Sat, Oct 13, 2012 at 7:41 AM, pangj wrote: > In nginx's config file we have added the x-forwarded-for header. > With modperl (MP2) how to get this header? Use headers_in(): http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_headers_in_ - Perrin

Re: Coupling Plack/PSGI with mod_perl, or an alternate architecture?

2012-10-14 Thread Perrin Harkins
On Sun, Oct 14, 2012 at 2:56 PM, Tatsuhiko Miyagawa wrote: > I think Lars meant no proxy required with *mod_perl* rather than plack > stuff, but yes, Starman is recommended to put behind proxy otherwise > your precious worker process is bound to slow networked clients, and > gets even worse if you

Re: Coupling Plack/PSGI with mod_perl, or an alternate architecture?

2012-10-12 Thread Perrin Harkins
On Wed, Oct 10, 2012 at 3:57 PM, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 wrote: >> reasons to pick a mod_perl approach over a plack runner approach > Requires no proxying. Isn't Starman normally run with a proxy in front of it? If not, it should be. Otherwise, you'd be tying up large processes sending bytes to slow r

Re: Coupling Plack/PSGI with mod_perl, or an alternate architecture?

2012-10-10 Thread Perrin Harkins
On Wed, Oct 10, 2012 at 1:46 PM, Eduardo Arino de la Rubia wrote: > Greetings! Hi! > 1) Has anyone on this list actually run a Plack application *inside* > mod_perl? I don't actually know that I understand how one does that. Can you > speak to the relative merits of this approach? I think it's

Re: reloading perl modules under heavy load

2012-10-04 Thread Perrin Harkins
On Thu, Oct 4, 2012 at 10:36 AM, Jason Aubrey wrote: > Now, we have MaxClients set super high I hope you don't have it set so high that if you hit it you would run out of memory and start swapping... > Also possibly relevant is > kern.ipc.somaxconn which "limits the size of the listen queue for

Re: reloading perl modules under heavy load

2012-10-03 Thread Perrin Harkins
On Wed, Oct 3, 2012 at 9:45 AM, Jason Aubrey wrote: > Hi All, > > We have modperl application running on 64bit (2 cores), freebsd 8.2, perl > 1.14.1, modperl 2.0.5, apache 2.2.21, 24GB of ram and about 5.5k users. > Additional system details are below. Under heavy load we are seeing errors > of

Re: apache2 + mod_perl + Catalyst + Session = Segmentation fault

2012-09-28 Thread Perrin Harkins
On Fri, Sep 28, 2012 at 12:33 PM, demerphq wrote: > Maybe look at Sereal as an alternative to Storable. > > https://github.com/Sereal/Sereal/ > http://search.cpan.org/~smueller/Sereal-Decoder/lib/Sereal/Decoder.pm > http://search.cpan.org/~smueller/Sereal-Encoder/lib/Sereal/Encoder.pm Wow, faster

Re: mod_perl build with perlbrew

2012-09-19 Thread Perrin Harkins
On Wed, Sep 19, 2012 at 3:43 PM, bluedome wrote: > I'm building mod_perl with a perl built using perlbrew. > > The build succeeds but make test fails because @INC is not correct. One thing to consider is that I think perlbrew sets the PERL5LIB environment variable. If you aren't running in a per

Re: Benchmark!

2012-07-23 Thread Perrin Harkins
On Sun, Jul 22, 2012 at 4:09 AM, Susan wrote: > and check out the benchmark between the same exact page, which is just a > test page in written in perl/mod_perl, it loads a real big image, some perl > output text/html etc.. first in cgi, then (handler) apache2::registry, then > (handler) apache2::

Re: Finding the object being DESTROY'ed

2012-06-13 Thread Perrin Harkins
Maybe some of the circular reference finding tools like Devel::Leak, Devel::Peek, or Devel::LeakTrace::Fast can help? - Perrin On Wed, Jun 13, 2012 at 4:35 PM, Josh Narins wrote: > I have a DESTROY method I can’t avoid keeping around, and in certain code > paths in mod_perl I successfully make s

Re: mod_perl and Apache::DBI - what happens on request termination

2012-06-04 Thread Perrin Harkins
On Mon, Jun 4, 2012 at 3:43 PM, André Warnier wrote: > So, if the response handler (which runs your script/program which runs the > DBI code) is busy doing something with the database server, but not writing > anything back to the client, it will happily continue doing that for as long > as it tak

Re: highscalability.com report

2012-04-04 Thread Perrin Harkins
On Tue, Apr 3, 2012 at 10:50 PM, Jim Schueler wrote: > that reports YouPorn.com switched from Perl to PHP.  Apparently there's a > reported 10% improvement in speed, but I haven't noticed :). We lost YouPorn?! Tragic! I'd say the joke's on them though. If you rewrite an old site and only get a

Re: Apache::Session::DB_File cleanup issue

2012-04-03 Thread Perrin Harkins
Hi James, There are a couple of issues here. One is that Apache::Session::DB_File doesn't use MLDBM, so you can't use that to read it. It uses DB_File. The other is that Data::Dumper may not do what you hope when you hand it a tied variable, i.e. not a real hash. I'm not certain about that one

Re: acces control via cookies for webdirectories again

2012-03-14 Thread Perrin Harkins
On Wed, Mar 14, 2012 at 3:57 AM, Timon Roth wrote: > i habe tried also a second scenario with the PerlProcessConnectionHandler > and the PerlPreConnectionHandler. > > i must then first read the header from the client via the socket. thats very > cool. but how can i then route the client forward to

Re: Question about caching

2012-03-13 Thread Perrin Harkins
On Tue, Mar 13, 2012 at 3:51 PM, Dan Axtell wrote: > I understand the value of having one light-weight server for static content, > and a reverse proxy back to a heavy-weight Apache with mod_perl, and I > understand I can use something like Varnish or mod_cache to add a caching > layer,  but I'm w

Re: Terminating Child process Dynamically

2012-03-07 Thread Perrin Harkins
2012/3/7 Torsten Förtsch : > Yes, in mp1 it did. Not so in mp2. Oh, I see this was covered on the dev list. It doesn't call perl_destruct() because it may be running under threads, which mp1 didn't need to worry about. - Perrin

Re: Terminating Child process Dynamically

2012-03-07 Thread Perrin Harkins
[Sorry, that last message was sent by accident. I set my phone to require confirmation so it won't happen again.] 2012/3/7 Torsten Förtsch : > 2) the way child_terminate() exits is quite nasty because it simply calls > exit() at C level. That means neither END blocks nor PerlChildExitHandlers are

Re: Terminating Child process Dynamically

2012-03-07 Thread Perrin Harkins
- Perrin On Mar 7, 2012 7:00 AM, "Torsten Förtsch" wrote: > On Friday, 02 March 2012 13:49:34 Perrin Harkins wrote: > > You can use $r-->child_terminate(). > > 2 remarks: > > 1) you can use this method at any point in the request cycle. It marks the > proc

Re: Tool to create multiple requests

2012-03-04 Thread Perrin Harkins
Thanks for the explanation. > A large system with upwards of 250 databases (on a relatively small > number of database machines) as part of the system, these are used by up > to a half a dozen web machines which can be forced up to a limit of 50 > children per machine... We regularly broke the con

Re: Tool to create multiple requests

2012-03-02 Thread Perrin Harkins
On Tue, Feb 7, 2012 at 5:18 AM, James Smith wrote: > Apache::DBI sometimes cause issues with too many database connections - we > tend to turn it off and use DBIx::Connector as mentioned (and carefully > selected caching) here to cope with persistence of connections Can you say more about this?

Re: Tool to create multiple requests

2012-03-02 Thread Perrin Harkins
On Tue, Feb 7, 2012 at 2:05 AM, Tobias Wagener wrote: > Now I want to ask if someone knows a tool or perl modules, where I can > simulate > 50 users. http://www.hpl.hp.com/research/linux/httperf/ It can take a file of URLs to hit in order and it can do MUCH more than 50 users even on cheap hard

  1   2   3   4   5   6   7   8   9   10   >