503 Errors - APC with cPanel matched PHP binary

Discussion in 'PHP' started by ziggy95, Feb 18, 2009.

  1. ziggy95

    ziggy95 Member

    Ok, tried that, but I can't find the core dump file. Where would it be?
  2. mistwang

    mistwang LiteSpeed Staff

    should be under the directory where PHP script located.
    To get a core dump, you need to check and enable core dump with

    ulimit -c

    if it return 0, core dump is disabled.

    ulimit -c 100000

    will enable it. then need to stop then start LSWS.
  3. ziggy95

    ziggy95 Member

    I still have not been able to generate a core dump. What would the file be named?
  4. mistwang

    mistwang LiteSpeed Staff

    Please run "ulimit -a" from a php script to make sure that core file size limit is not 0.
  5. ziggy95

    ziggy95 Member

    Yes, I had checked that:

    core file size (blocks, -c) 1000000
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 68608
    max locked memory (kbytes, -l) 32
    max memory size (kbytes, -m) unlimited
    open files (-n) 4096
    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) unlimited
    max user processes (-u) 14335
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited
  6. mistwang

    mistwang LiteSpeed Staff

    looks like need extra step to enable core dump for suid processes

    the core file should be created under the same directory where the php script is. strace should tell you whether a core dump file has been created or not.
  7. pguy

    pguy Active Member

    I am having the same issues, was this sorted out? Thanks
  8. xenxor

    xenxor New Member

    i can reproduce this behaviour under 4.0.1 Std under Freebsd 6.3 x86 even without CPanel as long as APC is enabled.

    When the Server-Level PHP LSAPI handler (with APC enabled) is triggered to run a php script, it produces 503 error code. However, that same PHP LSAPI binary (with APC enabled) running as a VHost-Level handler works fine. So we just make sure we run PHP LSAPI as a vhost-level handler.
  9. pguy

    pguy Active Member

    We use cpanel + litespeed + apc , so the config is actually the httpd.conf of apache. Is there a way to configure it then to avoid the 503s?
  10. mistwang

    mistwang LiteSpeed Staff

    It might be a bug in APC, let PHP dump a core file, and check the core file with GDB, if need, submit a bug report to PHP.

    To let lsphp dump a core file, you also need to set environment variable


    in the lsphp5 external application configuration.
  11. ziggy95

    ziggy95 Member

    Worked for me

    Try recompiling PHP in cPanel without zend and/or ioncube encoder.

Share This Page