Page MenuHomePhabricator

Fail gracefully and log an error if a page was not properly indexed
Closed, ResolvedPublic

Description

DataSender::sendData assumes that an exception is thrown when the update failed. It is not always the case, now that we use a proxy a 4xx response can be returned by Nginx (It is maybe a limitation in Elastica) and no exception will be thrown.
We should inspect response status and log properly an error.

Event Timeline

Deskana triaged this task as Medium priority.Apr 19 2016, 11:54 PM

I'm not having the best of luck convincing nginx to give up 4xx errors (beyond forcing them with the config file), any suggestions?

The particular error we had was due to a very large doc that was refused by nginx (max of 1m by default iirc) and should be 413.
Maybe another case would be to trigger a timeout between nginx and elastic with a firewall rule, that should trigger a 504 maybe?

Change 290722 had a related patch set uploaded (by EBernhardson):
Fail and log error if page was not properly indexed

https://gerrit.wikimedia.org/r/290722

Change 291111 had a related patch set uploaded (by EBernhardson):
Fail and log error if page was not properly indexed

https://gerrit.wikimedia.org/r/291111

Change 290722 abandoned by EBernhardson:
Fail and log error if page was not properly indexed

Reason:
es2.x branch merged to master, this patch is no longer necessary instead will merge into master

https://gerrit.wikimedia.org/r/290722

Change 291111 merged by jenkins-bot:
Fail and log error if page was not properly indexed

https://gerrit.wikimedia.org/r/291111