This is a long-shot/stabbing-in-the-dark post -- and I'm guessing this
might not have anything to do with DateTime.

Anyone have any suggestions what might be happening here?


I have this code running in a Catalyst app running under mod_perl:

try {
    $c->stash->{timezone} = DateTime::TimeZone->new( name => $time_zone );
} catch {
    $c->log->error( "Timezone '$time_zone' is invalid for account $account:
$_" );
};


And I'm seeing this in the logs:

[ERROR] "Timezone 'America/Los_Angeles' is invalid for account 77368: *Invalid
version format (non-numeric data)* at
/usr/share/perl5/vendor_perl/DateTime/TimeZone/America/Los_Angeles.pm line
17.
BEGIN failed--compilation aborted at
/usr/share/perl5/vendor_perl/DateTime/TimeZone/America/Los_Angeles.pm line
17.
Compilation failed in require at (eval 7248) line 3.


Compiles fine:

$ perl -c
/usr/share/perl5/vendor_perl/DateTime/TimeZone/America/Los_Angeles.pm
/usr/share/perl5/vendor_perl/DateTime/TimeZone/America/Los_Angeles.pm
syntax OK



On the same machine with same Perl:

$ perl -le 'use DateTime; my $tz = DateTime::TimeZone->new( name =>
"America/Los_Angeles" ); print $tz->name'
America/Los_Angeles



The app seems to run fine for quite some time, then it starts logging the
error above -- and oddly, it seems to be mostly the same process ID that
generates the errors.   There's 30 Apache processes.

That is, I include the PID in the logs so I can do this:

$ fgrep -r Angeles error_log-20140106 | perl -nle 'print $1 if /pid:(\d+)/'
| sort | uniq -c
     21 31535
      6 32763


So, out of 30 Apache processes the errors are happing on only two PIDs and
mostly on one.

Here's line 17.

$ sed -n 17p
/usr/share/perl5/vendor_perl/DateTime/TimeZone/America/Los_Angeles.pm
use Class::Singleton 1.03;

$ perl -c /usr/share/perl5/Class/Singleton.pm
/usr/share/perl5/Class/Singleton.pm syntax OK




On an older CentOS machine:

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

$ perl -MDateTime::TimeZone::America::Los_Angeles -le 'print
DateTime::TimeZone::America::Los_Angeles->VERSION'
1.46

$ perl -MClass::Singleton -le 'print Class::Singleton->VERSION'
1.4

-- 
Bill Moseley
mose...@hank.org

Reply via email to