[google-appengine] Re: Deployment Fails with Client Error(400) on appcfg.py update and with [13] An internal error occurred on gcloud app deploy.

2017-08-15 Thread 'Kenworth (Google Cloud Platform)' via Google App Engine
A thread like this is off-topic for Google Groups, and should be posted to 
StackOverflow . 
If you think this is a Google Cloud Platform defect, you can file an issue 
report  for better tracking purposes. While 
I'd like to help you, this isn't the place to do it. This forum isn't meant 
for specific 1-on-1 technical issues, but for general discussion of the 
platform and its services. With StackOverflow 
, which we 
also monitor, you'll be in touch with a much larger user-base of people who 
are going to help you, and in a format which is designed for that purpose. 
Check out our community support page 
 for the list of tags 
we monitor. 



-- 
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 post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9b0ed2cd-e57a-4bd3-838f-f0ad513d7ea7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Abridged summary of google-appengine@googlegroups.com - 16 updates in 10 topics

2017-08-15 Thread Junal Rahman
Junal Rahman
DevDec - Developers Deck 

email: ju...@devdec.com   |  phone: +1 (647) 895 3832

On Tue, Aug 15, 2017 at 3:01 PM,  wrote:

> google-appengine@googlegroups.com
> 
>  Google
> Groups
> 
> 
> Today's topic summary
> View all topics
> 
>
>- Deployment Fails with Client Error(400) on appcfg.py update and with
>[13] An internal error occurred on gcloud app deploy.
><#m_-7309821316577741103_group_thread_0> - 1 Update
>- 502 Bad gateway error <#m_-7309821316577741103_group_thread_1> - 1
>Update
>- Datastore: Problem updating entities
><#m_-7309821316577741103_group_thread_2> - 2 Updates
>- Datastore "checkNotNull" Error
><#m_-7309821316577741103_group_thread_3> - 2 Updates
>- "Sandbox prevented access to" INFO messages
><#m_-7309821316577741103_group_thread_4> - 1 Update
>- Not able to fully use K 80 GPU on GCP
><#m_-7309821316577741103_group_thread_5> - 1 Update
>- Cursor on query working on local dev but not in production.
><#m_-7309821316577741103_group_thread_6> - 1 Update
>- Multiple GAE instances being torn down for no apparent reason and
>problems with Instances view <#m_-7309821316577741103_group_thread_7>
>- 1 Update
>- [Google Cloud Insiders] Re: Does GCS in GAE standard development
>server still work for you? <#m_-7309821316577741103_group_thread_8> - 1
>Update
>- Cannot Use Google Cloud Storage on Local Environment with PHP
>Standard Env <#m_-7309821316577741103_group_thread_9> - 5 Updates
>
> Deployment Fails with Client Error(400) on appcfg.py update and with [13]
> An internal error occurred on gcloud app deploy.
> 
> 中村智 : Aug 15 11:44AM -0700
>
> I could deploy my app using appcfg.py since last thursday, but today I
> can't deploy it with Client Error(400).
> I tried using gcloud app deploy. then I get these logs.
>
> 2017-08-16 03:18:55,159 ...more
> 
> Back to top <#m_-7309821316577741103_digest_top>
> 502 Bad gateway error
> 
> Tomas Erlingsson : Aug 15 10:00AM -0700
>
> Did this get resolved? We have an flex java app running in development
> with almost no traffic. We are constantly getting 502 telling us to try in
> 30sec and our server app is rebooted many times a ...more
> 
> Back to top <#m_-7309821316577741103_digest_top>
> Datastore: Problem updating entities
> 
> Filipe Caldas : Aug 15 03:00AM -0700
>
> The job was actually doing slightly more than just setting a property to a
> default value, it also was doing a .strip() in one of the fields due to an
> error in our insert scripts, so in some cases ...more
> 
> "Shivam(Google Cloud Support)" : Aug 15 10:04AM
> -0700
>
> The job could tend to be slow for such amount of entities following the
> example here
>  schema#updating-existing-entities>.
> The solution for ...more
> 
> Back to top <#m_-7309821316577741103_digest_top>
> Datastore "checkNotNull" Error
> 
> Kat : Aug 14 01:29PM -0700
>
> I AM LOSING MY F***ING MIND OVER THIS.
>
> For over a year now I've been learning web development using Google Cloud
> Platform and studying online resources. I've gone through an excruciating
> ...more
> 
> "Kenworth (Google Cloud Platform)" : Aug 14 07:15PM
> -0700
>
> A thread like this is off-topic for Google Groups, and should be posted to
> StackOverflow  engine>.
> While I'd like to help you, this isn't the ...more
> 
> Back to top <#m_-7309821316577741103_digest_top>
> "Sandbox prevented access to" INFO messages
> 

