Google cloud platform not recognizing instance in app.yaml - google-app-engine

I'm trying to create a new environment on google cloud platform. It's not recognizing my instance class... and giving the error Instance class (n1-standard-1) is not recognized
entrypoint: gunicorn -b :$PORT presto.wsgi
env: flex
runtime: python
instance_class: n1-standard-1
runtime_config:
python_version: 3
n1-standard-1 is given from google's documentation so I'm not sure what's wrong here. Does it go by a different name? Thanks!

For the python flex environment, the resource config is defined in a different way.
To get the same machine as a n1-standard-1, you must add the following resource definition in your app.yaml:
resources:
cpu: 1
memory_gb: 3.75

Related

Google App Engine error when use opencensus ext

WARNING: [pool app] child 29 said into stderr: "php-fpm: pool app: symbol lookup error: /opt/php73/lib/x86_64-linux-gnu/extensions/no-debug-non-zts-20180731/opencensus.so: undefined symbol: ZVAL_DESTRUCTOR"
I using GAE env flex. today GAE use php7.3-fpm and i got that error. I check other website in GAE using php7.2-fpm working normally.
How can i fix problem.
Inside your app.yaml you should set the runtime:
env: flex
runtime: php
On your composer.json file you should specify the version that you want to use, for example if you want to use php 7.2 instead of 7.3:
{
"require": {
"php": "7.2.*"
}
}
It's important to specify said version otherwise the runtime might upgrade inadvertently into a new version as mentioned in the official documentation
By default, the PHP runtime uses PHP 7.2, but you should explicitly
declare your PHP version in the composer.json file to prevent your
application from being automatically upgraded when a new version of
PHP becomes available.
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 1
disk_size_gb: 10
runtime_config:
document_root: public
# Ensure we skip ".env", which is only for local development
skip_files:
- .env
- .git
- /vendor/
- /node_modules/
env_variables:
# Put production environment variables here.
APP_LOG: errorlog
APP_KEY: **App_Key**
APP_NAME: Application
APP_ENV: production
APP_DEBUG: true ```

Google App Engine High Costs

I recently asked a question: Deploying to google app engine failed
I got my app deployed, however, we are incurring a large sum for this project. (wiki.js using third-party DB mLab).
I'm wondering if it has to do with the config I put in app.yaml, namely, the memory expansion and resources
This is what the google support person said: to add:
resources:
cpu: 2
memory_gb: 4.0
disk_size_gb: 20
health_check:
enable_health_check: False
My app.yaml (from google console) is:
runtime: nodejs
api_version: '1.0'
env: flexible
threadsafe: true
automatic_scaling:
min_num_instances: 2
max_num_instances: 20
cpu_utilization:
target_utilization: 0.5
resources:
cpu: 2
memory_gb: 4
disk_size_gb: 20
health_check:
enable_health_check: false
Google Cloud Support person here again!
Find a detailed description of costs going to Google Cloud Platform Console home --> Billing --> View detailed charges or following this guide. Update the post with the expensive fields without sharing private data, please, so I can understand what is going on.
Find general information about quotas here.
P.S.: I found a couple of solutions and I suggested you to TRY them since they weren't working for me.

Google cloud appengine 1.9.54 Release

We are deploying ASP.NET Core application on Appengine Flex and in Instances Summary on Dashboard page appears strange 1.9.54 appengine release as well as Flex release. What that might be?
Our app.yaml:
env: flex
runtime: aspnetcore
resources:
cpu: 8
memory_gb: 14.4
automatic_scaling:
min_num_instances: 8
max_num_instances: 20
cool_down_period_sec: 180
cpu_utilization:
target_utilization: 0.5
Your app's dashboard summary indicates your app has both:
standard env GAE instances (1.9.54 being the version of the GAE sandbox/infra running those instances), possibly from older service version(s) not yet deleted
flexible env GAE instances
You can play with the Service and/or Version selection boxes above the summary to identify which service/version those instances correspond to.

Php is not running on app engine, what is wrong with my yaml file?

here is my yaml file , I don't know where I went wrong. php just give back Error: Server Error for a test echo.
runtime: php55
api_version: 1
instance_class: B1
basic_scaling:
max_instances: 1
idle_timeout: 5m
handlers:
# Serve php scripts.
- url: /(.+\.php)$
script: \1
env_variables:
# Replace project, instance, database, user and password with the values
obtained
# when configuring your Cloud SQL instance.
MYSQL_DSN: mysql:unix_socket=/cloudsql/XXXXX-166105:us-
east1:XXXX;dbname=XXXX
MYSQL_USER: root
MYSQL_PASSWORD: 'XXXXXXX'
Your YAML is syntactically incorrect
You need to put obtained after values or comment out that line.
Remove the newline between us- and east .
You can e.g. try this out at this site and get better feedback than you get from your PHP based parser (which is not a very good implementation of a YAML parser).
Without those fixes you will not be able to proceed to fixing any semantic errors your YAML document might (still) have.

When deploying my app in flexible environment getting error beta setting machine_type cannot be set in an App Engine Flexible Environment

When trying to deploy my app engine using flexible environment then i am getting error.
ERROR: (gcloud.preview.app.deploy) INVALID_ARGUMENT:
The beta setting machine_type cannot be set in an App Engine Flexible Environment deployment.
My app.yaml is given below
runtime: nodejs
#vm: true
env: flex
# [END runtime]
network:
instance_tag: app-tag
name: network-tag
instance_class: F1
automatic_scaling:
min_num_instances: 1
max_num_instances: 2
cool_down_period_sec: 60
beta_settings:
machine_type: f1-micro
handlers:
- url: /.*
script: IGNORED
secure: always
# Temporary setting to keep gcloud from uploading node_modules
skip_files:
- ^node_modules$
Also can anyone please tell me what is the difference between vm: true and env: flex because both set app engine environment to flexible ??
When changing from vm: true to env: flex you're actually switching to the latest infra version, see Upgrading to the Latest App Engine Flexible Environment Beta Release.
The machine type is no longer configured that way. Instead you'd configure a custom instance shape via its resources:
Resource settings
These settings control the computing resources. App Engine assigns a
machine type based on the amount of CPU and memory you've
specified. The machine is guaranteed to have at least the level of
resources you've specified, it might have more.
You can specify up to eight volumes of tmpfs in the resource settings.
You can then enable workloads that require shared memory via tmpfs and
can improve file system I/O.
For example:
resources:
cpu: 2
memory_gb: 1.3
disk_size_gb: 10
volumes:
- name: ramdisk1
volume_type: tmpfs
size_gb: 0.5

Resources