[Resolved] lsphp: failed to map segment from shared object: Cannot allocate memory

Discussion in 'Install/Configuration' started by gboudreau, Nov 16, 2010.

  1. NiteWave

    NiteWave Administrator

    ok. please PM the access info.
  2. gboudreau

    gboudreau Member

    Will do as soon as my server comes back; provider is having power issues in their data center.

    *edit: infos sent.
    Last edited: Nov 17, 2010
  3. mistwang

    mistwang LiteSpeed Staff

    Run command "ulimit -a" from a PHP script, the memory limit might be lowered in php.ini .
  4. gboudreau

    gboudreau Member

    From a .php script, run through LSWS:
    Code:
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 11896
    max locked memory       (kbytes, -l) 32
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 2048
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) 10240
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 100
    virtual memory          (kbytes, -v) 102400
    file locks                      (-x) unlimited
    The same script, run through Apache:
    Code:
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 11896
    max locked memory       (kbytes, -l) 32
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) 10240
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) unlimited
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    Could the problem come from "virtual memory (kbytes, -v) 102400" ?
  5. mistwang

    mistwang LiteSpeed Staff

    The memory limit was set to 100MB some where.
    check php.ini memory_limit, and lsphp5 memory limit configuration.
  6. gboudreau

    gboudreau Member

    Got it!
    I grep-ed for 100M in lsws/conf/* and found it in Default.xml (and some other virtualhosts config files).
    I removed the virtualhost-specific external apps and PHP script handlers (not sure why I had them!) That fixed the issue!
    Thanks for the help.
  7. ellyka112

    ellyka112 New Member

    From phpinfo: memory_limit 768M (same as php.ini)
    Same php.ini file on both servers.

    No opcode cache enabled.

    I tried to remove the 'shared' from my configure command. It didn't help.
    Now I'm trying the default configure line that LSWS suggests.
  8. subhuti

    subhuti New Member

    Hello,
    have the same issue with imagik php module


    Code:
     file ./lib/php/extensions/no-debug-non-zts-20090626/imagick.so
    ./lib/php/extensions/no-debug-non-zts-20090626/imagick.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), not stripped
    

    Code:
    # file lsphp-5.3.1
    lsphp-5.3.1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped

    and 64 bit system

    Memory Soft/Hard Limit 250/300

    mem limit in php.ini 64m

    ulimit output from php script
    max memory size (kbytes, -m) unlimited
    virtual memory (kbytes, -v) 204800
  9. webizen

    webizen New Member

    try

    PHP.ini: memory_limit=256MB
    LSPHP5 External App: Memory Soft/Hard Limit 850MB/900MB

Share This Page