Pre-sale questions

Discussion in 'Install/Configuration' started by LiteSpeeder, Nov 30, 2008.

  1. LiteSpeeder

    LiteSpeeder New Member

    Pre-sale questions and lsws tweaking

    I increased the limit from php.ini to 512M
    and 1000M, 1200M in lsphp5.

    I tried to refresh vbulletin's online.php files 15 times after the error message and i was loaded once.

    Edit: I disabled memcache-memcached option of my vbseo script and it seems to be working fine now with the old php settings. A conflict with memcached?

    I have xcache and memcache installed on my web server and memcached installed on my db server.

    Edit: Hmm... no. When i try to view 200 online users per page, the same error is displayed. I disabled php error warnings when i was playing with the lsws settings and i can't find where to enable it again. It displays a blank white page instead of the error message. Where can i enable it?
    Last edited: Dec 1, 2008
  2. mistwang

    mistwang LiteSpeed Staff

    the php error configuration is in php.ini
    You should increase the limit in php.ini to match the soft limit.
    xcache and memcached may allocate a lot more memory, those will be counted towarding the limit.
  3. LiteSpeeder

    LiteSpeeder New Member

    Alright, it's directly related to caching as you said (xcache, memcached). I increased the limits as below and the problem seems to be fixed for now.

    Max Connections: 50
    PHP_LSAPI_MAX_REQUESTS=500
    PHP_LSAPI_CHILDREN=50

    lsphp5 memory soft limit: 512M
    lsphp5 memory hard limit: 768M
    (under security tab settings are same with the above)

    lsphp5 process soft limit: 200
    lsphp5 process hard limit: 200
    (400 and 450 for security tab settings)

    Are these reasonable values for a high traffic web site with 8 GB ram installed on the server?

    I decreased Per Client Throttling options and noticed my pages with 100+ small gifs loads slower. So my current settings:

    Static Requests/second 100
    Dynamic Requests/second 50
    Outbound Bandwidth (bytes/sec) 0
    Inbound Bandwidth (bytes/sec) 0
    Connection Soft Limit 50
    Connection Hard Limit 100
    Grace Period (sec) 15
    Banned Period (sec) 300

    I know these are a little high for preventing ddos but i want my pages which have tons of gif and flash load really fast.

    What i want is reasonable ddos protection and no performance limit. Especially for Google bot crawling many pages at the same time.
  4. mistwang

    mistwang LiteSpeed Staff

    Usually, only the main page are generated by PHP script, other images/js/css are static files, so, I recommend using "1" as the limit,
    However, if you have multiple requests served by PHP dynamically within one page, like some images, you may need to increase the "Dynamic Requests/second", it depends on your site, I do not recommend use a value higher than 5, otherwise it will not serve the purpose.
  5. LiteSpeeder

    LiteSpeeder New Member

    Ok. I figured out the blank white screen problem is because of xcache. When i try to view a page with a big query (vbulletin's online.php file with the max limit of 200) it's rarely loading the page. It was working good with apache. My xcache settings in php.ini:
    Code:
    [xcache-common]
    ;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
    zend_extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so"
    zend_extension_ts = "c:/php/extensions/php_xcache.dll"
    ;; For windows users, replace xcache.so with php_xcache.dll
    ;; or install as extension, make sure your extension_dir setting is correct
    ;; or win32:
    
    [xcache]
    ; ini only settings, all the values here is default unless explained
    ; select low level shm/allocator scheme implemenation
    xcache.shm_scheme="mmap"
    xcache.size=128M
    xcache.count=8
    xcache.slots=8K
    xcache.ttl=0
    xcache.gc_interval=0
    
    xcache.var_size=0M
    xcache.var_count=8
    xcache.var_slots=8K
    xcache.var_ttl=0
    xcache.var_maxttl=0
    xcache.var_gc_interval=0
    
    xcache.test =                Off
    ; N/A for /dev/zero
    xcache.readonly_protection = Off
    ; for *nix, xcache.mmap_path is a file path, not directory.
    ; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
    ; 2 group of php won't share the same /tmp/xcache
    ; for win32, xcache.mmap_path=anonymous map name, not file path
    xcache.mmap_path =    "/dev/zero"
    
    
    ; leave it blank(disabled) or "/tmp/phpcore/"
    ; make sure it's writable by php (without checking open_basedir)
    xcache.coredump_directory =   ""
    
    ; per request settings
    xcache.cacher =               On
    xcache.stat   =               On
    xcache.optimizer =            On
    
    [xcache.coverager]
    ; per request settings
    ; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
    xcache.coverager =          Off
    
    ; ini only settings
    ; make sure it's readable (care open_basedir) by coverage viewer script
    ; requires xcache.coverager=On
  6. mistwang

    mistwang LiteSpeed Staff

    Just add 128MB to your current limit, Apache may not apply any memory limit.
  7. LiteSpeeder

    LiteSpeeder New Member

    I did. It didn't help. Blank white pages or "Fatal error: Out of memory..."

    Serious memory leak with xcache running?
  8. LiteSpeeder

    LiteSpeeder New Member

    I disabled xcache and installed apc. I have the same problem. Out of memory...

    php.ini memory limit: 128M
    lsphp5 memory soft limit: 512M
    lsphp5 memory hard limit: 768M

    It doesn't matter if i double these values or not.
  9. mistwang

    mistwang LiteSpeed Staff

    the 128M limit in php.ini is too small, it should be set to match lsphp5 soft limit.
  10. mistwang

    mistwang LiteSpeed Staff

    if you enabled "PHP suEXEC", disable it.
  11. LiteSpeeder

    LiteSpeeder New Member

    PHP suEXEC is disabled from the beginning. Even setting -1 for the memory limit didn't matter. I actually tried disabling memory limiting from both php.ini and lsws but it didn't help, either. The page loads when xcache or apc is disabled.
  12. anewday

    anewday Moderator

    Have you tried eaccelerator?
  13. LiteSpeeder

    LiteSpeeder New Member

    Not yet. I'm not sure about it. Does it work good with PHP 5.2.6?
  14. anewday

    anewday Moderator

    I haven't tested it witih php5 yet but I don't recall hearing any major issues with it.
  15. mistwang

    mistwang LiteSpeed Staff

    Maybe I should take a look at your server.
  16. mistwang

    mistwang LiteSpeed Staff

    Are you sure the memory limit in php.ini has been set to a higher value? check the phpinfo() page.
  17. LiteSpeeder

    LiteSpeeder New Member

    Yes, it's 512MB at the moment.

    phpinfo:
    memory_limit 512M
  18. LiteSpeeder

    LiteSpeeder New Member

    I have another issue :(

    I click the "Top Statistics" from vbulletin admin cp and the result:
    Code:
    Warning: mysql_query() [function.mysql-query]: Unable to save result set in [path]/includes/class_core.php on line 427
    Code:
    Invalid SQL:
    SELECT userid, username, posts FROM user ORDER BY posts DESC;
    
    MySQL Error   : Lost connection to MySQL server during query
    Error Number  : 2013
    I went to db server's phpmyadmin and entered the sql query manually, it's displayed instantly. I think litespeed is limiting the request to the other server. I tried disabling the limitations once again but it failed...

    I switched to apache and it was working... i'm pretty sure that the limits are my problems (not php.ini and my.cnf settings)...
    Last edited: Dec 2, 2008
  19. mistwang

    mistwang LiteSpeed Staff

    If you can PM me a temp root access, and tell me how to reproduce the problem, I can take a look for you.
  20. LiteSpeeder

    LiteSpeeder New Member

    I've sent the PM.

Share This Page