[google-appengine] How to debug 30 minute latency spikes on instance ?

2021-03-09 Thread 'Alex Fox' via Google App Engine
Hey,

I've recently deployed a node.js application to a flex environment and I am 
seeing some strange latency spikes of over 30 minutes. See below:
[image: Screenshot 2021-03-09 at 11.31.02.png]
CPU and memory usage are very low and I have checked the logs for any super 
long requests. 

Is there any way to determine what is causing this?

Thanks!
Alex

-- 
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/3bfe4c29-c497-45dc-9a4a-e4d9089f97den%40googlegroups.com.


[google-appengine] Will websockets ever come to GAE standard env?

2021-01-04 Thread 'Alex Fox' via Google App Engine
I have an application running on standard env but I now need websocket 
functionality. Is this likely to come to the standard env soon or should I 
switch to flex?

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/3d662475-7443-43d9-b29c-0b9900af991fn%40googlegroups.com.


Re: [google-appengine] Re: Nodejs Websockets with standard environment

2021-01-04 Thread 'Alex Fox' via Google App Engine
I heard that websockets for standard env is in the works, do we have an 
estimated launch date or is it just a rumour?

On Friday, November 20, 2020 at 3:18:08 AM UTC sujeshth...@gmail.com wrote:

> Standard environment does not support we sockets yet. 
> https://cloud.google.com/appengine/docs/the-appengine-environments 
> consider switching to flexible environment
>
> On Fri, 20 Nov 2020, 7:25 am 'Aditya' via Google App Engine, <
> google-a...@googlegroups.com> wrote:
>
>> The App Engine Standard Environment is capable of running reliably even 
>> under heavy load and with large amounts of data. You might want to consider 
>> modifying the scaling settings to suit your load. Disconnections can be 
>> caused due to several reasons, like latency triggering timeouts, or perhaps 
>> other network related issues. The flexible environment will automatically 
>> manage some settings, but your issue can probably be fixed after 
>> investigating the settings and logs.
>>
>> On Wednesday, November 18, 2020 at 11:40:20 AM UTC-5 
>> pierre.g...@gmail.com wrote:
>>
>>> Hi,
>>>
>>> I have a Twitch chat bot on a nodejs app engine. I am connecting to 
>>> Twitch through WebSocket but I get randomly disconnected from time to time. 
>>> (It usually lasts at least multiple hours before disconnecting.)
>>> Can this be related to the fact that I am not using the flex environment 
>>> ?
>>>
>>> Thank you,
>>> Pierre.
>>>
>> -- 
>> 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-appengi...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/c7e51f49-508d-4a84-ab34-7cd8b18186fcn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/5b592359-6388-43f6-a16a-6e73da2754e6n%40googlegroups.com.


[google-appengine] Re: Google App Engine: versioning with custom sub domains

2020-07-15 Thread 'Alex Fox' via Google App Engine
Hey Alexander,

This sounds like the functionality I want. Perhaps I need to experiment 
with a wild card certificate and avoid using the sub domains. 

Thanks,
Alex

On Tuesday, July 14, 2020 at 4:04:38 PM UTC+1 a.not...@gmail.com wrote:

> Alex,
>
> We are doing just what you describe, although we do it under the naked 
> domain.
>
> we have app.io pointing to appengine, which has a wildcard certificate 
> mapped.
> My appengine settings for custom domain are like this:
>
> custom domain name | cert | record type | data | alias
> *.app.io  | wildcard-certificate |  cname |  ghs.googlehosted.com. |   *
> app.io  | wildcard-certificate |  A |  xx.xx.xx.xx |  (none)
>
>
> all requests for app.io go to the default version.  We also have a 
> release candidate version deployed, named 'rc'
> Without any configuring all request for rc.app.io go automagically to the 
> rc version.
>
> This only works when you have the wildcard certifcate in place.  Just 
> adding custom domain mappings for each version will not work.
>
>
>
> Alexander
>
> On Friday, 10 July 2020 20:20:15 UTC+2, Alex Fox wrote:
>>
>> I'm trying to setup GAE with a custom sub domain and a specific version 
>> url.
>>
>> For example I have an app running with the following setup
>> *VERSION_ID: 1234*
>> *SERVICE_ID: my-app*
>> *PROJECT_ID: my-project*
>>
>> The provided url *https://1234-dot-my-app-dot-my-project.ew.r.appspot.com 
>> * works fine. 
>> But I can't get to work with my custom domain + sub domain. Googles 
>> documentation states the following urls are the same:
>>
>> *https://VERSION_ID-dot-default-dot-PROJECT_ID.REGION_ID.r.appspot.com 
>> *
>> *https://VERSION_ID.CUSTOM_DOMAIN *
>>
>> But when visiting *1234.api.mycustomdomain.com 
>> * it does not work. However 
>> *api.mycustomdomain.com 
>> * works, pointing to the latest running 
>> version of *my-app*
>>
>> What am I missing?
>> 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/9f7011b7-f5bf-45e6-b98f-13e246d9561fn%40googlegroups.com.