[google-appengine] Deployment Fails with Client Error(400) on appcfg.py update and with [13] An internal error occurred on gcloud app deploy.

2017-08-15 Thread 中村智
I could deploy my app using appcfg.py since last thursday, but today I 
can't deploy it with Client Error(400).
I tried using gcloud app deploy. then I get these logs.

2017-08-16 03:18:55,159 DEBUGrootOperation [apps/hitois-app/
operations/b9f147cf-ec8f-44fa-9087-9218a8e360df] complete. Result: {

 

"metadata": { 

"target": "apps/hitois-app/services/backjob/versions/9", 

"method": "google.appengine.v1.Versions.CreateVersion", 

"user": "sato...@kinois.net", 

"insertTime": "2017-08-15T18:18:41.748Z", 

"ephemeralMessage": "Copying 52 application files and 448 static 
files.", 

"endTime": "2017-08-15T18:18:46.458Z", 

"@type": 
"type.googleapis.com/google.appengine.v1.OperationMetadataV1" 

}, 

"done": true, 

"name": 
"apps/hitois-app/operations/b9f147cf-ec8f-44fa-9087-9218a8e360df", 

"error": { 

"message": "An internal error occurred.", 

"code": 13 

} 

} 

2017-08-16 03:18:55,160 DEBUGroot(gcloud.app.deploy) Error 
Response: [13] An internal error occurred. 

Traceback (most recent call last): 

  File "/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", 
line 811, in Execute 

resources = args.calliope_command.Run(cli=self, args=args) 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", 
line 784, in Run 

resources = command_instance.Run(args) 

  File "/Users/satorun/google-cloud-sdk/lib/surface/app/deploy.py", line 62, 
in Run 

args, api_client, runtime_builder_strategy=runtime_builder_strategy) 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py"
, line 405, in RunDeploy 

args.image_url, all_services, app.gcrDomain) 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py"
, line 249, in Deploy 

endpoints_info) 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py"
, line 171, in DeployService 

message=message) 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py"
, line 206, in WaitForOperation 

sleep_ms=retry_interval) 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", 
line 266, in WaitFor 

sleep_ms=sleep_ms) 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/core/util/retry.py", 
line 222, in RetryOnResult 

if not should_retry(result, state): 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", 
line 260, in _IsNotDone 

return not poller.IsDone(operation) 

  File 
"/Users/satorun/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py"
, line 131, in IsDone 

encoding.MessageToPyValue(operation.error))) 

OperationError: Error Response: [13] An internal error occurred.


Because I changed few files, so I Restored them, and retry to deploy, but 
same Error has occurred.

I have some apps, Except for this application, I can deploy all apps.


yamls(frontend app.yaml / backend backjob.yaml) of App that can not be 
deployed setting is bellow.


app.yaml
application: hitois-app
version: 9
runtime: python27
instance_class: F2
automatic_scaling:
  min_idle_instances: 1
  max_idle_instances: 1
  min_pending_latency: automatic
  max_pending_latency: automatic
api_version: 1
threadsafe: true

inbound_services:
- warmup

default_expiration: "7d"

handlers:
- url: /stylesheets
  static_dir: sites/static/stylesheets

- url: /javascripts
  static_dir: sites/static/javascripts
  expiration: "0m"

- url: /images
  static_dir: sites/static/images

- url: /.*
  script: main.app

libraries:
- name: django
  version: "1.4"

- name: PIL
  version: "1.1.7"

- name: ssl
  version: "latest"


