[google-appengine] Re: Auto scaling to basic scaling migrate

2022-05-17 Thread 'Nikhil Patil' via Google App Engine
To update you I managed to get the root cause. Django settings.py has  
SECURE_SSL_REDIRECT configuration. If I enable it(I must), I get above 
issue,if I disable then the instance starts successfully. Do you have any 
idea?


On Saturday, May 14, 2022 at 8:12:47 AM UTC+9 Osvaldo Lopez Acuña wrote:

> Were you able to change your App Engine settings the way Ernesto suggested?
>
> The issue ended on May 6, as you can see in the shared link, and App 
> Engine was not affected.
>
>
> On Thursday, May 12, 2022 at 10:46:30 PM UTC-5 nikhilhem...@rakuten.com 
> wrote:
>
>> Any update on this?
>>
>>
>> On Saturday, May 7, 2022 at 5:49:29 AM UTC+9 Ernesto Contreras Pinon 
>> wrote:
>>
>>> Yes, using the app.yaml file, you can set the type of scaling that is 
>>> used by your App Engine app. You can specifically see the reference 
>>> 
>>>  
>>> on how the scaling elements are to be syntactically added in your app.yaml 
>>> file. Since this file contains the specifications for the deployment of 
>>> your app, it would be the proper place to change the settings. 
>>>
>>> Have you recently encountered this issue? There is currently an existing 
>>> incident 
>>>  that 
>>> is affecting multiple Google Cloud products which could be related to the 
>>> errors you are seeing.
>>> On Friday, May 6, 2022 at 2:36:23 AM UTC-5 nikhilhem...@rakuten.com 
>>> wrote:
>>>
 I was using autoscaling but it has 10 min request timeout,so I want to 
 change it to basic scaling.
 Does changing app.yaml will do the thing? or I need more settings.
 runtime: python39 service: dev-app instance_class: B1 basic_scaling: 
 max_instances: 10 idle_timeout: 10m
 I am getting error as
 The request failed because the instance could not start 
 successfullyProcess terminated because it failed to respond to the start 
 request with an HTTP status code of 200-299 or 404.

>>>

-- 
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/f16c0809-a60f-4cd5-846b-9c4454260cf7n%40googlegroups.com.


[google-appengine] Re: Auto scaling to basic scaling migrate

2022-05-12 Thread 'Nikhil Patil' via Google App Engine
Any update on this?


On Saturday, May 7, 2022 at 5:49:29 AM UTC+9 Ernesto Contreras Pinon wrote:

> Yes, using the app.yaml file, you can set the type of scaling that is used 
> by your App Engine app. You can specifically see the reference 
> 
>  
> on how the scaling elements are to be syntactically added in your app.yaml 
> file. Since this file contains the specifications for the deployment of 
> your app, it would be the proper place to change the settings. 
>
> Have you recently encountered this issue? There is currently an existing 
> incident  
> that is affecting multiple Google Cloud products which could be related to 
> the errors you are seeing.
> On Friday, May 6, 2022 at 2:36:23 AM UTC-5 nikhilhem...@rakuten.com wrote:
>
>> I was using autoscaling but it has 10 min request timeout,so I want to 
>> change it to basic scaling.
>> Does changing app.yaml will do the thing? or I need more settings.
>> runtime: python39 service: dev-app instance_class: B1 basic_scaling: 
>> max_instances: 10 idle_timeout: 10m
>> I am getting error as
>> The request failed because the instance could not start 
>> successfullyProcess terminated because it failed to respond to the start 
>> request with an HTTP status code of 200-299 or 404.
>>
>

-- 
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/3c6e31be-5a88-462b-8541-cacb0d81f6cfn%40googlegroups.com.


[google-appengine] Re: App Engine doesn't send response leads to timeout at client

2022-05-12 Thread 'Nikhil Patil' via Google App Engine
I tried but it seams 
   
   - The dev_appserver tool does not support development of Python 3 apps 
   on Windows.


https://cloud.google.com/appengine/docs/standard/python3/tools/local-devserver-command
On Saturday, May 7, 2022 at 7:22:15 AM UTC+9 Rogelio Monter Rodriguez wrote:

