I have to maintain a prehistoric website with tons of Perl code. After switching to a new server, everything turned out fuzzy:
When several requests of the same client are working on the page (generating images using GD), these scripts rewrite each other's variables, which leads to strange results.
As a quick workaround, I set MaxRequestsPerChild = 1 in Apache, which fixes this, but now everything slows down to a workaround ...
Is there a way to separate requests? Any mod_perl or Apache options that could help me?
Apache:
Server version: Apache/2.2.15 (Unix) Server built: Apr 3 2014 23:56:16 Server Module Magic Number: 20051115:25 Server loaded: APR 1.3.9, APR-Util 1.3.9 Compiled using: APR 1.3.9, APR-Util 1.3.9 Architecture: 64-bit Server MPM: Prefork threaded: no forked: yes (variable process count)
perl -v
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
Any solution for this would be very helpful :)
EDIT: I could not find the correct way to fix things with mod_perl, but the following workaround works:
- Disable mod_perl
- Enable mod_cgi
- AddHandler cgi- script.pl
- Disable suEXEC
The latter was necessary because it gave me a "premature end to script headers" when suEXEC was enabled.
source share