backjob.yaml
application: hitois-app
module: backjob
version: 9
runtime: python27
instance_class: B1
basic_scaling:
  max_instances: 2
  idle_timeout: 1m
api_version: 1
threadsafe: true

inbound_services:
- warmup

default_expiration: "7d"

handlers:
- url: /stylesheets
  static_dir: sites/static/stylesheets

- url: /javascripts
  static_dir: sites/static/javascripts
  expiration: "0m"

- url: /images
  static_dir: sites/static/images

- url: /.*
  script: main.app

libraries:
- name: django
  version: "1.4"

- name: PIL
  version: "1.1.7"

- name: ssl
  version: "latest"


I want to deploy new version. so please help me.

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 post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/663a9c96-0bd6-4ec8-ab54-3e5d850f98b7%40googlegroups.co

Re: [google-appengine] Re: 502 Bad gateway error

2017-08-15 Thread Tomas Erlingsson
Did this get resolved?  We have an flex java app running in development 
with almost no traffic. We are constantly getting 502 telling us to try in 
30sec and our server app is rebooted many times a day. I am running this 
locally without any problems. Not seeing any errors in the log.

On Friday, 10 February 2017 06:07:26 UTC, Vinay Chitlangia wrote:
>
>
>
> On Thu, Feb 9, 2017 at 7:52 PM, 'Nicholas (Google Cloud Support)' via 
> Google App Engine > wrote:
>
>> I realize that we've already begun investigating this here but I think 
>> this would be most appropriate for the App Engine public issue tracker.  
>> The issue is leading to an increasingly specific situation and I suspect 
>> will require some exchange of code/project to reproduce the behavior you've 
>> described.  We monitor that issue tracker closely.
>>
>> When filing a new issue on the tracker, please link back to this thread 
>> for context while posting a link to the issue here so that others in the 
>> community can see the whole picture.
>>
>>- Be sure to include the latest logs for related to the *502*s.  When 
>>viewing the logs in Stackdriver Logging for instance, include *All 
>>logs* rather than just *request_log* as *nginx.error*, *stderr*, 
>>*stdout* and *vm.** logs may reveal clues as to a root cause.
>>- Mention if your are using any middleware like servlet filters that 
>>may receive request before that actual handler
>>- Lastly, include what the CPU and/or memory usage looks like on the 
>>instance(s) at the time of the 502s.  Screenshots of *Utilization *and 
>>*Memory Usage* graphs from the Developers Console will likely be 
>>sufficient
>>
>> I look forward to this issue report.
>>
> https://code.google.com/p/googleappengine/issues/detail?id=13543
> The logs are "All logs" around the time of the incident, however as a 
> copy/paste from the browser. Couldnt retrieve any logs using gcloud beta 
> logging read. This is the command I tried:
> gcloud beta logging read 'timestamp >= "2017-02-11T03:00:00Z" AND 
> timestamp <="2017-02-12T03:05:00Z"' 
>
>>
>> On Wednesday, February 8, 2017 at 1:24:01 PM UTC-5, Vinay Chitlangia 
>> wrote:
>>>
>>>
>>>
>>> On Wed, Feb 8, 2017 at 10:29 PM, 'Nicholas (Google Cloud Support)' via 
>>> Google App Engine > wrote:
>>>
 Hey Vinay Chitlangia,

 Thanks for some preliminary troubleshooting and linking this 
 interesting article.  App Engine runs Nginx processes to handle routes to 
 your application's handlers.  Handlers serving static assets for instance 
 are handled by this Nginx process and the resources are served directly, 
 thus bypassing the application altogether to save on precious application 
 resources.

 The Nginx process will often serve a *502* if the application raises 
 an exception, an internal API call raises an exception or if the request 
 simply takes too long.  As such, the status code by itself does not tell 
 us 
 much.

 Looking at the GAE logs for your application, I found the *502*s you 
 mentioned.  One thing I noticed is that they all occur from the */read* 
 endpoint.  From the naming, I assume this endpoint is reading some data 
 from BigTable.  Investigating further, perhaps you could provide some 
 additional information:

- What exactly is happening at the */read* endpoint?  A code sample 
would be ideal if that's not too sensitive.

 As you surmised, we are reading some data from bigtable in this 
