Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Improve Jetty HTTP Server error handling #152

Merged
merged 3 commits into from
Aug 11, 2016

Conversation

pettermahlen
Copy link
Member

The following is included:

  • handling of timeouts from Jetty
  • configuration of Jetty timeouts based on Apollo config settings
  • handling of dropped messages
  • cleanup of config settings and documentation

If, for instance, an asynchronous request times out (configured
via org.eclipse.jetty.server.HttpChannelState.DEFAULT_TIMEOUT,
now via the Apollo http.server.ttlMillis parameter as intended),
Jetty will eventually retry the request. We didn't handle that
case.

Also adds support for the 'OngoingRequest.drop()' method.
@pettermahlen
Copy link
Member Author

@sisidra @jo-ri

@codecov-io
Copy link

codecov-io commented Aug 11, 2016

Current coverage is 69.13% (diff: 89.47%)

Merging #152 into 1.x will increase coverage by 0.10%

@@                1.x       #152   diff @@
==========================================
  Files           133        134     +1   
  Lines          2793       2799     +6   
  Methods           0          0          
  Messages          0          0          
  Branches        224        224          
==========================================
+ Hits           1928       1935     +7   
+ Misses          822        821     -1   
  Partials         43         43          

Powered by Codecov. Last update 684a665...ddd1e87

@jo-ri
Copy link
Contributor

jo-ri commented Aug 11, 2016

+1

@sisidra
Copy link

sisidra commented Aug 11, 2016

👍
Confirmed that now for long requests we get

HTTP/1.1 500 Timeout
Date: Thu, 11 Aug 2016 09:47:35 GMT
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=iso-8859-1
Content-Length: 327
Server: Jetty(9.3.4.v20151007)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing ***. Reason:
<pre>    Timeout</pre></p>
<hr /><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.3.4.v20151007</a><hr/>
</body>
</html>

instead of repeated processing call.

@pettermahlen pettermahlen merged commit 44523f6 into spotify:1.x Aug 11, 2016
@pettermahlen pettermahlen deleted the no-error-dispatch branch August 11, 2016 10:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants