Re: Apache::DBI - Can two different connection handles have the same reference/address at different times?

2007-05-07 Thread Jonathan Vanasco
On May 7, 2007, at 10:40 PM, Foo JH wrote: My suspicion is that when you do a disconnect, the connection is actually not released. That's the idea of connection pooling isn't it? You can confirm this by checking the number of connections stated on your sql server after a call. Apache::DB

Re: adding new cpan module to mod_perl / apache installation..

2007-05-07 Thread Perrin Harkins
On 5/7/07, Mark Henry <[EMAIL PROTECTED]> wrote: (The 'searchable' archives link has no search option that I could find http://mail-archives.apache.org/mod_mbox/perl-modperl/) This one has a good search engine: http://marc.theaimsgroup.com/?l=apache-modperl&r=1&w=2#apache-modperl Sounds great

Re: Apache::DBI - Can two different connection handles have the same reference/address at different times?

2007-05-07 Thread Foo JH
My suspicion is that when you do a disconnect, the connection is actually not released. That's the idea of connection pooling isn't it? You can confirm this by checking the number of connections stated on your sql server after a call. Lionel MARTIN wrote: Hello, As you know, use Apache::

adding new cpan module to mod_perl / apache installation..

2007-05-07 Thread Mark Henry
Hi All, First - noob alert - I've searched all avenues that I know of, but I'm not positive how to frame my question (being an apache/mod_perl virgin), so its possible there are still some trees un-barked up. (The 'searchable' archives link has no search option that I could find http://mail-arch

Re: few newbie quesitons..

2007-05-07 Thread Perrin Harkins
On 5/7/07, James. L <[EMAIL PROTECTED]> wrote: do you mean parsing the file during each iteration and get the next availabe result then return it to TT? Yes. Open the file and then read it line-by-line as the iterator requests it. Look at the docs for Template::Iterator. - Perrin

Re: few newbie quesitons..

2007-05-07 Thread James. L
--- Perrin Harkins <[EMAIL PROTECTED]> wrote: > > sub parse { > > my ($class,$file) = @_; > > my @data; > > open my $F, $file or die $!; > > while ( my $line = <$F> ) { > > my @fields = split /=/, $line; > > push @data, [EMAIL PROTECTED]; > > } > > close $F; > > return [EMAI

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/7/07, Carl Johnstone <[EMAIL PROTECTED]> wrote: You can use shared memory between apache processes. Check: *Apache::SharedMem* *Tie::ShareLite*

Re: Global question

2007-05-07 Thread Carl Johnstone
You can use shared memory between apache processes. Check: *Apache::SharedMem* *Tie::ShareLite* *Cache::SharedMemoryCache*

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/7/07, Will Fould <[EMAIL PROTECTED]> wrote: C/Would anyone recommend any of the IPC::*** shared memory packages for what I'm doing? No, they have terrible performance for any significant amount of data. Much worse than a simple shared file approach. If you can break up your data into a ha

Re: Global question

2007-05-07 Thread Will Fould
simpler by checking last mod time on a shared file Good idea. C/Would anyone recommend any of the IPC::*** shared memory packages for what I'm doing? On 5/7/07, Perrin Harkins <[EMAIL PROTECTED]> wrote: On 5/7/07, Will Fould <[EMAIL PROTECTED]> wrote: > Can apache processes meaningfully acce

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/7/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: I thought the same as you , until that lighttpd posting ( March 2006 ).But according to Jan , who was at MySQL at the time , MySQL only had a synchronous API. An async was on a todo list, but selects were blocking on the whole server.

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/7/07, Will Fould <[EMAIL PROTECTED]> wrote: Can apache processes meaningfully access any external ( i.e. shell, other) structures? It's the same as any other process, i.e. the usual IPC methods are available. If you want to update the whole data structure at once, I think what you're doin

Re: Global question

2007-05-07 Thread Jonathan Vanasco
On May 7, 2007, at 2:01 PM, Perrin Harkins wrote: It does when you shut down the BDB "environment", but there's no reason to do that unless your processes are exiting. ah, that makes sense. so long as one process has bdb running, its there's a shared bdb memory section. Blocking? You me

Re: Global question

2007-05-07 Thread Will Fould
Thanks guys. (I'm sure Perrin is tired of answering these same old question in all of it's forms.) The lists are functionally similar to Unix security lists (group id=name, etc). With thousands of users, these key lists are getting larger and the time to re-build them will continue to grow but

Re: Apache::DBI - Can two different connection handles have the same reference/address at different times?

2007-05-07 Thread Michael Peters
Lionel MARTIN wrote: > This would save me the need to prepare at every request, while I could > benefit from old prepared statements. Just use prepare_cached() -- Michael Peters Developer Plus Three, LP

Apache::DBI - Can two different connection handles have the same reference/address at different times?

2007-05-07 Thread Lionel MARTIN
Hello, As you know, use Apache::DBI; DBI->connect() returns a db/connection handle. I am wondering if it is possible, at different times during the server life, that Apache::DBI returns twice the same memory reference, while the connection is in fact physically not the same. The reason f

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/7/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: that's interesting. since its not persistant, i figured it just released everything once you closed the file. It does when you shut down the BDB "environment", but there's no reason to do that unless your processes are exiting. if you've

Re: Global question

2007-05-07 Thread Jonathan Vanasco
On May 7, 2007, at 1:12 PM, Perrin Harkins wrote: I didn't know that BDB does shared memory caching. And no socket overhead too. All the calls are in-process. that's interesting. since its not persistant, i figured it just released everything once you closed the file. > Primary key lo

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/7/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: Ah, I reread the post. I saw "large lists" and thought "complex data structure", not simple text. I think we were talking about different things, actually. For reading and writing a large and complex data structure in its entirety, a Stor

Re: Global question

2007-05-07 Thread Jonathan Vanasco
On May 7, 2007, at 11:59 AM, Perrin Harkins wrote: Storable is fast, but not using it is considerably faster. There's no need to use it for storing simple strings. BerkeleyDB does shared memory caching, so commonly accessed data doesn't need to go to disk. Ah, I reread the post. I saw "lar

Re: Apache::DProf - can tmon.out files be merged?

2007-05-07 Thread Perrin Harkins
On 5/7/07, John ORourke <[EMAIL PROTECTED]> wrote: I need to run it on a production server and can't keep the no. of children at 1, so does anyone know if the tmon.out files from all the apache children can be merged somehow? You can just analyze the output from any one of the child processes.

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/7/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: IIRC, Wouldn't the fastest method possible be using Storable and a simple local file on the server ? Building a perl var from a storable has almost no overhead. Storable is fast, but not using it is considerably faster. There's no

Re: Global question

2007-05-07 Thread Jonathan Vanasco
On May 7, 2007, at 11:26 AM, Perrin Harkins wrote: Of course, the problem with using a database to get the lists (besides the lists being the result of a munge), is that they are rather large. Ideally you would load only the part you need, rather than the whole thing. A local shared stora

Apache::DProf - can tmon.out files be merged?

2007-05-07 Thread John ORourke
Hi folks, I just discovered Frank's article on debugging mod_perl... man have I been coding in the dark ages! I need to run it on a production server and can't keep the no. of children at 1, so does anyone know if the tmon.out files from all the apache children can be merged somehow? It lo

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/5/07, Will Fould <[EMAIL PROTECTED]> wrote: But, I'd like to do something similar; have a separate process that can alter parent data receive signals and re-cache accordingly. There's no way to alter data in the parent process without restarting the server. Of course, the problem with us

Re: Global question

2007-05-07 Thread Perrin Harkins
On 5/7/07, Adam Prime x443 <[EMAIL PROTECTED]> wrote: If they change really rarely couldln't you just have the children automatically die off when the stuff needs to change and reload it? You'd have to create the datastructure using a ChildInit handler i assume, but couldn't a setup like that pot

RE: Global question

2007-05-07 Thread Adam Prime x443
If they change really rarely couldln't you just have the children automatically die off when the stuff needs to change and reload it? You'd have to create the datastructure using a ChildInit handler i assume, but couldn't a setup like that potentially work? Adam -Original Message- From