Loading ...
Sorry, an error occurred while loading the content.

Peculiar $Application problem

Expand Messages
  • Thanos Chatziathanassiou
    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
    Message 1 of 2 , Aug 6, 2008
    • 0 Attachment
      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@...
      For additional commands, e-mail: asp-help@...
    • Thanos Chatziathanassiou
      ... 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 ,
      Message 2 of 2 , Aug 19, 2008
      • 0 Attachment
        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@...
        For additional commands, e-mail: asp-help@...
      Your message has been successfully submitted and would be delivered to recipients shortly.