Client times out on (304) requests #537
Comments
@saravsars I fail to reproduce this with Ubuntu 12.04.3/nginx 1.5.6/Pagespeed 1.6.29.5. I tried with chrome, but also with curl:
|
@oschaaf error log content for 304 request : http://pastebin.com/HgXJB4Qk Can you share your nginx configuration file ?? Thanks. |
@saravsars thanks for the log, I'll have a look |
@saravsars I would also be interested in your |
@oschaaf I'm using your configuration now but the issue is not resolved. nginx.conf : http://pastebin.com/xz8wrhYF nginx configure : nginx version: nginx/1.5.6 |
@oschaaf strangely this configuration and your configuration works if I enable Any reason for it ?? nginx.conf
worker_processes 1;
|
The
Did you perhaps switch testing to 1.4.2? If defer_javascript makes the issue go away, the only thing I can come up with, is that you are hitting a corner case with either the timings or file sizes involved. |
@oschaaf yeah I'm testing both 1.4.2 and 1.5.6. Setting Thanks for quick response 👍 |
@saravsars |
@oschaaf I'll try to post it public asap. BTW Im seeing this error many times in It is usual one ?? Thanks |
@saravsars Would you be able to try the current master? |
You may want to set location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { keepalive_timeout 0; } By the way, I only have these options related to pagespeed: pagespeed on; pagespeed FileCachePath /var/cache/ngx_pagespeed; nginx: 1.4.3 |
@oschaaf @degtyarevalexey yeah using Thanks 👍 |
Having the same problem as saravsars. Using keepalive_timeout 0 fixed the problem for me as well, but is it safe to use keepalive_timeout 0 as described above without causing any problems? ubuntu: 13.10 ./configure --add-module=$HOME/ngx_pagespeed --with-http_ssl_module --with-openssl=/usr/bin/openssl
Edit For whatever reason putting keepalive_timeout 0 inside the pagespeed location regex stopped working for me. Has to be put outside of it. |
|
I just compiled nginx with the pagespeed master today (1.6.29.7-3453) and I'm still getting the same problem. ubuntu: 13.10 |
@tuurbo
It would be good to know if disabling keepalive at only that location resolves the problem |
@oschaaf Just tried that and it didn't resolve the issue |
@tuurbo The problem doesn't seem to reproduce for me, what browser are you testing with? |
chrome 30, firefox 25, IE 10 you should see the problem by refreshing the page a few times |
@tuurbo Thanks, I was able to reproduce it, and I can reproduce this when replaying chrome's request using curl now too:
That should help us to figure this out. The second request to http://162.243.66.244/test.htm seems to wait for a timeout to fire before it gets processed, so apparently, the 304 response seems to drop the ball. While we figure this out, I can currently only suggest working around this for now with setting |
@chaizhenhua Could you have a look at this? Does |
@oschaaf It seems that we do not need extra handling if HandleDone is called for all response. |
Testing on the 1.7.30.1 I was about to release, this is not actually fixed:
|
Slightly smaller test case:
|
Tracing execution I see:
|
Normal request flow, without
No pauses, as expected. |
|
In the |
More details on the
This is not ok, and there's a comment to this effect in
I don't know why I didn't make that into at least a |
@chaizhenhua @oschaaf I'm not sure I understand what |
Above I compared this to a 404, but maybe a 200 is a better comparison. When fetching http://localhost:8050/mod_pagespeed_example/styles/blue.css.pagespeed.ce.0.css I see"
|
It looks like my sternly worded comment in I think the real problem is that we need |
Guess: |
@jeffkaufman That sounds like something that should work to me (when |
Calling I think the problem might be in how we handle the pipe closing. RequestCollection writes to the pipe, but HandleDone closes it. Then when we watch the pipe in the nginx thread we see the pipe is closed and think everything is done. |
Actually, I think the problem isn't with |
Here's a hack that fixes this:
|
Thinking more, removing the |
Fixed by #557 |
For 200 requests everything works fine
For 304 requests , it takes 1 minute to complete
In error log
What is the issue here??
OS: Ubuntu 12.04
Nginx version: 1.5.6
Pagespeed : 1.6.29.5
Thanks
The text was updated successfully, but these errors were encountered: