You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Daniel Lang <da...@biologie.uni-freiburg.de> on 2004/01/13 15:27:51 UTC
modperl GD problem
Hi,
I´m using a GD-based Module (Bio::Graphics) to generate png-graphics on
the fly with a Modperl Content Handler.
Now I encounter the following problem:
The first request(after httpd restart), is served well, and the
generated graphic is in color - every other request after that produces
black/white grafics. Everything is OK with the other content, only the
color information of the graphic seems to be lost?
When I use the same routine in a cgi or shell enviroment everything
works fine...
I´m using the following enviroment:
(1Ghz dual processor machine, 1GB RAM)(Apache/1.3.27
(Unix)(Red-Hat/Linux 7.3) Embperl/2.0b5 mod_perl/1.26) (All the modules
are preloaded in a startup script)
Thanks in advance,
Daniel
--
Daniel Lang
University of Freiburg, Plant Biotechnology
Sonnenstr. 5, D-79104 Freiburg
phone: +49 761 203 6988
homepage: http://www.plant-biotech.net/
e-mail: daniel.lang@biologie.uni-freiburg.de
#################################################
>REALITY.SYS corrupted: Reboot universe? (Y/N/A)
#################################################
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: modperl GD problem
Posted by Thomas Klausner <do...@zsi.at>.
Hi!
On Tue, Jan 13, 2004 at 03:27:51PM +0100, Daniel Lang wrote:
> I?m using a GD-based Module (Bio::Graphics) to generate png-graphics on
> the fly with a Modperl Content Handler.
> Now I encounter the following problem:
> The first request(after httpd restart), is served well, and the
> generated graphic is in color - every other request after that produces
> black/white grafics. Everything is OK with the other content, only the
> color information of the graphic seems to be lost?
> When I use the same routine in a cgi or shell enviroment everything
> works fine...
sounds like this to me:
http://perl.apache.org/docs/1.0/guide/porting.html#Sometimes_it_Works__Sometimes_it_Doesn_t
Maybe GD is messing something up, but I'm rarely using it so I cannot say
anything about it.
--
#!/usr/bin/perl http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: modperl GD problem
Posted by Gerald Richter <ri...@ecos.de>.
>
> Another interesting;) thing happened when I changed the line for the
> Bio::Graphics module in my startup.pl, from "use Bio::Graphics ();" to
> "use Bio::Graphics;" - the first images was colored and then in each
> following request the color faded! (green - light green - blue green
> - black)
>
So try to put a
use Bio::Graphics;
at the top of your Embperl page that uses the module, because otherwise
symbols are not imported
Gerald
>>
>> Can you try to set MaxRequestsPerChild to 1 in your httpd.conf?
>>
>> Do you get the same result? If yes, you have to search what in your
>> code might persist accross requests.
>>
>>
>>> I´m using the following enviroment:
>>> (1Ghz dual processor machine, 1GB RAM)(Apache/1.3.27
>>> (Unix)(Red-Hat/Linux 7.3) Embperl/2.0b5 mod_perl/1.26) (All the
>>> modules are preloaded in a startup script)
>>>
>>
>>
>> Mmmh, Embperl 2.0b5 is quite old (and buggy). Please upgrade at
>> least to
>> 2.0b9.
> Uhmm, Ok! Could it interfere with my handlers?
>>
>> You could also try to updrade you libgd and/or the GD Perl module.
> It should be quite new: libgd.so.2.0.0 && GD-2.11.
--------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
--------------------------------------------------------------
|
| ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: modperl GD problem
Posted by Daniel Lang <da...@biologie.uni-freiburg.de>.
Hi,
Thanks for the answers...
Gerald Richter wrote:
> I guess there are a value that stay persitent,which makes trouble on the
> second request.
That´s what I´m thinking too, but I think I´ checked for globals
variables and so on in my code - all variables involved should be local
(subroutine) scope...but since I´m relatively new to modperl...
I don´t know if it makes sence to paste the hole code to the list, but I
would be glad if someone would have a look at it:)
If anyone´s interested, I could send the code directly...
I have another idea what might be going on but I don´t know how to
address it: The data for the images has to be parsed and can grow fairly
big...since the images are produced during this process - is it possible
that the httpd processes are memory restricted or something like that?
Another interesting;) thing happened when I changed the line for the
Bio::Graphics module in my startup.pl, from "use Bio::Graphics ();" to
"use Bio::Graphics;" - the first images was colored and then in each
following request the color faded! (green - light green - blue green -
black)
>
> Can you try to set MaxRequestsPerChild to 1 in your httpd.conf?
>
> Do you get the same result? If yes, you have to search what in your code
> might persist accross requests.
>
>
>>I´m using the following enviroment:
>>(1Ghz dual processor machine, 1GB RAM)(Apache/1.3.27
>>(Unix)(Red-Hat/Linux 7.3) Embperl/2.0b5 mod_perl/1.26) (All the
>>modules are preloaded in a startup script)
>>
>
>
> Mmmh, Embperl 2.0b5 is quite old (and buggy). Please upgrade at least to
> 2.0b9.
Uhmm, Ok! Could it interfere with my handlers?
>
> You could also try to updrade you libgd and/or the GD Perl module.
It should be quite new: libgd.so.2.0.0 && GD-2.11.
--
Daniel Lang
University of Freiburg, Plant Biotechnology
Sonnenstr. 5, D-79104 Freiburg
phone: +49 761 203 6988
homepage: http://www.plant-biotech.net/
e-mail: daniel.lang@biologie.uni-freiburg.de
#################################################
>REALITY.SYS corrupted: Reboot universe? (Y/N/A)
#################################################
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: modperl GD problem
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
Daniel Lang wrote:
> Hi,
> I´m using a GD-based Module (Bio::Graphics) to generate png-graphics
> on the fly with a Modperl Content Handler.
> Now I encounter the following problem:
> The first request(after httpd restart), is served well, and the
> generated graphic is in color - every other request after that
> produces black/white grafics. Everything is OK with the other
> content, only the color information of the graphic seems to be lost?
> When I use the same routine in a cgi or shell enviroment everything
> works fine...
>
I guess there are a value that stay persitent,which makes trouble on the
second request.
Can you try to set MaxRequestsPerChild to 1 in your httpd.conf?
Do you get the same result? If yes, you have to search what in your code
might persist accross requests.
> I´m using the following enviroment:
> (1Ghz dual processor machine, 1GB RAM)(Apache/1.3.27
> (Unix)(Red-Hat/Linux 7.3) Embperl/2.0b5 mod_perl/1.26) (All the
> modules are preloaded in a startup script)
>
Mmmh, Embperl 2.0b5 is quite old (and buggy). Please upgrade at least to
2.0b9.
You could also try to updrade you libgd and/or the GD Perl module.
Gerald
--------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
--------------------------------------------------------------
|
| ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html