google-app-engine

What causes “Request was aborted after waiting too long to attempt to service your request”?

橙三吉。 提交于 2020-05-17 07:17:07
问题 What causes "Request was aborted after waiting too long to attempt to service your request"? It seems the result of some sort of internal timeout, but I don't know where this is configured. We're currently using autoscaling, and that error was the result of a temporary increase in the number of tasks in our taskqueue. Shouldn't autoscaling have created more instances to handle that request? Also, if a task in Cloud Tasks fails with "Request was aborted after waiting too long to attempt to

How solve High latency in app engine caused by “This request caused a new process to be started for your application…”?

安稳与你 提交于 2020-05-17 07:02:54
问题 App working with standard environment app engine, python 3.7 and cloud sql (Mysql) Checking the logs there are some with very high latencies (more than 4 seconds), when the expected are 800ms. All these logs are accompanied by this message: "This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application." I understand that

Disabling version specific urls in Google appengine

淺唱寂寞╮ 提交于 2020-05-16 20:33:07
问题 Google App-Engine supports version-specific routing of requests as documented here. This is useful for example for testing a new version prior to deploying it. However, this may also be problematic. Say the new version includes security enhancements - there should be a way to prevent access to previous versions without deleting them completely (in order to allow for quick roll-back for instance). Could not find a way to disable previous versions. Is there a way to accomplish that ? Thanks.

ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine

你离开我真会死。 提交于 2020-05-16 03:17:51
问题 Getting this error when I try to deploy to google app engine: ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine: File https://storage.googleapis.com/staging.XXXXXXXX.appspot.com/04314f892fba4e2f44a86ab96eeb2a6b72ed93cd failed with: Conflicting SHA1 sum for file. Expected "6ae2b40e_68bc1a25_8cc5408c_bbd37316_fa642477" but received "04314f89_2fba4e2f_44a86ab9_6eeb2a6b_72ed93cd". File https://storage.googleapis.com/staging.XXXXXXXX

Calling Cloud Function from App Engine runtime Python 3.7 [duplicate]

冷暖自知 提交于 2020-05-15 09:08:10
问题 This question already has answers here : Post JSON using Python Requests (6 answers) Closed last year . I have an App Engine service, running Python 3.7, that needs to call and get a response from one of my Cloud Functions via the https.oncall trigger. I thought I could do so with the following: import logging from sys import exit import firebase_admin import requests import google.cloud.logging client = google.cloud.logging.Client() client.setup_logging() firebase_admin.initialize_app()

How to send Base64 image to Google Cloud Vision API label detection in Ruby?

南笙酒味 提交于 2020-05-15 08:31:26
问题 Hi I'm building a program in Ruby to generate alt attributes for images on a webpage. I'm scraping the page for the images then sending their src, in other words a URL, to google-cloud-vision for label detection and other Cloud Vision methods. It takes about 2-6 seconds per image. I'm wondering if there's any way to reduce response time. I first used TinyPNG to compress the images. Cloud Vision was a tad faster but the time it took to compress more than outweighed the improvement. How can I

'gcloud deploy' complains about having both a .gcloudignore and skip_files even though I have neither

感情迁移 提交于 2020-05-15 05:09:22
问题 I'm trying to deploy a Django (v2.1) app to App Engines Python37 runtime. This is my app.yaml which was taken from a Google example: # [START django_app] runtime: python37 #api_version: 1 #threadsafe: yes handlers: - url: /static static_dir: static/ - url: .* script: <project_name>.wsgi.application # Only pure Python libraries can be vendored # Python libraries that use C extensions can # only be included if they are part of the App Engine SDK # Using Third Party Libraries: https://cloud

What is the IP range(s) of Google pub/sub?

放肆的年华 提交于 2020-05-14 09:08:26
问题 I have a Google pub/sub subscription that pushes messages for a topic to an AppEngine standard service endpoint. I want to restrict access to the AppEngine standard service to user IPs and still allow for messages coming from Google Pub/sub. In the AppEngine firewall, the only option is to allow certain IP ranges. What is the IP range(s) of Google pub/sub? 回答1: I've noticed that all the IP requests from Pub/Sub push subscriptions are coming from 2002:axx:xxxx:: . As per IETF RFC 3056, 2002:::

How to connect to Cloud SQL MySQL database from App Engine?

自古美人都是妖i 提交于 2020-05-13 19:28:42
问题 I am currently setting up an open-source marketing software called Mautic on App Engine Flexible Environment. However, I'm having trouble with connecting the App Engine to the Cloud SQL MySQL database using MySQLi. Mautic is a PHP application built on top of Symfony. I tried using /cloudsql/< instance_connection_name > as the host, but it didn't work. Does anyone have any experience with deploying Mautic on App Engine or know to address this problem? 回答1: CONNECTING FROM APP ENGINE (FLEX AND

Flask URL Route: Route All other URLs to some function

十年热恋 提交于 2020-05-09 21:49:08
问题 I am working with Flask 0.9. I have experience with Google App Engine. In GAE, the url match patterns are evaluated in the order they appear, first come first serve. Is it the same case in Flask? In Flask, how to write a url match pattern to deal with all other unmatched urls. In GAE, you only need to put /.* in the end, like: ('/.*', Not_Found) . How to do the same thing in Flask since Flask wont support Regex. 回答1: I think this is the answer http://flask.pocoo.org/docs/design/#the-routing