Random 404s

Discussion in 'Bug Reports' started by matt, Dec 26, 2005.

  1. mistwang

    mistwang LiteSpeed Staff

    Just change "ent" to "std" to download the new release.
    If you are using the standard edition, then I think it is more likely caused by per process file descriptor limit.

    You can try following if you can not reboot the server after then system wide configuration change, as root

    Code:
    # ulimit -n 10000
    #lsws/bin/lswsctrl stop
    #lsws/bin/lswsctrl start
    
    Do not use lswsctrl restart, it won't work.

    The file descriptor limit problem does not likely happen with enterprise as the default file descriptor limit for enterprise is much higher. :)

    Anyway, raise the limit see if it helps.
  2. matt

    matt New Member

    Raising the limit didn't make a diff.

    Running 2.1.9, here's a second of logs where the 404 thing happened to me. (The forum load.)

    Code:
    2005-12-28 14:50:58.047 [INFO] [141.91.240.162:22937-0#WP.org] File not found [/home/wporg/public_html/style/v3-head/forums.png]
    2005-12-28 14:50:58.075 [INFO] [80.67.17.116:38120-0#WP.org] [REWRITE] strip rewrite base: '/development/' from URI: '/development/feed/'
    2005-12-28 14:50:58.075 [INFO] [80.67.17.116:38120-0#WP.org] [REWRITE] Rule: Match 'feed/' with pattern '.', result: 1
    2005-12-28 14:50:58.075 [INFO] [80.67.17.116:38120-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.075 [INFO] [80.67.17.116:38120-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.075 [INFO] [80.67.17.116:38120-0#WP.org] [REWRITE] Source URI: 'feed/' => Result URI: '/development/index.php'
    2005-12-28 14:50:58.218 [INFO] [64.132.227.126:64223-1#WP.org] File not found [/home/wporg/public_html/support/topic/36894]
    2005-12-28 14:50:58.234 [INFO] [69.27.96.169:33456-0#WP.org] [REWRITE] strip rewrite base: '/development/' from URI: '/development/feed/'
    2005-12-28 14:50:58.234 [INFO] [69.27.96.169:33456-0#WP.org] [REWRITE] Rule: Match 'feed/' with pattern '.', result: 1
    2005-12-28 14:50:58.234 [INFO] [69.27.96.169:33456-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.234 [INFO] [69.27.96.169:33456-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.234 [INFO] [69.27.96.169:33456-0#WP.org] [REWRITE] Source URI: 'feed/' => Result URI: '/development/index.php'
    2005-12-28 14:50:58.278 [INFO] [213.139.7.91:50314-0#WP.org] [REWRITE] strip rewrite base: '/development/' from URI: '/development/feed/'
    2005-12-28 14:50:58.278 [INFO] [213.139.7.91:50314-0#WP.org] [REWRITE] Rule: Match 'feed/' with pattern '.', result: 1
    2005-12-28 14:50:58.278 [INFO] [213.139.7.91:50314-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.278 [INFO] [213.139.7.91:50314-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.278 [INFO] [213.139.7.91:50314-0#WP.org] [REWRITE] Source URI: 'feed/' => Result URI: '/development/index.php'
    2005-12-28 14:50:58.376 [INFO] [134.58.179.8:57018-0#WP.org] File not found [/home/wporg/public_html/style/v3-head/wordpress_web_hosting.png]
    2005-12-28 14:50:58.390 [INFO] [81.206.163.203:25571-0#WP.org] File not found [/home/wporg/public_html/support/topic/3282]
    2005-12-28 14:50:58.399 [INFO] [86.202.232.239:49793-0#WP.org] File not found [/home/wporg/public_html/style/v3-head/plugins/links.png]
    2005-12-28 14:50:58.430 [INFO] [83.237.190.110:50821-0#WP.org] File not found [/home/wporg/public_html/style/v3-head/welcome.png]
    2005-12-28 14:50:58.437 [INFO] [213.54.153.40:33228-0#WP.org] File not found [/home/wporg/public_html/style/v3-head/installing_wordpress.png]
    2005-12-28 14:50:58.442 [INFO] [130.208.195.18:58597-0#WP.org] [REWRITE] strip rewrite base: '/development/' from URI: '/development/feed/'
    2005-12-28 14:50:58.442 [INFO] [130.208.195.18:58597-0#WP.org] [REWRITE] Rule: Match 'feed/' with pattern '.', result: 1
    2005-12-28 14:50:58.442 [INFO] [130.208.195.18:58597-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.442 [INFO] [130.208.195.18:58597-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.442 [INFO] [130.208.195.18:58597-0#WP.org] [REWRITE] Source URI: 'feed/' => Result URI: '/development/index.php'
    2005-12-28 14:50:58.476 [INFO] [66.249.65.13:49596-3#WP.org] File not found [/home/wporg/public_html/support/topic/21636]
    2005-12-28 14:50:58.612 [INFO] [62.75.160.115:36683-0#WP.org] [REWRITE] strip rewrite base: '/development/' from URI: '/development/feed/'
    2005-12-28 14:50:58.612 [INFO] [62.75.160.115:36683-0#WP.org] [REWRITE] Rule: Match 'feed/' with pattern '.', result: 1
    2005-12-28 14:50:58.612 [INFO] [62.75.160.115:36683-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.612 [INFO] [62.75.160.115:36683-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed/ ) failed
    2005-12-28 14:50:58.612 [INFO] [62.75.160.115:36683-0#WP.org] [REWRITE] Source URI: 'feed/' => Result URI: '/development/index.php'
    2005-12-28 14:50:58.621 [INFO] [83.237.190.110:50821-1#WP.org] File not found [/home/wporg/public_html/style/v3-head/welcome_back.png]
    2005-12-28 14:50:58.636 [INFO] [200.91.233.179:3445-1#WP.org] File not found [/home/wporg/public_html/latest.zip]
    2005-12-28 14:50:58.689 [INFO] [80.58.46.235:36604-1#WP.org] File not found [/home/wporg/public_html/theme/connections.zip]
    2005-12-28 14:50:58.749 [INFO] [59.167.66.14:23607-0#WP.org] [REWRITE] strip rewrite base: '/development/' from URI: '/development/feed'
    2005-12-28 14:50:58.749 [INFO] [59.167.66.14:23607-0#WP.org] [REWRITE] Rule: Match 'feed' with pattern '.', result: 1
    2005-12-28 14:50:58.749 [INFO] [59.167.66.14:23607-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed ) failed
    2005-12-28 14:50:58.749 [INFO] [59.167.66.14:23607-0#WP.org] [REWRITE] stat( /home/wporg/public_html/development/feed ) failed
    2005-12-28 14:50:58.749 [INFO] [59.167.66.14:23607-0#WP.org] [REWRITE] Source URI: 'feed' => Result URI: '/development/index.php'
    2005-12-28 14:50:58.942 [INFO] [61.15.166.187:2862-0#WP.org] File not found [/home/wporg/public_html/style/v3-head/welcome.png]
    
  3. mistwang

    mistwang LiteSpeed Staff

    Matt,

    I forgot to tell that you can turn off rewrite logging if you don't need them, so the log file will not grow very fast.

    The log messages that I am interested in is the log messages with tag "HTAccess". You can email me a chunk of the error log when there is no 404, then 404 errors, then back to normal, or let me logon the admin interface temporarily to check the error log.

    Thanks,

    George
  4. mistwang

    mistwang LiteSpeed Staff

    Noticed that you already changed the URL format.


    Can you please send me the full error.log of 2.1.9 for analysis, if you have one.

    Thanks!
  5. matt

    matt New Member

    Yeah the forum folks were about to bite my head off.

    I'll upload the logs to a directory and send you a link.
  6. xing

    xing LiteSpeed Staff

    My post is not about the bug/debugging session currently in progress. But could help matt geting things running again quickly while the bug is taken care of.

    Instead of rewrite rules, you can use lsws's static context and use the regex you have to bind to specific scripts.

    So:

    exp:^/forum/[0-9]+/ ---> /myprivate/forum.php

    Of course unlike the rewrite method, using the context way requires your forum.php to parse the data out of the url.

    Basically the same goal done different ways and fairly easy enough to get you off the bug on the temporary basis fairly quicky. I use the setup extensively.
  7. mistwang

    mistwang LiteSpeed Staff

    Matt,

    Thank you for your assistance, finally, I figured out this nasty bug, a wrong variable has been used while building our htaccess cache. :oops:

    Please download 2.1.9 package again. I am pretty confident that the bug has been fixed. :)

    I guess I can sleep well tonight. ;-)

    Xing,

    Thank you for your suggestion. The context matching way does have slightly performance advantage. :)

    Acctually, query string can be set in a matching context as well, like
    exp:^/forum/([0-9]+)/(.*) ---> /myprivate/forum.php?forum=$1\&post=$2

    Becareful to escape the '&', otherwise, it will be replaced by the matching URI. ;-)
  8. xing

    xing LiteSpeed Staff

    Code:
    Acctually, query string can be set in a matching context as well, like
    exp:^/forum/([0-9]+)/(.*) ---> /myprivate/forum.php?forum=$1\&post=$2
    
    Nice! Didn't know I have those regex variables to work with! Intersting. Will likely think of something useful to do in the future with this.
  9. matt

    matt New Member

    Since the new 2.1.9 everything seems good so far.

Share This Page