对App引擎来说,达到使用中的IP地址配额过快 [英] Reaching quota for ip address in use too fast for App engine

本文介绍了对App引擎来说,达到使用中的IP地址配额过快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在App Engine中运行的网络服务器,客户端是一个移动应用程序.我看到,一旦我们扩展到很多用户,移动设备上的许多请求就会开始失败.我在日志中没有看到任何故障.我在配额中注意到,Compute Engine APIip address in use最大值为8(即使我们没有在Compute Engine上运行任何服务). 我不确定这是否是根本原因,但以前不是这样的,我想知道是否有关于如何解决此问题的建议,或者是否有更好的方法来构造我们的服务器以满足我们的用例. /p>

我们当前的配置是App引擎上的Flex环境,至少有2个实例.我们也有一个MySQL实例.到目前为止,我们已经使用了几乎所有内容.

runtime: php
env: flex

api_version: 1

handlers:
- url: /.*
  script: public/index.php

runtime_config:
  document_root: public

beta_settings:
    # for Cloud SQL, set this value to the Cloud SQL connection name,
    # e.g. "project:region:cloudsql-instance"
    cloud_sql_instances: "<project>:<region>:<sql-instance>"

解决方案

您没有在问题中提及它,但我相信您正在使用App Engine Flexible环境.在后台,App Engine flex应用程序在您项目中的Compute Engine实例上(向您隐藏)运行.因此,它实际上也违反了Compute Engine配额,包括App Engine区域的正在使用的IP地址".

使用中的IP地址"会影响您的App Engine Flex应用程序,因为它会限制您的应用程序能够扩展到的实例数量,因为每个实例都使用自己的IP.例如,根据您提供的app.yaml文件,缩放设置默认为自动缩放,最少2个实例,最多20个实例.当使用您的应用的用户数量增加时,使用中的IP地址"配额将阻止您的应用升级到8个实例以上.

要注意的另一件事是,您的服务的早期版本可能仍在运行.如果它们具有相同的缩放设置,则意味着它们将至少运行2个实例,这也将计入使用中的IP地址"配额.

由于您无法在您为App Engine应用设置的另一个区域的网络中部署App Engine实例,因此这里唯一的解决方案是请求增加配额.在您的开发人员控制台中,转到IAM&管理员>配额,选择此特定配额,然后单击顶部的编辑配额"按钮,然后按照说明进行操作.

I have a webserver running in App Engine and the client is a mobile app. I am seeing that a lot of requests on the mobile are starting to fail once we scaled up to a lot of users. I am not seeing any failures in our logs however. I noticed in our quotas that our ip address in use for Compute Engine API is at its max of 8 (even though we're not running any services on Compute Engine). I am not sure if this is the root cause but it wasn't like this before, I was wondering if there is any advice on how to address this problem or if there are better way to structure our server to meet our use case.

EDIT: Our current configuration is a flex environment on App engine, with minimum 2 instances. We also have a MySQL instance. Those pretty much so far everything we've used.

runtime: php
env: flex

api_version: 1

handlers:
- url: /.*
  script: public/index.php

runtime_config:
  document_root: public

beta_settings:
    # for Cloud SQL, set this value to the Cloud SQL connection name,
    # e.g. "project:region:cloudsql-instance"
    cloud_sql_instances: "<project>:<region>:<sql-instance>"

解决方案

You didn't mention it in your question but I believe you are using App Engine Flexible environment. Under the hood, App Engine flex apps run on (hidden from you) Compute Engine instances in your project. So it actually goes against Compute Engine quotas as well, including the "ip address in use" for your App Engine Region.

The "ip address in use" impacts your App Engine flex app in that it'll limit the number of instances your app will be able to scale up to, since each instance uses its own IP. For example, as per the app.yaml file you provided, your scaling setting defaults to automatic scaling with minimum 2 instances and maximum 20 instances. The "ip address in use" quota will prevent your app to upscale above 8 instances when the number of users using your app increases.

One other thing to note is that you may have previous versions of your service that are still running. If they have the same scaling setting, this means they'll have minimum 2 instances running each, which will count towards the "ip address in use" quota also.

Since you can't deploy your App Engine instances in a network in another region that the one you set for your App Engine app, the only solution here is to request a quota increase. In your Developer Console, got to IAM & admin > Quotas, select this particular quota and click on the "Edit Quotas" button at the top and follow the instructions.

这篇关于对App引擎来说,达到使用中的IP地址配额过快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