Ubuntu 16.04 apache2: Loading perl modules yields "failed to map segment from shared object at "

خرید بک لینک

I recently upgraded my desktop to 64 bit Ubuntu 16.04.

I have an apache server running mod_perl that loads a variety of perl modules for my site algebra.com.

That works great in production and easily handles 80+ requests per SECOND. However, on this new server I run into some issues and after a short while, loading perl modules fails randomly like that:

[Sun Jun 05 20:51:19.006523 2016] [perl:error] [pid 15308:tid 140490770925312] [client 127.0.0.1:56594] failed to resolve handler `Algebra::Questions::Handler': Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.22/auto/Sub/Identify/Identify.so' for module Sub::Identify: /usr/lib/x86_64-linux-gnu/perl5/5.22/auto/Sub/Identify/Identify.so: failed to map segment from shared object at /usr/share/perl/5.22/XSLoader.pm line 70.n
[Sun Jun 05 20:51:20.859818 2016] [perl:error] [pid 22282:tid 140490812888832] [client 127.0.0.1:56600] failed to resolve handler `Algebra::Questions::Handler': Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.22/auto/Sub/Identify/Identify.so' for module Sub::Identify: /usr/lib/x86_64-linux-gnu/perl5/5.22/auto/Sub/Identify/Identify.so: failed to map segment from shared object at /usr/share/perl/5.22/XSLoader.pm line 70.n

I have a feeling that it could be a resource issue like ulimit or some such. To debug this, I print ulimit from inside apache, so that I can know what limits it has:

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63663
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 8192
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) 80
max user processes              (-u) 63663
virtual memory          (kbytes, -v) 2048000
file locks                      (-x) unlimited

One thing that jumped at me was the "virtual memory" limit of 2048000 kilobytes. On a 64 bit server, it is not much. I tried, to no avail, find out just where that limit is set and could not find it.

Ulimit from a regular x terminal shows "virtual memory (kbytes, -v) unlimited". So, it is somehow set for apache.

In addition, apache server processes exit with "out of memory" errors, which I think is from the same set of issues.

Any idea?

Why could a process "fail to map segment from shared object" for any other reasons?

When Apache starts, it works fine, but very quickly deteriorates and starts giving me "failed to load" errors.

A very similar issue is discussed for some PHP project on github: https://github.com/ShyykoSerhiy/gfm-plugin/issues/110

I investigated this further. Ulimits on my production server are similar. However, size of the running executables in virtual memory, is a lot smaller on production servers, like 600 megs each. Whereas here some of the apaches reach close to 2 gigs.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 266 تاريخ: دوشنبه 17 خرداد 1395 ساعت: 9:53

صفحه بندی