[google-appengine] Google App Engine: versioning with custom sub domains

2020-07-10 Thread 'Alex Fox' via Google App Engine
I'm trying to setup GAE with a custom sub domain and a specific version url.

For example I have an app running with the following setup
*VERSION_ID: 1234*
*SERVICE_ID: my-app*
*PROJECT_ID: my-project*

The provided url *https://1234-dot-my-app-dot-my-project.ew.r.appspot.com* 
works 
fine. But I can't get to work with my custom domain + sub domain. Googles 
documentation states the following urls are the same:

*https://VERSION_ID-dot-default-dot-PROJECT_ID.REGION_ID.r.appspot.com*
*https://VERSION_ID.CUSTOM_DOMAIN*

But when visiting *1234.api.mycustomdomain.com* it does not work. However 
*api.mycustomdomain.com* works, pointing to the latest running version of 
*my-app*

What am I missing?
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/b476f6b4-1bc1-4edc-9fc8-dce7cd5c19afn%40googlegroups.com.


[google-appengine] Re: Google Cloud Build - build.yaml & app.yaml in a sub directory not building correct source

2020-06-02 Thread 'Alex Fox' via Google App Engine
But what if the build file is within a sub directory, how can you set the 
dir to be its parent?

On Monday, June 1, 2020 at 8:44:27 PM UTC+1, David (Cloud Platform Support) 
wrote:
>
> When you use the dir field in a build step, you are setting the working 
> directory to its value and in this case, assuming your source files are not 
> in that working directory and from what you have mentioned that it’s 
> deploying empty, it’s not finding your source files and you can check this 
> if you go to your deployed application versions, under “diagnose” right 
> click on tools -> source and you will be able to see the files that were 
> deployed.
>

-- 
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/4080b19e-9f10-4958-9033-bc0f29c3e462%40googlegroups.com.


[google-appengine] Re: Google Cloud Build - build.yaml & app.yaml in a sub directory not building correct source

2020-05-29 Thread 'Alex Fox' via Google App Engine
Yes, I saw that SO issue but I couldn't work out what the correct dir: 
value should be.

In both cases the app deploy successfully but in the second case when 
accessing the url I receive a 500 error and the deployed code is only ~600 
bytes which suggests to me it's deployed an empty folder or something like 
that.

This leads me to believe I need to specify the source for the build step, 
but if I am running the cloudbuild from within a subfolder how do I escape 
up the folder tree, e.g. ../../ ?


On Friday, May 29, 2020 at 2:29:28 PM UTC+1, Olu wrote:
>
> Hello, Alex
>
> Can you please provide the specific error obtained while using your second 
> setup that is failing? This will provide more context. Yes, as indicated in 
> this Stackoverflow link[1], it is necessary to specify the DIR in the 
> Cloudbuild.yaml whenever you are trying to trigger your build configuration 
> in a subdirectory. Additionally, with information available to me, I 
> understand you cannot have the app.yaml and the cloudbuild.yaml in the same 
> directory if you are deploying in a non-custom runtime 
>
> [1]
> https://stackoverflow.com/questions/52725046/google-cloud-builder-how-to-trigger-build-configuration-in-a-subdirectory
>

-- 
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/4a8f5338-1c96-4c00-8857-6705400a464e%40googlegroups.com.


[google-appengine] Google Cloud Build - build.yaml & app.yaml in a sub directory not building correct source

2020-05-29 Thread 'Alex Fox' via Google App Engine
Hey,

I'm having trouble setting up my yaml files for google app engine. The 
configuration works correctly when my app.yaml file is in the root of the 
project but if it is within a subdirectory it does not build the correct 
source. I suspect I need to set the `dir:` option in the build config, but 
I have tried multiple variations and I can't get it to work.

Working file structure, deployed app is ~3mb in size.

```
src
deployment
└── staging
└── build.yaml
app.staging.yaml


# build.yaml
steps:
- name: node:12
  entrypoint: yarn
- name: node:12
  entrypoint: yarn
  args: ['build']
- name: "gcr.io/cloud-builders/gcloud"
  args: ["app", "deploy", "app.staging.yaml"]
timeout: "1800s"
```

Not working file structure, deployed app is ~1kb in size.