> Have you tried debugging your app locally using the local development 
> server 
> 
>  
> or using the local development server 
> 
> ?
> On Friday, May 6, 2022 at 2:06:58 AM UTC-5 nikhilhem...@rakuten.com wrote:
>
>> To Explain my overall situation, My app response is lost though the API 
>> program executes as expected. This happens randomly.
>>
>> here is my app.yaml
>>
>> #
>> # Copyright 2021 Google LLC
>> #
>> # Licensed under the Apache License, Version 2.0 (the "License");
>> # you may not use this file except in compliance with the License.
>> # You may obtain a copy of the License at
>> #
>> # http://www.apache.org/licenses/LICENSE-2.0
>> #
>> # Unless required by applicable law or agreed to in writing, software
>> # distributed under the License is distributed on an "AS IS" BASIS,
>> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>> # See the License for the specific language governing permissions and
>> # limitations under the License.
>> #
>>
>> # [START django_app]
>> # [START gaestd_py_django_app_yaml]
>>
>> ## std + dev-apc
>> #runtime: python39
>> #service: dev-apc
>> #instance_class: F1
>>
>>
>> handlers:
>> # This configures Google App Engine to serve the files in the app's static
>> # directory.
>> - url: /static
>> static_dir: staticfiles/
>>
>> # This handler routes all requests not caught above to your main app. It 
>> is
>> # required when static routes are defined, but can be omitted (along with
>> # the entire handlers section) when there are no static files defined.
>> - url: /.*
>> script: auto
>> # [END gaestd_py_django_app_yaml]
>> # [END django_app]
>>
>> On Friday, April 22, 2022 at 8:11:55 AM UTC+9 Horace (Cloud Platform 
>> Support) wrote:
>>
>>> Hello
>>>
>>> Since we don't have visibility on your project to check your App Engine 
>>> settings including your yaml file and further use our internal tools to 
>>> find out what is happening, kindly take a look at your configuration such 
>>> as your max instances, idle time out, and scaling. From your log, the 
>>> ‘Quitting on terminated signal’ indicates there is a shutdown of an 
>>> instance [1], it could be that there are no requests hence the instance was 
>>> shutdown and there could be a spike in subsequent requests that the 
>>> instance was not ready to respond since there are no instances available.
>>>
>>> Lastly, kindly take a look at your scaling, do note that there is no 
>>> guaranteed uptime for basic and manual scaling [3]. Due to this behavior, 
>>> if you want a higher Monthly Uptime Percentage, try to configure your 
>>> instance with automatic scaling. You can set the max_instances and 
>>> max_idle_instances to values that better achieve your architecture in the 
>>> app.yaml file [4]
>>>
>>> [1] 
>>> https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#shutdown
>>>
>>> [2] 
>>> https://cloud.google.com/appengine/docs/standard/python3/configuring-warmup-requests
>>>
>>> [3] 
>>> https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_uptime
>>>
>>> [4] 
>>> https://cloud.google.com/appengine/docs/standard/go/config/appref#scaling_elements
>>>
>>>
>>> On Thursday, April 21, 2022 at 10:30:00 AM UTC-4 
>>> nikhilhem...@rakuten.com wrote:
>>>
 I think no issue on application side. I have logged upto last line of 
 my post method and after that is return response. 
 *Code:*

 class myView(generics.ListCreateAPIView):
 permission_classes = (IsAuthenticated,)
 http_method_names = ['get', 'post']
 search_fields = ['some', 'thing', 'here'']
 filter_backends = (DynamicSearchFilter,)
 pagination_class = PageNumberPagination
 serializer_class = mySerializer
 queryset = mymodel.objects.all().order_by("-update_date")

 def __init__(self, **kwargs):
 .
 .
 .


 def create(self, request, *args, **kwargs):
 .
 .
 .
 logger.info(f"Returning response of size {len(response_data)}")

 return Response(response_data, content_type='application/json')





 *here are my logs.*[
   {
 "textPayload": "2022-04-14 03:05:21,344 INFO app.myview  create 
  Returning response of size 11",
 "insertId": "62578f71000541533a99d6a0",
 "resource": {
   "type": "gae_app",
   "labels": {
 "project_id": "my-prj",
 "module_id": "myapp",
 "zone": "asia-northeast1-1",
 

[google-appengine] Auto scaling to basic scaling migrate

2022-05-06 Thread 'Nikhil Patil' via Google App Engine
I was using autoscaling but it has 10 min request timeout,so I want to 
change it to basic scaling.
Does changing app.yaml will do the thing? or I need more settings.
runtime: python39 service: dev-app instance_class: B1 basic_scaling: 
max_instances: 10 idle_timeout: 10m
I am getting error as
The request failed because the instance could not start successfullyProcess 
terminated because it failed to respond to the start request with an HTTP 
status code of 200-299 or 404.

-- 
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/aa44b10f-726b-4f58-bd1d-6017d43f6432n%40googlegroups.com.


[google-appengine] Re: App Engine doesn't send response leads to timeout at client

2022-05-06 Thread 'Nikhil Patil' via Google App Engine
To Explain my overall situation, My app response is lost though the API 
program executes as expected. This happens randomly.

here is my app.yaml

#
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# [START django_app]
# [START gaestd_py_django_app_yaml]

## std + dev-apc
#runtime: python39
#service: dev-apc
#instance_class: F1


handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
- url: /static
static_dir: staticfiles/

# This handler routes all requests not caught above to your main app. It is
# required when static routes are defined, but can be omitted (along with
# the entire handlers section) when there are no static files defined.
- url: /.*
script: auto
# [END gaestd_py_django_app_yaml]
# [END django_app]

On Friday, April 22, 2022 at 8:11:55 AM UTC+9 Horace (Cloud Platform 
Support) wrote:

> Hello
>
> Since we don't have visibility on your project to check your App Engine 
> settings including your yaml file and further use our internal tools to 
> find out what is happening, kindly take a look at your configuration such 
> as your max instances, idle time out, and scaling. From your log, the 
> ‘Quitting on terminated signal’ indicates there is a shutdown of an 
> instance [1], it could be that there are no requests hence the instance was 
> shutdown and there could be a spike in subsequent requests that the 
> instance was not ready to respond since there are no instances available.
>
> Lastly, kindly take a look at your scaling, do note that there is no 
> guaranteed uptime for basic and manual scaling [3]. Due to this behavior, 
> if you want a higher Monthly Uptime Percentage, try to configure your 
> instance with automatic scaling. You can set the max_instances and 
> max_idle_instances to values that better achieve your architecture in the 
> app.yaml file [4]
>
> [1] 
> https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#shutdown
>
> [2] 
> https://cloud.google.com/appengine/docs/standard/python3/configuring-warmup-requests
>
> [3] 
> https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_uptime
>
> [4] 
> https://cloud.google.com/appengine/docs/standard/go/config/appref#scaling_elements
>
>
> On Thursday, April 21, 2022 at 10:30:00 AM UTC-4 nikhilhem...@rakuten.com 
> wrote:
>
>> I think no issue on application side. I have logged upto last line of my 
>> post method and after that is return response. 
>> *Code:*
>>
>> class myView(generics.ListCreateAPIView):
>> permission_classes = (IsAuthenticated,)
>> http_method_names = ['get', 'post']
>> search_fields = ['some', 'thing', 'here'']
>> filter_backends = (DynamicSearchFilter,)
>> pagination_class = PageNumberPagination
>> serializer_class = mySerializer
>> queryset = mymodel.objects.all().order_by("-update_date")
>>
>> def __init__(self, **kwargs):
>> .
>> .
>> .
>>
>>
>> def create(self, request, *args, **kwargs):
>> .
>> .
>> .
>> logger.info(f"Returning response of size {len(response_data)}")
>>
>> return Response(response_data, content_type='application/json')
>>
>>
>>
>>
>>
>> *here are my logs.*[
>>   {
>> "textPayload": "2022-04-14 03:05:21,344 INFO app.myview  create 
>>  Returning response of size 11",
>> "insertId": "62578f71000541533a99d6a0",
>> "resource": {
>>   "type": "gae_app",
>>   "labels": {
>> "project_id": "my-prj",
>> "module_id": "myapp",
>> "zone": "asia-northeast1-1",
>> "version_id": "20220406t140722"
>>   }
>> },
>> "timestamp": "2022-04-14T03:05:21.344403Z",
>> "labels": {
>>   "clone_id": 
>> "00c61b117cd9f4551488432b6f7441914e77d3c1dae0ed84f783550c94129238df03e3311f8837126c38d73af6577b91baa8a9c0ed6b68487259cdaad779413ebb5f1bf9d9ef33fa5de9b7b2f6d7a5"
>> },
>> "logName": "projects/my-prj/logs/stderr",
>> "receiveTimestamp": "2022-04-14T03:05:21.478498355Z"
>>   },
>>   {
>> "textPayload": "[start] 2022/04/14 03:20:24.968447 Quitting on 
>> terminated signal",
>> "insertId": "625792f8000ec856db894b8e",
>> "resource": {
>>   "type": "gae_app",
>>   "labels": {
>> "module_id": "myapp",
>> "zone": "asia-northeast1-1",
>> "version_id": "20220406t140722",
>> "project_id": "my-prj"
>>   }
>> },
>> "timestamp": "2022-04-14T03:20:24.968790Z",
>> "labels": {
>>   "clone_id": 
>> 

[google-appengine] Re: App Engine doesn't send response leads to timeout at client

2022-04-21 Thread 'Nikhil Patil' via Google App Engine
I think no issue on application side. I have logged upto last line of my 
post method and after that is return response. 
*Code:*

class myView(generics.ListCreateAPIView):
permission_classes = (IsAuthenticated,)
http_method_names = ['get', 'post']
search_fields = ['some', 'thing', 'here'']
filter_backends = (DynamicSearchFilter,)
pagination_class = PageNumberPagination
serializer_class = mySerializer
queryset = mymodel.objects.all().order_by("-update_date")

def __init__(self, **kwargs):
.
.
.


def create(self, request, *args, **kwargs):
.
.
.
logger.info(f"Returning response of size {len(response_data)}")

return Response(response_data, content_type='application/json')





*here are my logs.*[
  {
"textPayload": "2022-04-14 03:05:21,344 INFO app.myview  create 
 Returning response of size 11",
"insertId": "62578f71000541533a99d6a0",
"resource": {
  "type": "gae_app",
  "labels": {
"project_id": "my-prj",
"module_id": "myapp",
"zone": "asia-northeast1-1",
"version_id": "20220406t140722"
  }
},
"timestamp": "2022-04-14T03:05:21.344403Z",
"labels": {
  "clone_id": 
"00c61b117cd9f4551488432b6f7441914e77d3c1dae0ed84f783550c94129238df03e3311f8837126c38d73af6577b91baa8a9c0ed6b68487259cdaad779413ebb5f1bf9d9ef33fa5de9b7b2f6d7a5"
},
"logName": "projects/my-prj/logs/stderr",
"receiveTimestamp": "2022-04-14T03:05:21.478498355Z"
  },
  {
"textPayload": "[start] 2022/04/14 03:20:24.968447 Quitting on 
terminated signal",
"insertId": "625792f8000ec856db894b8e",
"resource": {
  "type": "gae_app",
  "labels": {
"module_id": "myapp",
"zone": "asia-northeast1-1",
"version_id": "20220406t140722",
"project_id": "my-prj"
  }
},
"timestamp": "2022-04-14T03:20:24.968790Z",
"labels": {
  "clone_id": 
"00c61b117cd9f4551488432b6f7441914e77d3c1dae0ed84f783550c94129238df03e3311f8837126c38d73af6577b91baa8a9c0ed6b68487259cdaad779413ebb5f1bf9d9ef33fa5de9b7b2f6d7a5"
},
"logName": "projects/my-prj/logs/%2Fvar%2Flog%2Fgoogle_init.log",
"receiveTimestamp": "2022-04-14T03:20:24.971407404Z"
  },
  {
"textPayload": "[2022-04-14 03:20:24 +] [10] [INFO] Handling 
signal: term",
"insertId": "625792f8000ed2e870511881",
"resource": {
  "type": "gae_app",
  "labels": {
"project_id": "my-prj",
"version_id": "20220406t140722",
"module_id": "myapp",
"zone": "asia-northeast1-1"
  }
},
"timestamp": "2022-04-14T03:20:24.971496Z",
"labels": {
  "clone_id": 
"00c61b117cd9f4551488432b6f7441914e77d3c1dae0ed84f783550c94129238df03e3311f8837126c38d73af6577b91baa8a9c0ed6b68487259cdaad779413ebb5f1bf9d9ef33fa5de9b7b2f6d7a5"
},
"logName": "projects/my-prj/logs/stderr",
"receiveTimestamp": "2022-04-14T03:20:24.975480517Z"
  },
  {
"textPayload": "[2022-04-14 03:20:24 +] [24] [INFO] Worker exiting 
(pid: 24)",
"insertId": "625792f8000f38c249d53b78",
"resource": {
  "type": "gae_app",
  "labels": {
"module_id": "myapp",
"project_id": "my-prj",
"zone": "asia-northeast1-1",
"version_id": "20220406t140722"
  }
},
"timestamp": "2022-04-14T03:20:24.997570Z",
"labels": {
  "clone_id": 
"00c61b117cd9f4551488432b6f7441914e77d3c1dae0ed84f783550c94129238df03e3311f8837126c38d73af6577b91baa8a9c0ed6b68487259cdaad779413ebb5f1bf9d9ef33fa5de9b7b2f6d7a5"
},
"logName": "projects/my-prj/logs/stderr",
"receiveTimestamp": "2022-04-14T03:20:25.306874254Z"
  },
  {
"textPayload": "[2022-04-14 03:20:25 +] [27] [INFO] Worker exiting 
(pid: 27)",
"insertId": "625792f9530acac710eb",
"resource": {
  "type": "gae_app",
  "labels": {
"version_id": "20220406t140722",
"module_id": "myapp",
"zone": "asia-northeast1-1",
"project_id": "my-prj"
  }
},
"timestamp": "2022-04-14T03:20:25.021258Z",
"labels": {
  "clone_id": 
"00c61b117cd9f4551488432b6f7441914e77d3c1dae0ed84f783550c94129238df03e3311f8837126c38d73af6577b91baa8a9c0ed6b68487259cdaad779413ebb5f1bf9d9ef33fa5de9b7b2f6d7a5"
},
"logName": "projects/my-prj/logs/stderr",
"receiveTimestamp": "2022-04-14T03:20:25.306874254Z"
  },
  {
"textPayload": "[2022-04-14 03:20:25 +] [25] [INFO] Worker exiting 
(pid: 25)",
"insertId": "625792f953b58a77b5a5",
"resource": {
  "type": "gae_app",
  "labels": {
"module_id": "myapp",
"zone": "asia-northeast1-1",
"project_id": "my-prj",
"version_id": "20220406t140722"
  }
},
"timestamp": "2022-04-14T03:20:25.021429Z",
"labels": {
  "clone_id": 
"00c61b117cd9f4551488432b6f7441914e77d3c1dae0ed84f783550c94129238df03e3311f8837126c38d73af6577b91baa8a9c0ed6b68487259cdaad779413ebb5f1bf9d9ef33fa5de9b7b2f6d7a5"
},
"logName": "projects/my-prj/logs/stderr",
"receiveTimestamp": "2022-04-14T03:20:25.306874254Z"
  

[google-appengine] App Engine doesn't send response leads to timeout at client

2022-04-17 Thread 'Nikhil Patil' via Google App Engine
I have Django application deployed on App Engine standard environment. Not 
all the time but sometimes App engine doesn't send response back which 
leads to timeout at client side. I have logged the response contents just 
before sending response in django code and the contents are correct. All 
the source code execution is as expected just no response . Please suggest 
me if anyone had same kind of issue.

-- 
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/407bfd59-6cf1-46dd-94e9-f0d63bc2cd34n%40googlegroups.com.