Some configuration help and a few questions

Discussion in 'General' started by alex, Dec 10, 2006.

  1. alex

    alex New Member

    I am installing Litespeed on a new server. I decided to try v3 beta as the new server is 64 bit OS.
    Very easy install! Went well
    I have read that it already contains opcode cache but I don't see anything in phpinfo.php that shows it running. This can be seen here:
    http://198.65.115.221/phpinfo.php

    I did attempt to install PHP 5.2.0 but ended up with blank pages. I am using an old version of VB though and think that may be the problem. I will try that again after upgrading VB.

    I may have messed up a setting for apc when I did that. I am getting this in the error log:
    [10.1.1.1:4323-0#_AdminVHost] [STDERR] PHP Warning: Unknown(): Unable to load dynamic library './apc.so' - ./apc.so: cannot open shared object file: No such file or directory in Unknown on line 0

    I have checked php.ini and no mention of apc.so so I can't figure out where it is calling it from

    I have copied most of the configuration settings from the old, much less powerful server and wondered if I should change anything. Here are the current settings for my main forum:

    Name
    phpLsapi
    uds://tmp/lshttpd/lsphp.sock
    Address

    Notes
    Max Connections number valid range: 1 - 2000
    100

    Environment
    PHP_LSAPI_MAX_REQUESTS=500
    PHP_LSAPI_CHILDREN=100
    Initial Request Timeout (secs) number >= 1
    180
    Retry Timeout (secs) number >= 0
    0
    Persistent Connection No
    Connection Keepalive Timeout number valid range: -1 - 10000
    100
    Response Bufferring No Yes No for Non-Parsed-Header (NPH)
    Auto Start Not Set
    Command
    Back Log number valid range: 1 - 100
    100

    Instances number valid range: 0 - 1000
    1000
    Run On Start Up Not Set
    Max Idle Time number >= -1

    Priority number valid range: -20 - 20

    Memory Soft Limit (bytes) number >= 0

    Memory Hard Limit (bytes) number >= 0

    Process Soft Limit number >= 0

    Process Hard Limit number >= 0

    The server settings are here:

    Name
    Address
    Notes
    Max Connections number valid range: 1 - 2000
    20
    Environment
    PHP_LSAPI_MAX_REQUESTS=500
    Initial Request Timeout (secs) number >= 1
    60
    Retry Timeout (secs) number >= 0
    0
    Persistent Connection Yes No Not Set
    Connection Keepalive Timeout number valid range: -1 - 10000

    Response Bufferring No
    Auto Start Yes Command
    $SERVER_ROOT/fcgi-bin/lsphp
    Back Log number valid range: 1 - 100
    100
    Instances number valid range: 0 - 1000
    20
    Run On Start Up Not Set
    Max Idle Time number >= -1

    Priority number valid range: -20 - 20
    0
    Memory Soft Limit (bytes) number >= 0
    80M
    Memory Hard Limit (bytes) number >= 0
    100M
    Process Soft Limit number >= 0
    220
    Process Hard Limit number >= 0
    220

    Server tuning settings are here:

    Max Connections 2000
    Max SSL Connections 200
    Connection Timeout (secs) 300
    Max Keep-Alive Requests 1000
    Smart Keep-Alive No
    Keep-Alive Timeout (secs) 5
    Send Buffer Size (bytes) 0
    Receive Buffer Size (bytes) 0
    I/O Event Dispatcher poll (All platforms)
    Max Cached Small File Size (bytes) 4096
    Total Small File Cache Size (bytes) 20M
    Max MMAP File Size (bytes) 256K
    Total MMAP Cache Size (bytes) 40M
    Use sendfile() Not Set
    SSL Hardware Accelerator (built-in) OpenSSL internal engine

    Request/Response Edit

    Max Request URL Length (bytes) 4096
    Max Request Header Size (bytes) 8192
    Max Request Body Size (bytes) 10M
    Max Dynamic Response Header Size (bytes) 4K
    Max Dynamic Response Body Size (bytes) 1M

    GZIP Compression Edit

    Enable Compression Yes
    Enable Dynamic Compression Yes
    Compression Level (Dynamic Content) 6
    Compressible Types text/html
    Auto Update Static Yes
    Compression Level (Static File) 6
    Max Static File Size (bytes) 1M
    Min Static File Size (bytes) 300



    Thank you for any help!
  2. mistwang

    mistwang LiteSpeed Staff

    Alex,

    Better stay with PHP 4 if PHP5 is not really required. PHP4 is faster.
    What you need is to setup a opcode cache like APC.
    APC binary for php 4.4.4 is available under lsws/lib/ directory.
    You can modify the php.ini showed in the phpinfo page to load the APC extension.

    The APC related error message probably is what happened before installing those Zend extensions. Not important.
  3. xing

    xing LiteSpeed Staff

    alex, please follow our APC/Opcode caching article/how-to in our wiki. The link to wiki is at the very top of this page.
  4. alex

    alex New Member

    I decided I didn't want to start a new server up with existing problems so I removed everything, lsws, zend optimizer etc, got rid of all php.ini's etc
    I did a routine lsws install, setting the optimizer option to install apc.
    I then ran the zend optimizer install.
    I am again seeing the same error in the log although the IP and and port seem to have changed

    [10.1.1.2.1292-0#_AdminVHost] [STDERR] PHP Warning: Unknown(): Unable to load dynamic library './apc.so' - ./apc.so: cannot open shared object file: No such file or directory in Unknown on line 0

    The good news is APC is working as shown here:

    http://198.65.115.221/phpinfo.php

    So i guess we are good for now. Something about the zend optimzer install seems to be causing it but I need that for our ratings site

    Do all the rest of the settings I copied in above look good?
  5. alex

    alex New Member

    I am getting the occasional page that is basically a white page with just a
    >
    on it
    The log is showing:

    2006-12-11 23:05:51.538 [DEBUG] [phpLsapi] add child process pid: 20322
    2006-12-11 23:05:51.538 [DEBUG] [75.67.78.33:4794-10#Disboards:lsapi] HttpExtConnector::tryRecover()...
    2006-12-11 23:05:51.538 [DEBUG] [75.67.78.33:4794-10#Disboards:lsapi] trying to recover from connection problem, attempt: #2!
    2006-12-11 23:05:51.538 [DEBUG] [uds://tmp/lshttpd/lsphp.sock] request [75.67.78.33:4794-10#Disboards:lsapi] is assigned with connection!
  6. alex

    alex New Member

    I also got a server too busy (with only me on it for testing!)
    Log:

    2006-12-11 23:13:22.980 [DEBUG] Remove pid: 21172
    2006-12-11 23:13:22.981 [DEBUG] Remove pid: 21077
    2006-12-11 23:13:23.080 [DEBUG] [phpLsapi] add child process pid: 21173
    2006-12-11 23:13:23.080 [DEBUG] [75.67.78.33:4888-0#Disboards:lsapi] HttpExtConnector::tryRecover()...
    2006-12-11 23:13:23.081 [NOTICE] [phpLsapi] Send SIGTERM to process [21173].
    2006-12-11 23:13:23.081 [DEBUG] [phpLsapi] kill pid: 21173
    2006-12-11 23:13:23.081 [DEBUG] Remove pid: 21075
    2006-12-11 23:13:23.081 [DEBUG] Remove pid: 21173
  7. mistwang

    mistwang LiteSpeed Staff

    Anything in stderr.log? 503 error usually is caused a PHP error.
  8. alex

    alex New Member

    stderr.log is completely empty
  9. alex

    alex New Member

    I just found core files in the working directory
    GDB shows:

    Core was generated by `lsphp'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libcrypt.so.1
    Reading symbols from /lib64/libresolv.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libresolv.so.2
    Reading symbols from /lib64/tls/libm.so.6...(no debugging symbols found)...done.
    Loaded symbols for /lib64/tls/libm.so.6
    Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libdl.so.2
    Reading symbols from /lib64/libnsl.so.1...
    (no debugging symbols found)...done.
    Loaded symbols for /lib64/libnsl.so.1
    Reading symbols from /lib64/tls/libc.so.6...(no debugging symbols found)...done.
    Loaded symbols for /lib64/tls/libc.so.6
    Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib64/ld-linux-x86-64.so.2
    Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libnss_files.so.2
    Reading symbols from /usr/local/Zend/lib/ZendExtensionManager.so...
    (no debugging symbols found)...done.
    Loaded symbols for /usr/local/Zend/lib/ZendExtensionManager.so
    Reading symbols from /usr/local/lsws/lib/apc.so...done.
    Loaded symbols for ./../lib/apc.so
    Reading symbols from /lib64/tls/librt.so.1...done.
    Loaded symbols for /lib64/tls/librt.so.1
    Reading symbols from /lib64/tls/libpthread.so.0...done.
    Loaded symbols for /lib64/tls/libpthread.so.0
    Reading symbols from /usr/local/Zend/lib/Optimizer-3.2.0/php-4.4.x/ZendOptimizer.so...done.
    Loaded symbols for /usr/local/Zend/lib/Optimizer-3.2.0/php-4.4.x/ZendOptimizer.so
    #0 0x0000002a976d78a6 in zend_oe ()
    from /usr/local/Zend/lib/Optimizer-3.2.0/php-4.4.x/ZendOptimizer.so
    (gdb)

    I have turned off APC as I suspect that may be causing this
    Last edited: Dec 12, 2006
  10. mistwang

    mistwang LiteSpeed Staff

    You can try other opcode caches, switching to 32bit PHP binary, etc.
  11. alex

    alex New Member

    It was definitely the cache, I'll try some other things

Share This Page