Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP

Peculiar $Application problem

 

 

ModPerl asp RSS feed   Index | Next | Previous | View Threaded


tchatzi at arx

Aug 6, 2008, 1:05 PM

Post #1 of 2 (3871 views)
Permalink
Peculiar $Application problem

Hi list,

I have a rather strange issue:
I came across a 102 MB $Application object, which contains several
little key => arrayref_value elements.
The keys are usually HTTP_USER_AGENTs and the values 2 fairly short strings.
I'm using MLDBM::Sync::SDBM_File.
Curiously, scalar(keys(%{$Application})) returns just 4 elements and
indeed iterating over keys returns only 4.
Problem is, when running from the command line on a plain copy, it
correctly returns both the number of elements and their keys/values.
Any idea what might be wrong ?


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


tchatzi at arx

Aug 19, 2008, 4:16 AM

Post #2 of 2 (3489 views)
Permalink
Re: Peculiar $Application problem [In reply to]

O/H Joshua Chamas έγραψε:
> Thanos Chatziathanassiou wrote:
>> Hi list,
>>
>> I have a rather strange issue:
>> I came across a 102 MB $Application object, which contains several
>> little key => arrayref_value elements.
>> The keys are usually HTTP_USER_AGENTs and the values 2 fairly short
>> strings.
>> I'm using MLDBM::Sync::SDBM_File.
>> Curiously, scalar(keys(%{$Application})) returns just 4 elements and
>> indeed iterating over keys returns only 4.
>> Problem is, when running from the command line on a plain copy, it
>> correctly returns both the number of elements and their keys/values.
>> Any idea what might be wrong ?
>
> Hi Thanos,
>
> From time to time I have found SDBM_File to do odd unreproducible things.
> If you suspect this is true you might run with a different DBM like
> DB_File.
>
> Regards,
>
> Josh
The thing that strikes me is that asking for a particular key works as
expected.
Can I port the stored keys with

tie %A, "SDBM_File", "application", O_RDONLY, 0660;
tie %B, "DB_File", "new/application", O_CREAT|O_RDWR, 0660, $DB_HASH ;
%B = %A;
untie %A;
untie %B;

and restart apache ?

Also, GDBM_File looks a little faster than DB_File. Would I want to use
that instead ?


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl

ModPerl asp RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.