Cache problem

Discussion in 'General' started by palb, Feb 20, 2008.

  1. palb

    palb New Member

    I have this really annoying problem with page cache. I've done changes in a file, and upload it. But it doesn't show up on the sever side. I've tried to empty cache, but still the same old page. Must be something Litespeed does. The question is what?

    ---

    Now it changed. Seems to come after a while. How can I change this. Very annoying when developing.
  2. mistwang

    mistwang LiteSpeed Staff

    Is it a text file? Maybe it is the gzip cache, you can turn off gzip compression if you can.

    Or, you can remove the gzip cache directory.
  3. palb

    palb New Member

    It's a .rhtml in views. I'll take a look at gzip. Thanks :)
  4. mistwang

    mistwang LiteSpeed Staff

    does LSWS serve .rhtml directly? or served by rails internally? if it is the later. it must be rails problem, maybe Rails' cache.
  5. palb

    palb New Member

    It's via rails. Thanks for the clarification.
  6. palb

    palb New Member

    The problem is still there and rather annoying. Must be LS issue.
  7. mistwang

    mistwang LiteSpeed Staff

    Whether it is a LS issue or not depends on whether the request being forwarded to rails, or LSWS serve it by itself, or the browser cache it.

    You should check rails log and LSWS access log.
  8. palb

    palb New Member

    All I know is that there is no gzip and rails is in developer mode. It's not a browser cache issue, I know that when I see it.
  9. mistwang

    mistwang LiteSpeed Staff

    If a request go though Rails, LSWS is just a messenger, so check the development.log see if the request hit rails.
  10. palb

    palb New Member

    But LS could still be a messenger that delays the message, or? I mean, what about the ability to do a graceful restart the LS-way. How does that work if not LS has some power over the output and cache.
  11. palb

    palb New Member

    One more thing to why I suspect LS. When running on LS I can't save a new image to the server on a page just rendered in the browser as it's "busy" or "in use". Also annoying. That is never an issue in other situations, including running the site with WEBrick.
  12. mistwang

    mistwang LiteSpeed Staff

    If LS cache the response for previous request, it will not forward new request to rails, just reply with cached result. If LS forward a request to rails, LS will just relay the response from rails. There is no third possibility. LSWS still serve requests exactly the same way during a graceful restart.

    So, please check the rails development log see if the request hits rails or not, if LS does not forward the request then we can investigate why LS cache the request. Also check LSWS access log to make sure the request really hit LSWS or not.
  13. mistwang

    mistwang LiteSpeed Staff

    It is more likely a permission issue as LS start the backend in suEXEC mode. Or a process memory limit issue, you have to check Rails log and LSWS error logs to find out why.
  14. palb

    palb New Member

    Not sure what to look for in the log. In either case, what can I do to prevent LS to have this behavior
  15. mistwang

    mistwang LiteSpeed Staff

    Anything abnormal, errors, exceptions.

    I don't have an answer due to insufficient information available. You have to check those log files.
  16. palb

    palb New Member

    Hmm. Do you mean that it's not a normal LS behavior? If it's LS then what could you imagine I should look for more specifically? I mean it must be LS doing something. There's nothing else involved. Well Rails, but it's ok when using WEBrick or mongrel. The behavior is the same on my local machine/LSWS and the server I use (with LSWS).
  17. mistwang

    mistwang LiteSpeed Staff

    Answer has been given.

    LSWS run Rails in different way, including suEXEC, process memory limit, fork children process, limited environment variable passed to ruby process, etc. those difference could make Rails behave differently.

    We cannot help you if you do not follow our instrcution to provide more information.
  18. palb

    palb New Member

    I understand. It's a bit difficult when I don't know what to look for. On the other hand I believe it must be a good clue that LS obviously "get hold" of the particular file and occupy it so it's impossible to overwrite it, for a while. You know what LS does that occupies the file, I don't.
  19. mistwang

    mistwang LiteSpeed Staff

    Check access log file to see if a request has been received should be easy enough.

    No, LS does not and could not prevent some one to overwrite a file. The fact is that LSWS does not open those "*.rhtml" files, not even aware the existence of those files.

    If you want to have this problem solved, you have to stop speculating and follow our direction to diagnose it, otherwise, you are on your own. ;)
  20. palb

    palb New Member

    The access is registered, yes. Both in rails log and server log. However, the server log debug says so much that I don't know what to say. I guess the request is there, yes.

    Sorry to say but LS does prevent a file from being overwritten. It's no question about it. This is only when LS is running. That's why I wonder what it does to keep the file "busy". I have never seen this in other servers I know of. If we depart from that; what is happening behind the scene between the browser and LS that makes the file being busy, for a while?

Share This Page