Last modified: 2012-08-17 18:09:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41460, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39460 - Database errors return HTTP 200 OK
Database errors return HTTP 200 OK
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-17 16:49 UTC by Zhen Lin
Modified: 2012-08-17 18:09 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch against 1.19.1 (360 bytes, patch)
2012-08-17 16:49 UTC, Zhen Lin
Details

Description Zhen Lin 2012-08-17 16:49:25 UTC
Created attachment 10982 [details]
Patch against 1.19.1

If a DBError is thrown – such as when MySQL is returning the "too many connections" error – MediaWiki returns an error page with the HTTP 200 OK status code. This is quite troublesome, since automatic polling by Varnish only checks the status code of the returned page to determine whether the backend is healthy or not. 

I have attached a simple patch to work around this problem. I notice I have to use the PHP header function directly instead of going via $wgOut – I suppose that's because the error page is being output raw instead of through OutputPage.
Comment 1 Platonides 2012-08-17 16:53:59 UTC
Looks fixed on master, I see "HTTP/1.1 500 MediaWiki exception"
Comment 2 Alex Monk 2012-08-17 17:05:28 UTC
Already done by Platonides in Gerrit change #9521
Comment 3 Platonides 2012-08-17 18:09:21 UTC
Thanks for the link, Krenair.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links