Cache problem

palb

Well-Known Member
#1
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.
 

mistwang

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

mistwang

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

palb

Well-Known Member
#8
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.
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.
 

palb

Well-Known Member
#10
If a request go though Rails, LSWS is just a messenger, so check the development.log see if the request hit rails.
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.
 

palb

Well-Known Member
#11
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.
 

mistwang

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

mistwang

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

palb

Well-Known Member
#14
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.
Not sure what to look for in the log. In either case, what can I do to prevent LS to have this behavior
 

palb

Well-Known Member
#16
Anything abnormal, errors, exceptions.


I don't have an answer due to insufficient information available. You have to check those log files.
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).
 

mistwang

LiteSpeed Staff
#17
what could you imagine I should look for more specifically?
Answer has been given.

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.
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).
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.
 

palb

Well-Known Member
#18
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.
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.
 

mistwang

LiteSpeed Staff
#19
I understand. It's a bit difficult when I don't know what to look for.
Check access log file to see if a request has been received should be easy enough.

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.
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. ;)
 

palb

Well-Known Member
#20
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. ;)
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?
 
Top