jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Issue #12047 allow disabling opening connectors before starting

Open kelunik opened this issue 1 year ago • 10 comments

See #12047.

kelunik avatar Jul 16 '24 14:07 kelunik

Looking good. Can you get a ECA lined up so we can accept this PR?

See https://github.com/jetty/jetty.project/blob/jetty-12.0.x/CONTRIBUTING.md#eclipse-contributor-agreement

joakime avatar Jul 16 '24 15:07 joakime

Yes, I'll try to get the ECA sorted.

kelunik avatar Jul 24 '24 21:07 kelunik

@kelunik if you can get your ECA sorted today, then this could show up in the next release (12.0.12) Otherwise it will have to wait till 12.0.13 (or even 12.1.0)

joakime avatar Jul 25 '24 17:07 joakime

Oops, wrong button. Reopened!

joakime avatar Jul 25 '24 17:07 joakime

@joakime Unless I redeclare this as a personal contribution, I can't make this happen today. But I'm also not in a hurry as the workaround works fine for me, so shipping in a later release is OK.

Anything I can do for the failing jenkins steps?

kelunik avatar Jul 25 '24 19:07 kelunik

@joakime The ECA is now signed!

kelunik avatar Aug 23 '24 12:08 kelunik

@gregw you ok with this change? The QoSHandlerTest failures here are already fixed in HEAD.

joakime avatar Aug 26 '24 18:08 joakime

The QoSHandlerTest failures here are already fixed in HEAD.

Actually I just disabled the tests for now....

gregw avatar Aug 26 '24 23:08 gregw

Perhaps trying the quickstart mechanism to prescan all your webapps would be a better approach? It should only take a few 100 micro seconds to start such a server.

For a webapp that depends only on Servlet behaviors, yes, this is very possible.

But if you have a webapp that does scanning from multiple 3rd party libraries (eg: certain spring configurations, specific hibernate configurations, some jersey configs, etc) then each of those adds to the time to startup because each of those will scan the entire webapp bytecode for things like interfaces, annotations, etc.

Even though the modern era of webapp development can be quite complicated, don't worry too much about the details.

Just try the Jetty QuickStart mechanism (for your ee# environment) and see how it helps.

https://jetty.org/docs/jetty/12/operations-guide/quickstart/index.html

joakime avatar Aug 27 '24 13:08 joakime

Know that you can also tweak what jars are actually scanned on the Container classloader and the Webapp classloader with configuration.

This is an alternative to using quickstart.

See https://jetty.org/docs/jetty/12/operations-guide/annotations/index.html#scanning

joakime avatar Aug 27 '24 13:08 joakime

@kelunik we've missed the deadline for the current release cycle. Moving this to next months release. If you can update the names, then I'm inclined to merge it in that cycle.

gregw avatar Aug 28 '24 22:08 gregw

I'm a bit dismayed that webapplications can take soooo long to start that this is an issue.

Perhaps trying the quickstart mechanism to prescan all your webapps would be a better approach? It should only take a few 100 micro seconds to start such a server.

Scanning isn't what's causing our server to need time to start. It's the Spring context that loads lots of data into memory on start. But even a few seconds to start would cause additional latency in our load balancer setup, because once the socket is open, the load balancer tries to send requests (due to passive healthchecks).

I've adjusted the naming and rebased onto the latest 12.x branch, so hopefully everything is fine now.

kelunik avatar Sep 02 '24 08:09 kelunik