Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinitely Launches Instances #2

Open
SteversIO opened this issue Apr 25, 2017 · 11 comments
Open

Infinitely Launches Instances #2

SteversIO opened this issue Apr 25, 2017 · 11 comments

Comments

@SteversIO
Copy link

When i deploy this app it infinitely launches instances. One after another...

@meltsufin
Copy link
Collaborator

This sample is really outdated. For one, it should use env: flex in app.yaml instead of vm: true.

@SteversIO
Copy link
Author

I figured it was, but I'm having a heck of a time finding example code that lets me launch my Spring Boot app on App Engine. I'm using gradle, and none of the examples i've found on the interwebs for gradle work :(.

So i figured the only way i could reach this author is an Issue.

Do you have any suggestions? Could I email you with what I have?

@meltsufin
Copy link
Collaborator

I'll try to update this sample and then you can see if it works. I suspect the app is just not responding to health checks, which causes it be restarted.

@loosebazooka
Copy link
Owner

Also, just out of curiosity, how did you get to this sample? Perhaps we need to fix some documentation somewhere that is still pointing to this.

@SteversIO
Copy link
Author

SteversIO commented Apr 25, 2017

I did a google search for App Engine, Spring Boot, Gradle.

How do you go about adding a health check response? This documentation makes it sound like you don't have to write any code to handle health checks, and it comes out of the box.

Here..

And in this example repo there is no explicit code. (Maven-based, im trying to convert it to gradle so i have a working repo to go off of...)

I really truly appreciate your response. I've spent the last day and a half trying to get my Spring Boot app working on App Engine. I'm about to give up and just go back to K8s/docker.

@meltsufin
Copy link
Collaborator

@Stevers146 I've committed some changes and tried deploying. I'm not observing any application restarts. Try again and see if it's still restarting for you.

@meltsufin
Copy link
Collaborator

You're right this app actually responds to health checks (/_ah/health) fine. So that shouldn't be an issue. However, if you put in endpoint security in your app, the health check URL might not work.

@SteversIO
Copy link
Author

SteversIO commented Apr 25, 2017

I'll try it now thank you. (it takes a few minutes to deploy).

This works now, not restarting. Very odd.

I removed all security in my own app until i could get it working unsecured. The _ah/health endpoint returns a 404, which the Google docs say is considered valid.

Thank you so very much.

@meltsufin so when you say, "this app responds to health checks" do you mean vacuously, because it doesn't support the _ah/health endpoint? Or do you mean explicitly now because you disabled health checks in the app.yaml?

@meltsufin
Copy link
Collaborator

When health checks are on, the App Engine infrastructure will ping /_ah/health and consider any 404 or 200 response as "healthy". It's up to you to define what "healthy" means in the context of your app and handle that endpoint. Otherwise, the default 404 is fine.

@SteversIO
Copy link
Author

@meltsufin
@loosebazooka

Thank you both for being super responsive. @meltsufin , thank you so much for your help. Do you guys have twitter handles?

@loosebazooka
Copy link
Owner

Not really on twitter. Feel free to file bugs or issues again the gradle plugin if you encounter any https://github.com/GoogleCloudPlatform/app-gradle-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants