google-app-engine

“Over quota” when using GCS json-api from App Engine

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-02 07:08:53
问题 I am using Go on App Engine. In most cases, I use the file api to access GCS, which works great, except that deletes don't work so to delete files I use the JSON-API (specifically, the google-go-api-client). To authenticate, I use app engine service accounts. We are sometimes seeing an error come back of "Over quota:" with nothing after the colon. Since we are a paid app, what quota could this be? Is there a burst limit (e.g. no more than X requests in a single minute)? Is there any places

Memcache alternatives for App Engine Standard second generation runtimes

喜夏-厌秋 提交于 2020-01-02 06:58:23
问题 Google has released the general availability versions of their second generation runtimes for App Engine Standard including Node.js 10, Go 1.11, and PHP 7.2. First generation runtimes included a Memcache service that has been removed in the second generation runtimes, recommending developers to use an external provider like Redis Lab Cloud, a service that is not available in the europe-west region. Cloud Memorystore would be is not even accessible from App Engine Standard. Is there any other

What's the correct approach for a Twitter Application on Google App Engine?

狂风中的少年 提交于 2020-01-02 06:35:07
问题 I am trying to develop a Twitter App on Google App Engine. The app basically collects all tweets from a Twitter user's and his/her followers and their followers and so on. It typically collects 500 tweets per run per user and then inserts the data for the user into the database. The tweet collection process has to be done every hour. Currently, I am using cron jobs for doing this. But it gives a lot of Deadline exceeded errors, even for one user, which is not a good sign. I am using Python.

Why vGPU (Tesla K80) on Google cloud slower than GTX940M on T460P

微笑、不失礼 提交于 2020-01-02 06:33:41
问题 I have a question about the vGPU (Tesla K80) on the VM of Google cloud. My laptop is Lenovo T460P equiped with below spec: CPU: intel i7-6700HQ RAM: 16GB GPU: nVIDIA GTX 940M (CUDA Cores: 348) OS: Windiws 10 Pro 64bit OpenCV: ver3.2.0 with CUDA 8.0 support (I downloaded from http://jamesbowley.co.uk/downloads/) The VM I created in Google Cloud contains the below spec: CPU: vCPU x 2 RAM: 4GB HDD: 25GB GPU: vGPU (Tesla K80) x 1 (CUDA Cores 4992) OS: Ubuntu 16.04 LTS 64bit CUDA Driver: I follow

BlobInfo object from a BlobKey created using blobstore.create_gs_key

空扰寡人 提交于 2020-01-02 06:12:20
问题 I am converting code away from the deprecated files api. I have the following code that works fine in the SDK server but fails in production. Is what I am doing even correct? If yes what could be wrong, any ideas how to troubleshoot it? # Code earlier writes the file bs_file_name. This works fine because I can see the file # in the Cloud Console. bk = blobstore.create_gs_key( "/gs" + bs_file_name) assert(bk) if not isinstance(bk,blobstore.BlobKey): bk = blobstore.BlobKey(bk) assert isinstance

How-to delete indexes in Google App Engine (Java)?

感情迁移 提交于 2020-01-02 05:50:27
问题 Is there a way to delete unused indexes in Google App Engine Java application? The only one way I was able to find is to create an empty Python GAE application and run the following command: appcfg.py vacuum_indexes /path/to/myapp/ Is there a more intelligent way? Update (16 feb 2011): Starting from GAE SDK 1.4.2 it is possible: ./appengine-java-sdk/bin/appcfg.sh vacuum_indexes myapp/war 回答1: The ability to vacuum indexes in Java has been added to the GAE SDK 1.4.2. See this blog post for

Can Java and Python coexist in the same app?

自闭症网瘾萝莉.ら 提交于 2020-01-02 05:40:12
问题 I need to have a Java instance fetching data directly from the Python's instance datastore. I don't know if that's possible at all. Is the datastore transparent/unique, or each instance (if they can indeed coexist) has its separate datastore? Suming it up: how can a Java app fetch data from the datastore of a Python app, and vice-versa? 回答1: You could use jython. It's a python implementation written in java. You can call java functions/classes from python that way. That would allow you to run

502 response coming from errors in Google Cloud LoadBalancer

心不动则不痛 提交于 2020-01-02 05:33:11
问题 I'm using Google App Engine Flexible env (already migrated to env:flex) with python 3.4 runtime. Over last month, i noticed multiple times(but less than 5% of requests) that i or automated processes, get a 502 from the server (Bad Gateway). Couldn't reproduce it locally and couldn't find any trace for it under GAE service logs. But looking for 502 error across all services, i realized that they come from Cloud HTTP Load Balancer service. Going over the jsonPayload of these 502 errors, i see

GAE, PHP and GCM: failed to open stream: HTTP request failed! HTTP/1.0 405 Method Not Allowed

ε祈祈猫儿з 提交于 2020-01-02 05:20:49
问题 I'm developing a web application (using GAE for PHP) that notifies android clients (via GCM - Google Cloud Messaging) when some content are available for download. The following PHP script should do job: $json = array( 'data' => array( ... ), 'registration_ids' => array( ... ) ); $data = json_encode( $json ); $context = array( 'http' => array( 'method' => 'post', 'header' => 'Authorization: key=MY_SECRET_KEY' . "\r\n" . 'Content-Type: application/json' . "\r\n", 'content' => $data ) );

How can I store the date with datastore?

泪湿孤枕 提交于 2020-01-02 05:11:05
问题 Datastore documentation is very clear that there is an issue with "hotspots" if you include 'monotonically increasing values' (like the current unix time), however there isn't a good alternative mentioned, nor is it addressed whether storing the exact same (rather than increasing values) would create "hotspots": "Do not index properties with monotonically increasing values (such as a NOW() timestamp). Maintaining such an index could lead to hotspots that impact Cloud Datastore latency for