Why does Apache complain that CGI.pm panicked at line 4001 due to a memory wrapper?

This log error is caused by a 5 year old Perl script that just grabs data from MySQL via a simple SQL selection and displays it.

It runs on my dev machine, which is an MBP with 8 GB of RAM working with Apache stock.

From time to time, once or twice a month, I get the following error for no apparent reason:

panic: memory wrapper in / System / Library / Perl / 5.10.0 / CGI.pm line 4001.

Apache refuses to run the script again, and only restarting the OS will cause Apache to soften. OS says that there is 3 GB of free memory when this happens, so this is not a low memory problem. Fortunately, this does not happen on the Debian 5 server.

What is a memory wrapper? And what causes it?

+4
source share
3 answers

I, too, fell into this error in several different circumstances. PerlMonks, as always, just saved me days of work:

http://www.perlmonks.org/?node_id=823389

the problem is how osx links are linked to other resources. a simple dream will give time for closing and open. restart or grace conflict.

apachectl stop sleep 2 apachectl start 
+2
source

It is already late, but perl distributed by MacPorts does not have this problem if this is an option.

+1
source

mu is a too short answer, which, unfortunately, is posted as a comment.

perldiag says that "panic: memory wrap" means "something was trying to allocate more memory than possible." A little search query suggests that this is not a CGI.pm problem, but a random problem with Perl 5.10 and OSX.

0
source

Source: https://habr.com/ru/post/1334458/


All Articles