[google-appengine] Re: Instance gets terminated without warming up another

2020-08-12 Thread Alan deLespinasse
Hi, thanks for your response!

I would love to decrease the startup time. I assumed there wasn't any way I 
could decrease it much, since I'm basically just running a simple Flask 
server with mostly default app configuration. It does have some third-party 
package dependencies, but I don't know of any reason why they'd be that 
slow to load. When I run it locally for development, it starts up in less 
than a second. (I don't use gunicorn locally; maybe I'll try that and see 
if it's slow.)

It's been a while since I ran a simple Standard Environment Python app with 
automatic scaling, and when I did it was probably old-school Python 2.x. I 
think they used to start up pretty quickly, but I didn't know if it would 
be the same in newer environments.

I'm on vacation this week, but maybe next week I'll experiment with adding 
some extra logging before any dependencies are loaded, and when Flask 
actually starts serving. It would be interesting to see the timing on that.

I could play with gunicorn configuration, but I assumed the defaults were 
reasonable.

Meanwhile, my coworkers and I actually decided it was a good idea to 
increase the minimum instances anyway, so this isn't really bothering us 
now, but it would be nice to solve the mystery. 

Thanks!

Alan

On Wednesday, August 12, 2020 at 9:00:55 PM UTC-4, Elliott (Cloud Platform 
Support) wrote:
>
> Hello Alan,
>
> As you have pointed out from the documentation 
> :
>  
> (I know you’ve read it but please bear with me.)
>
> App Engine attempts to keep manual and basic scaling instances running 
> indefinitely. However, at this time there is no guaranteed uptime for 
> manual and basic scaling instances. Hardware and software failures that 
> cause early termination or frequent restarts can occur without prior 
> warning and can take considerable time to resolve; thus, you should 
> construct your application in a way that tolerates these failures.
>
> *You would like to know if App Engine can resist shutting down the 
> instance before spinning up a new one. This information is not available in 
> public documentation and from what is happening in your scenario, I believe 
> I would have to reach out to an App Engine Specialist to confirm. I want to 
> make sure.
>
> You have provided a workaround to this behavior to set up more instances 
> but you would like to know what are your other options. (Again, please bear 
> with me.)
>
> From the documentation I included 
> 
>  
> you may:
>
> Reduce the amount of time it takes for your instances restart or for new 
> ones to start.
>
> For long-running computations, periodically create checkpoints so that you 
> can resume from that state.
>
> Your app should be "stateless" so that nothing is stored on the instance.
>
> Use queues for performing asynchronous task execution.
>
> If you configure your instances to manual scaling:
> Use load balancing across multiple instances.
>
> Configure more instances than required to handle normal traffic.
> Write fall-back logic that uses cached results when a manual scaling 
> instance is unavailable.
>
> So to summarize right now with the information I have, you have two 
> options. The first and more direct is to create another instance that would 
> affect your budget and the other to look at the advice for your application.
>
> You also have another issue where it may take 30 seconds to warm up an 
> instance. This information is private and would require looking at your 
> project. I can help you as much as I can using this forum but sharing 
> specific information about your project is not good for security.
>
> I will wait for your response.
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f8bd681b-d7ae-4596-aba0-1fe39094cb02o%40googlegroups.com.


[google-appengine] Will legacy app engine python2 service based application continue to run after appcfg shutdown?

2020-08-12 Thread MVI Solutions
Hello everyone,

One of our projects uses Memcache, Mail API, Task Queue, Cloud KMS V1, and 
other legacy app engine services for Python 2 (standard env). If we can 
build this project with gcloud, will this continue to work after August 30 
(after appcfg build tool shutdown)?


We really need this to know for one of our clients. 


Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/c8e109d4-db4a-410c-a74b-e22a3f2b7d06o%40googlegroups.com.


[google-appengine] Re: Instance gets terminated without warming up another

2020-08-12 Thread 'Elliott (Cloud Platform Support)' via Google App Engine
Hello Alan,

As you have pointed out from the documentation 
:
 
(I know you’ve read it but please bear with me.)

App Engine attempts to keep manual and basic scaling instances running 
indefinitely. However, at this time there is no guaranteed uptime for 
manual and basic scaling instances. Hardware and software failures that 
cause early termination or frequent restarts can occur without prior 
warning and can take considerable time to resolve; thus, you should 
construct your application in a way that tolerates these failures.

*You would like to know if App Engine can resist shutting down the instance 
before spinning up a new one. This information is not available in public 
documentation and from what is happening in your scenario, I believe I 
would have to reach out to an App Engine Specialist to confirm. I want to 
make sure.

You have provided a workaround to this behavior to set up more instances 
but you would like to know what are your other options. (Again, please bear 
with me.)

>From the documentation I included 

 
you may:

Reduce the amount of time it takes for your instances restart or for new 
ones to start.

For long-running computations, periodically create checkpoints so that you 
can resume from that state.

Your app should be "stateless" so that nothing is stored on the instance.

Use queues for performing asynchronous task execution.

If you configure your instances to manual scaling:
Use load balancing across multiple instances.

Configure more instances than required to handle normal traffic.
Write fall-back logic that uses cached results when a manual scaling 
instance is unavailable.

So to summarize right now with the information I have, you have two 
options. The first and more direct is to create another instance that would 
affect your budget and the other to look at the advice for your application.

You also have another issue where it may take 30 seconds to warm up an 
instance. This information is private and would require looking at your 
project. I can help you as much as I can using this forum but sharing 
specific information about your project is not good for security.

I will wait for your response.




-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/7b329158-8ce2-4f99-8a62-2143adba6415o%40googlegroups.com.


[google-appengine] Re: Transactional tasks delayed

2020-08-12 Thread 'Elliott (Cloud Platform Support)' via Google App Engine
Hello Okku,

I may look into this for you if you provide a timestamp with date, time and 
timezone.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/643d352c-7129-4984-9970-611026e6ddc3o%40googlegroups.com.


[google-appengine] Re: Tasks: Guaranteed delivery time

2020-08-12 Thread 'manu' via Google App Engine
Hi,

as even though Cloud Tasks is not intended for real-time settings, this 
should not make premature triggering possible, so this looks like a 
malfunction. I didn't find documentation nor related cases about the 
premature triggering, either. I recommend you to ask for technical help in 
Issue Tracker [1].

Best regards
___
[1]:
https://issuetracker.google.com/

On Tuesday, 11 August 2020 22:51:34 UTC+2, Dominic Watson wrote:
>
> Instead of using a queue and to try and be as serverless as possible we 
> opted for using Cloud Tasks to schedule doing things in the future. For 
> tasks which don't require much accuracy for time it works really well and I 
> love it, but we're having an issue when we need them to be sent at a 
> precise time.
>
> We've got a growth function in JavaScript that looks like: *Math.pow(Math.E, 
> 0.6 * milliseconds) *and require a task to happen AT or slightly 
> AFTER a particular time but Cloud Tasks keeps calling us early. It's fine 
> if it's a little late as we already handle it but we're not prepared for 
> being called early.
>
> I know time synchronisation can be difficult but EVERYTHING is running in 
> a Google Cloud managed service:
>
> *Database:* Google Cloud SQL (PSQL)
> *App: *Google Kubernetes Engine
> *Tasks: *Google Cloud Tasks
>
> I would expect that each of the things in our stack are in sync to the 
> millisecond, but it seems not. Is there any article or documentation about 
> how early/late a task is expected to run at?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/4dddb81c-9b89-4a1b-be52-b5feb9de5a04o%40googlegroups.com.


[google-appengine] Not able to run dev_appserver with Python 3 only environment

2020-08-12 Thread Ritesh Nadhani
Hello

I am getting back to GAE after many years. Things have definitely changed. 
As a new project, I got started with Python 37 runtime. My virtualenv is 
created using: python3 -m venv ENV and thus does not have python2.

When I try to run my app in local mode using dev_appserver.py (i am just 
trying to play around with the sample app from the documentation), I get:

dev_appserver.py app.yaml
ERROR: (dev_appserver) python2: command not found

I installed google-cloud-sdk using brew with: brew cask install 
google-cloud-sdk.

As of now, my only requirement for my app is GAE and datastore and I am 
hoping to be able to use the datastore emulator with the above.

Ritesh

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e9ffe3ea-04ae-4ff6-9368-3cb6fff62f98n%40googlegroups.com.