question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use `ArmeriaServerGracefulShutdownLifecycle` to start `Server` with Spring integration

See original GitHub issue

Armeria Server is started before Spring Application contexts are fully initialized when using the Spring integration module. https://github.com/line/armeria/blob/be2bf5176dc20cc868011e9239510f2feac87328/spring/boot2-autoconfigure/src/main/java/com/linecorp/armeria/spring/AbstractArmeriaAutoConfiguration.java#L104-L110 If a Server early binds to a port before the application is ready, many pending requests are queued and it will cause GC pressure. I think we can use ArmeriaServerGracefulShutdownLifecycle added in #3226 to start up a Server leveraging Spring beans’ lifecycle. https://github.com/line/armeria/blob/f3cc329530a83ec47ed08c8e8be1443437e55de7/spring/boot2-autoconfigure/src/main/java/com/linecorp/armeria/spring/ArmeriaServerGracefulShutdownLifecycle.java#L36-L42

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
heowccommented, Aug 11, 2021

I’ll check a little more and send a PR 😄

1reaction
kojilincommented, Aug 10, 2021

LGTM, I checked the PR in the above comment, just need to double confirm the case in the comment that heowc also answered^^

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Integration
Introduction. Using the Spring Framework encourages developers to code using interfaces and use dependency injection (DI) to provide a Plain Old Java Object...
Read more >
Error creating bean with name 'armeriaServer' defined in com ...
Run the jar now: $ java -jar zipkin.jar. Another possible reasons: If you have zipkin-dependencies jar installed, make sure both zipkin jar ...
Read more >
Introduction to Spring Integration | Baeldung
A quick and practical guide Spring Integration.
Read more >
Managing and Monitoring Spring Integration Applications
Using the Control Bus to start and stop endpoints. Using the Spring Integration plugin for Spring Insight to get a real-time view of...
Read more >
Using Armeria with Spring WebFlux
In addition, if your Spring application integrates with Armeria, ... starter configures Armeria as the HTTP server for WebFlux to run on by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found