geerlingguy / jeffgeerling-com

Drupal Codebase for JeffGeerling.com
https://www.jeffgeerling.com
GNU General Public License v2.0
38 stars 2 forks source link

When posting comments, I sometimes get 'server unexpectedly dropped connection' #124

Open geerlingguy opened 4 years ago

geerlingguy commented 4 years ago

This happens to me as an authenticated user maybe once out of every 3-4 times I leave a comment. It never happened on my Drupal 7 site; I'm not quite sure how often it may be happening to anonymous users.

Anyways, here's what happens:

  1. I go to a comment, and click 'reply' or go to 'Add new comment' page for a blog post.
  2. I enter some text (could take a minute or two), and click 'Save'.
  3. I get a blank page and warning from Safari:
Screen Shot 2020-06-14 at 4 02 44 PM

I looked in Nginx's logs at the time, and the only message I could trace back (right around the time I tried to post the comment) was:

2020/06/14 16:02:35 [info] 32506#32506: *7402445 client closed connection while waiting for request, client: 71.14.186.20, server: 0.0.0.0:80

So... what's up with that?

geerlingguy commented 4 years ago

Hmm... looking in the access logs, it seems that there may be some weird request loop that goes on, maybe caused by CleanTalk, and maybe if the connection gets dropped sometime in that cycle things get messed up?

104.236.203.61 - - [14/Jun/2020:16:02:05 -0500] "GET /blog/2020/installing-k3s-kubernetes-on-turing-pi-raspberry-pi-cluster-episode-3 HTTP/1.0" 200 80456 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15" "71.14.186.20"
104.236.203.61 - - [14/Jun/2020:16:02:08 -0500] "GET /comment/11430/approve?token=REDACTED HTTP/1.0" 302 466 "https://www.jeffgeerling.com/blog/2020/installing-k3s-kubernetes-on-turing-pi-raspberry-pi-cluster-episode-3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15" "71.14.186.20"
104.236.203.61 - - [14/Jun/2020:16:02:09 -0500] "GET /comment/11430 HTTP/1.0" 200 80599 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15" "71.14.186.20"
104.236.203.61 - - [14/Jun/2020:16:02:10 -0500] "GET /comment/reply/node/3010/comment_node_blog_post/11430 HTTP/1.0" 200 65327 "https://www.jeffgeerling.com/comment/11430" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15" "71.14.186.20"
71.14.186.20 - - [14/Jun/2020:16:02:05 -0500] "GET /blog/2020/installing-k3s-kubernetes-on-turing-pi-raspberry-pi-cluster-episode-3 HTTP/1.1" 200 16240 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15" "-"
71.14.186.20 - - [14/Jun/2020:16:02:08 -0500] "GET /comment/11430/approve?token=REDACTED HTTP/1.1" 302 478 "https://www.jeffgeerling.com/blog/2020/installing-k3s-kubernetes-on-turing-pi-raspberry-pi-cluster-episode-3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15" "-"
71.14.186.20 - - [14/Jun/2020:16:02:08 -0500] "GET /comment/11430 HTTP/1.1" 301 194 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15" "-"
geerlingguy commented 4 years ago

That route comes from \Drupal\comment\Controller\CommentController::commentApprove and the token is a CSRF token set by the comment module.