503 Errors - APC with cPanel matched PHP binary

mistwang

LiteSpeed Staff
#22
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.
 
#25
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
 

mistwang

LiteSpeed Staff
#26
looks like need extra step to enable core dump for suid processes

enable core dump for SUID programs: echo 1 > /proc/sys/kernel/suid_dumpable
Edit the /etc/sysctl.conf and add the following:
kernel.suid_dumpable = 1
kernel.core_uses_pid = 1
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.
 
#28
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.
 

pguy

Active Member
#29
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?
 

mistwang

LiteSpeed Staff
#30
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

LSAPI_ALLOW_CORE_DUMP

in the lsphp5 external application configuration.
 
Top