>>> endpoint.
>>>

- What kind of error handling exists in said endpoint if the 
BigTable API returns non-success responses?

 The entire endpoint is in a try catch block catching Exception. In the 
>>> case of failure the exception stack trace gets written to the logs.
>>> The first line of the endpoint is a log message signalling receiveing 
>>> the request (this was done for this debugging of course!!) 
>>> For the successful request the log message (the introductory one) gets 
>>> written. For the 502 ones never.
>>> For requests that fail because of bigtable related errors, the logs have 
>>> the stacktrace but not for 502s.
>>> The 502 failure requests finish in <10ms.
>>>

- 
- Can you log various steps in the */read* endpoint?  This might 
help identify the progress the request reaches before the *502* is 
served.  It would also help in confirming that your application is 
 actually 
even getting the request as I can't currently confirm that from the 
 logs.

 My best guess is that the request does not make it to the servlet. The 
>>> reason for that is that for the 100s of failed 502 logs that I have seen, 
>>> not one has the log message, which is the absolute first line in the code 
>>> of the read handler. 
>>>

- 
- If said endpoint does in fact read from BigTable, what API and 
 

[google-appengine] Re: Datastore: Problem updating entities

2017-08-15 Thread 'Shivam(Google Cloud Support)' via Google App Engine
The job could tend to be slow for such amount of entities following the 
example here 
.
 
The solution for proper Datastore Map Reduce solution in the cloud would be 
Datastore I/O using Dataflow 
.


Dataflow SDKs provide an API for reading data from and writing data to a 
Google Cloud Datastore database. Its programming model is designed to 
simplify the mechanics of large-scale data processing. When you program 
with a Dataflow SDK, you are essentially creating a data processing job to 
be executed by one of the Cloud Dataflow runner services. This model lets 
you concentrate on the logical composition of your data processing job, 
rather than the physical orchestration of parallel processing. You can 
focus on what you need your job to do instead of exactly how that job gets 
executed.

If you choose to stick with Map Reduce on App Engine, it is recommended to 
file any issues you experience directly to the engineering team on their 
Git repository .

On Tuesday, August 15, 2017 at 6:00:37 AM UTC-4, Filipe Caldas wrote:
>
> The job was actually doing slightly more than just setting a property to a 
> default value, it also was doing a .strip() in one of the fields due to an 
> error in our insert scripts, so in some cases there is a need to do a mass 
> update on all entities, it definitely doesn't happen often but we would 
> rather not re-insert all the entities on the table.
>
> The documented method of updating entities works fine, but as many other 
> users have noticed for any case where the amount of rows is big (> 10M) 
> this would take over a week to finish, it is also definitely much cheaper 
> to run that MapReduce, but it takes too long.
>
> The way we found to do it in a "safe" way, as in we will be sure the task 
> will be done and in a limited amount of time was to instead use a VM that 
> spawns about 5 threads and reads / updates in parallel the entities on 
> Datastore (and even this is still taking about 2 days to finish for 12M 
> entities).
>
> On Friday, 11 August 2017 21:46:20 UTC+1, Shivam(Google Cloud Support) 
> wrote:
>>
>> There should be no actual need to mass-put a new property to all of your 
>> entities, and set that new property to a default value since the Datastore 
>> supports entities with and without set property values (as you have noticed 
>> with the failed Map Reduce job). 
>>
>> You can assume that if an entity does not have the property, that it is 
>> equal to the default "indexed=0". You can then set this value directly in 
>> your application during read time. If it exists, read it and use it, else 
>> use a hard-coded default and set the value then in  your code (aka only 
>> when the entity is being read).
>>
>> Updating existing entities is documented here 
>> .
>>  
>>
>>
>>
>> Without knowing what happened exactly, it is not possible to know the 
>> reason for 70M reads. However, I would recommend to view this post 
>>  which might answer your question.
>>
>>
>> On Friday, August 11, 2017 at 9:02:53 AM UTC-4, Filipe Caldas wrote:
>>>
>>> Hi,
>>>
>>>   I am currently trying to update a kind in my database and add a field 
>>> (indexed=0), the table has more than 10M entities.
>>>
>>>   I tried to use MapReduce for appengine and launched a fairly simple 
>>> job where the mapper only sets the property and yields an 
>>> operation.db.Put(), the only problem is that some of the shards failed, so 
>>> the job was stopped and automatically restarted.
>>>
>>>   Problem is, launching this job on 10M entities cost me about $ 100 and 
>>> the job was not finished (the retry was going slow so don't think they 
>>> billed much for that). 
>>>   
>>> The extra annoying thing is that there is no other way that I know to 
>>> update these properties "fast" enough (the mapreduce took over 7 hours to 
>>> fail on 10M). I know Beam/Dataflow is apparently the way to go, but 
>>> documentation on doing basic operations like updating Datastore entities is 
>>> still very poor (not sure if can even be done).
>>>
>>>   So, my question is is there a fast and *safe* way to update  my 
>>> entities that does not consist of doing 10M fetchs and puts in sequence?
>>>
>>>   Bonus question: do anyone know why was I billed 70M reads on only 10M 
>>> entities?
>>>
>>> Best regards,
>>>
>>

