On Mon, Apr 13, 2009 at 10:12:27PM -0400, Perrin Harkins wrote:
> 
> In your Image.pm module, do you declare a package name?  Do you export
> get_image_name()?  How do you load this module in your new Mason
> setup?
> 
The entire Example/Image.pm:

----------8<---------->8----------

package Example::Image;

use Image::ExifTool;
use vars qw( %dirs %urls );

sub get_image_data ($;$$) {
  my $image_name = $_[0];
  my $image_src = $_[1] ? $_[1] : $urls{'img'};
  my $image_dir = $_[2] ? $_[2] : $dirs{'img'};
  my %image_data;
  $image_data{'src'} = $image_src . $image_name;
  my $info = Image::ExifTool::ImageInfo($image_dir . $image_name);
  $image_data{'comment'} = $$info{'Comment'};
  $image_data{'width'} = $$info{'ImageWidth'};
  $image_data{'height'} = $$info{'ImageHeight'};
  return %image_data;
}

1;

----------8<---------->8----------

The module is loaded with a 'PerlModule Example::Image' directive.  I
have also tried without the PerlModule directive and with 'use' in the
global.asa (for Apache::ASP) and the main component (for HTML::Mason).

> > This has really been causing me to wrack my brain since
> > it only occurs on the production server and not on the development
> > server (both are identically configured).
> 
> Are they really identically configured?  Are you sure there isn't a
> difference in startup.pl or in MaxRequestsPerChild or something like
> that?
> 
I have no startup.pl and the MaxRequestsPerChild setting is identical
for both servers.

The only differences that I found were mod_include and mod_disk_cache
were enabled on the development server, but not on the production
server.  I have enabled them in production to see if that makes a
difference.  For the moment, the 500 errors have seemingly disappeared.
However, they have on occasion disappeared only to return after a day or
so.

But for now it appears to be OK for a few tens of thousands of requests.

Regards,

-Roberto

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com

Attachment: signature.asc
Description: Digital signature

Reply via email to