Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

upgrade http4k, and fix database URL to have port, implement docker f…#3206

Merged
NateBrady23 merged 20 commits intoTechEmpower:masterfrom
http4k:master
Feb 21, 2018
Merged

upgrade http4k, and fix database URL to have port, implement docker f…#3206
NateBrady23 merged 20 commits intoTechEmpower:masterfrom
http4k:master

Conversation

@daviddenton
Copy link
Copy Markdown
Contributor

@daviddenton daviddenton commented Jan 25, 2018

…or postgres

If we could get this into final R15, that'd be awesome as it fixes the long broken DB tests

@NateBrady23
Copy link
Copy Markdown
Member

@daviddenton we're currently right in the middle of working on a way to integrate docker with the suite, but right now any tests using docker break our continuous benchmarking. See: #3187

@daviddenton
Copy link
Copy Markdown
Contributor Author

The tests don’t use docker. There’s a just a Dockerfile and a script which would need to be manually run. Is that a problem?

@daviddenton
Copy link
Copy Markdown
Contributor Author

If it is a problem, feel free to ditch the file when you merge it in, or I can do it. But I’d like it not to block the merge :)

@daviddenton
Copy link
Copy Markdown
Contributor Author

Closing until R16, to ensure that we get results for R15.

@NateBrady23
Copy link
Copy Markdown
Member

hey @daviddenton sorry, I didn't dig too deep there but I saw the dockerfile and a docker run command so wanted to make sure I let you know where we stood there. We can revisit after r15 results are posted (should be very soon ®)

@michaelhixson
Copy link
Copy Markdown
Contributor

@daviddenton For what it's worth, I tried running this PR on Server Central and I still got 0 RPS for the database tests. I'm a little confused how it passes verification but has exactly 0 requests in the full test.

@daviddenton
Copy link
Copy Markdown
Contributor Author

I’m presuming that the change is good though for that environment? It does need the port to connect - or is there something unusual about that env?

@daviddenton
Copy link
Copy Markdown
Contributor Author

And obviously it does work with the dockerised env that I included in the dockerfile. :)

@daviddenton
Copy link
Copy Markdown
Contributor Author

daviddenton commented Jan 26, 2018

Could it be the benchmark JSON - is the name of the database correct? Not sure if it’s case sensitive..

EDIT: Following the above suspicion, I've updated the name of the database - if anyone would like to test it again against SC that'd be awesome.

@daviddenton daviddenton reopened this Jan 27, 2018
@michaelhixson
Copy link
Copy Markdown
Contributor

@daviddenton It's like it stops responding to requests after wrk starts the load test. It's ok at first, and it returns the right content from all the db-related endpoints so we know it's reaching the database, but then it falls over when wrk starts making a ton of requests.

I got it to respond with an error page when did a curl while the load test was running:

curl localhost:9000/queries?queries=1
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /queries. Reason:
<pre>    Server Error</pre></p><h3>Caused by:</h3><pre>java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms.
        at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:666)
        at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:182)
        at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:147)
        at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:85)
        at Database.withConnection(Database.kt:40)
        at WorldRoutes$multipleRoute$1.invoke(WorldRoutes.kt:44)
        at WorldRoutes$multipleRoute$1.invoke(WorldRoutes.kt:23)
        at Http4kBenchmarkServer$headers$1$1.invoke(Http4kBenchmarkServer.kt:14)
        at Http4kBenchmarkServer$headers$1$1.invoke(Http4kBenchmarkServer.kt:9)
        at org.http4k.core.Http4kKt$then$2.invoke(Http4k.kt:17)
        at org.http4k.core.Http4kKt$then$2.invoke(Http4k.kt)
        at org.http4k.routing.TemplateRoutingHttpHandler$match$1.invoke(internal.kt:72)
        at org.http4k.routing.TemplateRoutingHttpHandler$match$1.invoke(internal.kt:67)
        at org.http4k.routing.RoutingKt$routes$2.invoke(routing.kt:26)
        at org.http4k.routing.RoutingKt$routes$2.invoke(routing.kt:25)
        at org.http4k.servlet.HttpHandlerServlet.service(servlet.kt:19)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.Server.handle(Server.java:561)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
        at java.lang.Thread.run(Thread.java:748)
</pre>
<hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.7.v20170914</a><hr/>

</body>
</html>

@daviddenton
Copy link
Copy Markdown
Contributor Author

@michaelhixson found the problem - it was that we were not closing off resources properly, so it basically eats up all the connections and then chokes. Thanks a miiion for your help in getting this resolved. 👏 ⭐️ 😄

I'll reopen this as soon as R15 is done. :)

@daviddenton daviddenton reopened this Jan 28, 2018
@daviddenton daviddenton reopened this Feb 15, 2018
@daviddenton
Copy link
Copy Markdown
Contributor Author

Reopening to get into R16 previews. Keep up the good work people! 😄

@NateBrady23
Copy link
Copy Markdown
Member

Hi @daviddenton can you check out #3308 just make sure the benchmark_config.json structure is correct. Also, could you add the framework to .travis.yml in the appropriate place. Seems like that was missed before.

@daviddenton
Copy link
Copy Markdown
Contributor Author

@nbrady-techempower yep - that all looks good. Thanks for fixing that JSON thing - I always wondered why we got that warning and the split of the tests JSON array was too subtle for me to spot.

On that subject, I'd actually like to ditch the "default" completely, since we don't really have a "default" - we have several pluggable backends (currently the default is actually the jetty implementation). Is this possible? If it isn't, then please forget I said anything and just merge this :)

@NateBrady23
Copy link
Copy Markdown
Member

@daviddenton The default section is more for the test suite and right now it's required as part of the setup.

Now that travis is picking up the test, it looks like it's not passing there.

@michaelhixson
Copy link
Copy Markdown
Contributor

@daviddenton Could you remove the local testing scripts like run_db.sh and benchmark_server.sh? I understand that scripts like that can be useful to the maintainer, but I don't think this repository is a good home for them.

* Delete benchmark_all.sh

* Delete benchmark_server.sh

* Delete killbenchmark.sh

* Delete run_db.sh

* Delete Dockerfile
@daviddenton
Copy link
Copy Markdown
Contributor Author

@michaelhixson no problem. tidied as requested.

@NateBrady23 NateBrady23 merged commit d72b487 into TechEmpower:master Feb 21, 2018
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.

3 participants