-- 
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 post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
T

[google-appengine] Re: Datastore: Problem updating entities

2017-08-15 Thread Filipe Caldas
The job was actually doing slightly more than just setting a property to a 
default value, it also was doing a .strip() in one of the fields due to an 
error in our insert scripts, so in some cases there is a need to do a mass 
update on all entities, it definitely doesn't happen often but we would 
rather not re-insert all the entities on the table.

The documented method of updating entities works fine, but as many other 
users have noticed for any case where the amount of rows is big (> 10M) 
this would take over a week to finish, it is also definitely much cheaper 
to run that MapReduce, but it takes too long.

The way we found to do it in a "safe" way, as in we will be sure the task 
will be done and in a limited amount of time was to instead use a VM that 
spawns about 5 threads and reads / updates in parallel the entities on 
Datastore (and even this is still taking about 2 days to finish for 12M 
entities).

On Friday, 11 August 2017 21:46:20 UTC+1, Shivam(Google Cloud Support) 
wrote:
>
> There should be no actual need to mass-put a new property to all of your 
> entities, and set that new property to a default value since the Datastore 
> supports entities with and without set property values (as you have noticed 
> with the failed Map Reduce job). 
>
> You can assume that if an entity does not have the property, that it is 
> equal to the default "indexed=0". You can then set this value directly in 
> your application during read time. If it exists, read it and use it, else 
> use a hard-coded default and set the value then in  your code (aka only 
> when the entity is being read).
>
> Updating existing entities is documented here 
> .
>  
>
>
>
> Without knowing what happened exactly, it is not possible to know the 
> reason for 70M reads. However, I would recommend to view this post 
>  which might answer your question.
>
>
> On Friday, August 11, 2017 at 9:02:53 AM UTC-4, Filipe Caldas wrote:
>>
>> Hi,
>>
>>   I am currently trying to update a kind in my database and add a field 
>> (indexed=0), the table has more than 10M entities.
>>
>>   I tried to use MapReduce for appengine and launched a fairly simple job 
>> where the mapper only sets the property and yields an operation.db.Put(), 
>> the only problem is that some of the shards failed, so the job was stopped 
>> and automatically restarted.
>>
>>   Problem is, launching this job on 10M entities cost me about $ 100 and 
>> the job was not finished (the retry was going slow so don't think they 
>> billed much for that). 
>>   
>> The extra annoying thing is that there is no other way that I know to 
>> update these properties "fast" enough (the mapreduce took over 7 hours to 
>> fail on 10M). I know Beam/Dataflow is apparently the way to go, but 
>> documentation on doing basic operations like updating Datastore entities is 
>> still very poor (not sure if can even be done).
>>
>>   So, my question is is there a fast and *safe* way to update  my 
>> entities that does not consist of doing 10M fetchs and puts in sequence?
>>
>>   Bonus question: do anyone know why was I billed 70M reads on only 10M 
>> entities?
>>
>> Best regards,
>>
>

-- 
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 post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ce10cb95-39cd-4ce8-b954-7f2a620a751b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.