```
src
deployment
└── staging
└── build.yaml
└── app.yaml


# build.yaml
steps:
- name: node:12
  entrypoint: yarn
- name: node:12
  entrypoint: yarn
  args: ['build']
- name: "gcr.io/cloud-builders/gcloud"
  args: ["app", "deploy", "deployment/staging/app.yaml"]
timeout: "1800s"
```

In both scenarios I am kicking off the deployment with:
`gcloud builds submit --config deployment/staging/build.yaml`

What should my `dir:` be set to in the build.yaml steps so that the build 
step knows to build from root? Is there any way to debug this locally 
without having to upload the source every time?

Thanks!
A

-- 
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/612e4533-0dd8-42fb-91b4-ea9a58b7f563%40googlegroups.com.


[google-appengine] Re: next.js app taking 15-25 seconds to load from “cold” on google app engine

2020-04-22 Thread 'Alex Fox' via Google App Engine
Yes.

I have implemented the warm up requests which has improved the performance 
greatly. 

So I understand, when a new instance is created what commands are run? Does 
it have to do a npm install and copy over resources, or is there more?

Thanks!


On Tuesday, April 21, 2020 at 7:12:24 PM UTC+1, Katayoon (Cloud Platform 
Support) wrote:
>
> Hello,
>
> I would like to add that whenever you send a start request 
> 
>  
> an instance is brought into existence and is initialized. So it needs some 
> time to load the required libraries and resources to handle the request.
>
> You may consider using warmup requests 
> 
>  
> to load application code into an instance ahead of time. As explained in this 
> document 
> ,
>  
> warmup requests reduce request and response latency during the time when 
> your app's code is being loaded to a newly created instance. You can 
> provision min_idle_instances 
> 
>  
> afterward so that a number of instances be kept running and ready to serve 
> traffic without lag.
>
>

-- 
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/36492fc1-3a01-4db2-a199-77cda7e7e3ea%40googlegroups.com.


[google-appengine] Re: next.js app taking 15-25 seconds to load from “cold” on google app engine

2020-04-21 Thread 'Alex Fox' via Google App Engine
So I managed to improved the load times by enabling "serverless" in the 
next.js settings. This is enabled by default when deploying to ziet. I also 
added the /_ah/start warmup which essentially just keeps the instance alive.

All getInitialProps are just returning some basic context and I'm using GAE 
standard with the default server size.

Still a bit baffled but it seems to be working ok now.


On Monday, April 20, 2020 at 9:38:06 PM UTC+1, Blaine Garrett wrote:
>
> That seems a bit odd.  I have a next.js app on Standard and goes from cold 
> start to content paint  in approx 5 seconds with data fetching on the 
> server.
>
>
> What instance type and size are you using?
> Does your getInitialProps make any REST calls, access a database, etc? If 
> so, are those cold starting as well?
> If you are using scaling that leverages /_ah/start handler, is it 
> accidentally doing REST Calls, etc etc?
> Do you use a custom server that might be doing something odd?
>
>
>
>
>
>
> On Monday, April 20, 2020 at 7:25:37 AM UTC-5, Alex Fox wrote:
>>
>>
>> I am deploying a next.js app to a Google App Engine (standard) but I am 
>> having trouble with cold start times.
>>
>>
>> I am building locally then deploying the .next folder to GAE. On the 
>> first boot it takes 15-25 seconds to boot up. Looking at the logs I can see 
>> a log for a very long GET 200 request but there's not really any 
>> information about what is going on. 
>>
>>
>> See image below:
>>
>>
>> [image: Screenshot 2020-04-18 at 17.13.29.png]
>>
>>
>>
>> When I run yarn start locally it boots up in < 1, which as far as I 
>> understand is running the same production build? It is almost as though GAE 
>> is doing a build before it eventually deploys..
>>
>>
>> Any pointers would be immensely appreciated!
>>
>>
>> Alex
>>
>

-- 
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/88e53613-13ae-4ddd-9d84-28ef6c8096c6%40googlegroups.com.


[google-appengine] next.js app taking 15-25 seconds to load from “cold” on google app engine

2020-04-20 Thread 'Alex Fox' via Google App Engine


I am deploying a next.js app to a Google App Engine (standard) but I am 
having trouble with cold start times.


I am building locally then deploying the .next folder to GAE. On the first 
boot it takes 15-25 seconds to boot up. Looking at the logs I can see a log 
for a very long GET 200 request but there's not really any information 
about what is going on. 


See image below:


[image: Screenshot 2020-04-18 at 17.13.29.png]



When I run yarn start locally it boots up in < 1, which as far as I 
understand is running the same production build? It is almost as though GAE 
is doing a build before it eventually deploys..


Any pointers would be immensely appreciated!


Alex

-- 
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/bf380aa5-e30f-4ad7-994b-9cc250b2fa24%40googlegroups.com.