An App Engine application can consume resources up to certain quotas. With these quotas, App Engine ensures that your application won't exceed your budget, and that other applications running on App Engine won't impact your application's performance.
Contents
- Billable limits and safety limits
- How resources are replenished
- When a resource is depleted
- Resources
Billable limits and safety limits
App Engine has three kinds of quotas or limits:
- Free Quotas: Free quotas are limits set on free applications. These quotas can only be exceeded by paid applications, up to the limits of the application's budget or the safety limit, whichever applies first.
- Billable Limits: Billable limits apply to paid apps and cannot be exceeded. Billable limits are set by the application administrator in the Billing section of the Administration Console. These quotas allow administrators to manage application cost.
- Safety Limits: Safety limits are set by Google to protect the integrity of the App Engine system. These quotas ensure that no single app can over-consume resources to the detriment of other apps. If you go above these limits you'll get an error whether you are paid or free.
Billable limits
Every application gets an amount of each resource for free, but application administrators can increase these quotas by enabling paid apps and setting a daily budget. You will be charged for the resources your application actually uses, and for the amount of resources used above the free quota thresholds.
After you enable billing for your application, you can set your daily budget and adjust quotas using the Administration Console. For more information about setting your budget and allocating resources, see Pricing. When you enable billing for your application, the application's safety limits increase. See the Resources section for details.
Safety limits
Safety limits include daily quotas and per-minute quotas:
- Daily quotas are refreshed daily at midnight Pacific time. Paid applications can exceed this free quota until their budget is exhausted.
- Per-minute quotas protect the application from consuming all of its resources in very short periods of time, and prevent other applications from monopolizing a given resource. If your application consumes a resource too quickly and depletes one of the per-minute quotas, the word "Limited" appears next to the appropriate quota on the Quota Details screen in the Admin Console. Requests for resources that have hit their per-minute maximum will be denied.
See When a Resource is Depleted for details about what happens when a quota is exceeded and how to handle quota overage conditions.
Tip: For paid apps, the maximum per-minute quotas accommodate high traffic
levels, enough to handle a spike in traffic from your site getting mentioned in news stories. If
you believe a particular quota does not meet this requirement, please create a feature request issue in the issue
tracker. Please note that filing a feature request will not assure an actual quota bump for a
particular app, but it will help us understand which quota is potentially too low for general use
cases.
If you're expecting extremely high traffic levels, or for some reason your app
requires particularly high quotas (e.g. because of significant product launch or large load tests),
we recommend you sign up for Silver, Gold or
Platinum support.
How resources are replenished
App Engine tracks your application's resource usage against system quotas. For both free and paid applications, App Engine resets all resource measurements at the beginning of each calendar day (except for Stored Data, which always represents the amount of datastore storage in use). When free applications reach their quota for a resource, they cannot use that resource until the quota is replenished. Paid apps can exceed the free quota until their budget is exhausted.
Daily quotas are replenished daily at midnight Pacific time. Per-minute quotas are refreshed every 60 seconds.
When a resource is depleted
When an application consumes all of an allocated resource, the resource becomes unavailable until the quota is replenished. This may mean that your application will not work until the quota is replenished.
For resources that are required to initiate a request, when the resource is depleted, App Engine by default returns an HTTP 403 or 503 error code for the request instead of calling a request handler. The following resources have this behavior:
- Bandwidth, incoming and outgoing
- Instance hours
Tip: You can configure your application to serve a custom error page when your application exceeds a quota. For details, see Custom Error Responses documentation for Python, Java, and Go.
For all other resources, when the resource is depleted, an attempt in the application to consume the resource results in an exception. This exception can be caught by the application and handled, such as by displaying a friendly error message to the user. In the Python API, this exception is apiproxy_errors.OverQuotaError. In the Java API, this exception is com.google.apphosting.api.ApiProxy.OverQuotaException. In the Go API, the appengine.IsOverQuota function reports whether an error represents an API call failure due to insufficient available quota.
The following example illustrates how to catch the OverQuotaError, which may be raised by the SendMessage() method if an email-related quota has been exceeded:
try:
mail.SendMessage(to='test@example.com',
from='admin@example.com',
subject='Test Email',
body='Testing')
except apiproxy_errors.OverQuotaError, message:
# Log the error.
logging.error(message)
# Display an informative message to the user.
self.response.out.write('The email could not be sent. '
'Please try again later.')
If you're exceeding your system resource quota unexpectedly, consider profiling your application's performance.
Is your app exceeding the default limits? If you have Silver, Gold, or Platinum support package, you can contact your support representative to request higher throughput limits. Otherwise, you can apply for more Mail API quota or file a feature request for any other quota increase.
Resources
An application may use the following resources, subject to quotas. Resources measured against billable limits are indicated with "(billable)." Resource amounts represent an allocation over a 24 hour period.
The cost of additional resources is listed on the Pricing page.
Default GCS Bucket
Each app can have a default Google Cloud Storage (GCS) bucket that is ready to use with no further activations, configurations, or permission settings required. For more information see the documentation for default buckets in your language (Java | Python | Go | PHP). The following quotas apply specifically to use of the default GCS bucket.
- GCS default bucket Stored Data
- The total amount of data stored in the default GCS bucket. Available for both paid and free apps.
| Resource | Free Default Limit | Billing Enabled Default Limit |
|---|---|---|
| Default GCS Bucket Stored Data | 5 GB | First 5 GB free; no maximum |
Blobstore
The following quotas apply specifically to use of the blobstore.
- Blobstore Stored Data
- The total amount of data stored in the blobstore. Available for both paid and free apps.
| Resource | Free Default Limit | Billing Enabled Default Limit |
|---|---|---|
| Blobstore Stored Data | 5 GB | First 5 GB free; no maximum |
Channel
- Channel API Calls
- The total number of times the application accessed the Channel service.
- Channels Created
- The number of channels created by the application.
- Channel Hours Requested
- The number of hours of channel connect time requested by the application.
- Channel Data Sent
- The amount of data sent over the Channel service. This also counts toward the Outgoing Bandwidth quota.
| Resource | Free Default Limit | Billing Enabled Default Limit | ||
|---|---|---|---|---|
| Daily Limit | Maximum Rate | Daily Limit | Maximum Rate | |
| Channel API Calls | 657,000 calls | 3,000 calls/minute | 91,995,495 calls | 32,000 calls/minute |
| Channels Created | 100 channels | 6 creations/minute | Based on your budget | 60 creations/minute |
| Channel Hours Requested | 200 hours | 12 hours requested/minute | Based on your budget | 180 hours requested/minute |
| Channel Data Sent | Up to the Outgoing Bandwidth quota | 22 MB/minute | 1 TB | 740 MB/minute |
Code and static data storage
- Static Data
- No single static data file may be larger than 32MB.
- Total Storage
- The storage quota applies to the total amount of code and static data stored by all versions of your app. The total stored size of code and static files is listed in the Main Dashboard table. Individual sizes are displayed on the Versions and Backends screens respectively. Free apps may only upload up to 1 GB of code and static data. Paid apps may upload more, but will be charged $ 0.026 per GB per month for any code and static data storage that exceeds 1 GB.
| Resource | Cost |
|---|---|
| Code & Static Data Storage - First 1 GB | Free |
| Code & Static Data Storage - Exceeding 1 GB | $ 0.026 per GB per month |
Datastore
The Stored Data (billable) quota refers to all data stored for the application in the Datastore, the Task Queue, and the Blobstore. Other quotas in the "Datastore" section of the Quota Details screen in the Administration Console refer specifically to the Datastore service.
- Stored Data (billable)
-
The total amount of data stored in datastore entities and corresponding indexes, in the task queue, and in the Blobstore.
It's important to note that data stored in the datastore may incur significant overhead. This overhead depends on the number and types of associated properties, and includes space used by built-in and custom indexes. Each entity stored in the datastore requires the following metadata:
- The entity key, including the kind, the ID or key name, and the keys of the entity's ancestors.
- The name and value of each property. Since the datastore is schemaless, the name of each property must be stored with the property value for any given entity.
- Any built-in and custom index rows that refer to this entity. Each row contains the entity kind, any number of property values depending on the index definition, and the entity key.
See How Entities and Indexes are Stored for a complete breakdown of the metadata required to store entities and indexes at the Bigtable level and How Index Building Works for a detailed explanation of how datastore indexes are managed.
- Number of Indexes
- The number of Datastore indexes that exist for the application. This includes indexes that were created in the past and no longer appear in the application's configuration but have not been deleted using AppCfg's
vacuum_indexescommand. - Write Operations
- The total number of Datastore write operations.
- Read Operations
- The total number of Datastore read operations.
- Small Operations
- The total number of Datastore small operations. Small operations include calls to allocate Datastore IDs or keys-only queries.
| Resource | Free Default Daily Limit | Billing Enabled Default Limit |
|---|---|---|
| Stored Data (billable) | 1 GB * | 1 GB free; no maximum |
| Number of Indexes | 200 * | 200 |
| Write Operations | 50,000 | Unlimited |
| Read Operations | 50,000 | Unlimited |
| Small Operations | 50,000 | Unlimited |
*Not a daily limit but a total limit.
Note: Datastore operations generated by the Datastore Admin and Datastore Viewer count against your application quota.
Deployments
- Deployments
- The number of times the application has been uploaded by a developer. The current quota is 10,000 per day.
An application is limited to 10,000 uploaded files per version. Each file is limited to a maximum size of 32 megabytes. Additionally, if the total size of all files for all versions exceeds the initial free 1 gigabyte, then there will be a $ 0.026 per GB per month charge.
Instance hours
Instance usage is billed by instance uptime, at a given hourly rate. Billable time starts when an instance starts, and ends fifteen minutes after it shuts down. There is no billing for idle instances above the maximum number of idle instances set in the Performance Settings tab of the Admin Console.
There are separate free daily quotas for frontend and backend instances. Note that when you use the Modules API, the module's instance class determines which quota applies.
| Resource or API Call | Free Quota |
|---|---|
| Frontend Instances (Automatic Scaling Modules) | 28 free instance-hours per day |
| Backend Instances (Basic and Manual Scaling Modules) | 8 free instance-hours per day |
Logs
The Logs API is metered when log data is retrieved, and is available for both paid and free apps.
Logs storage contains request logs and application logs for an application, and is available for both paid and free apps. For paid apps, you can increase total logs storage size and/or log data retention time, using the Log Retention setting in the Admin Console.
| Resource | Free Default Limit | Billing Enabled Default Limit |
|---|---|---|
| Logs data retrieval | 100 megabytes | No maximum for paid app. |
| Logs data | 1 gigabyte | Log data kept for a maximum of 365 days if paid, 90 days if free. |
App Engine bills for email use "by message," counting each email to each recipient. For example, sending one email to ten recipients counts as ten messages.
- Mail API Calls
- The total number of times the application accessed the mail service to send a message.
- Messages Sent (billable)
- The total number of messages (email/recipient pairs) that have been sent by the application. Note that the maximum quota for Messages Sent stays at free levels until the first charge for your application has cleared.
- Admin Emails
- The total number of messages to application admins that have been sent by the application. (The total size limit for each admin email, including headers, attachments, and body, is 16KB).
- Message Body Data Sent
- The amount of data sent in the body of email messages. This also counts toward the Outgoing Bandwidth quota.
- Attachments Sent
- The total number of attachments sent with email messages.
- Attachment Data Sent
- The amount of data sent as attachments to email messages. This also counts toward the Outgoing Bandwidth quota.
| Resource | Free Default Limit | Billing Enabled Default Limit | ||
|---|---|---|---|---|
| Daily Limit | Maximum Rate | Daily Limit | Maximum Rate | |
| Mail API Calls | 100 calls | 32 calls/minute | 1,700,000 calls | 4,900 calls/minute |
| Messages Sent (billable) | 100 messages | 8 messages/minute | The daily email quota for billing-enabled apps depends on which billing system your app is using. See Increasing your Daily Mail Quota below to learn how to increase the quota in each case. | 5,100 messages/minute |
| Admins Emailed | 5,000 mails | 24 mails/minute | 3,000,000 mails | 9,700 mails/minute |
| Message Body Data Sent | 60 MB | 340 KB/minute | 29 GB | 84 MB/minute |
| Attachments Sent | 2,000 attachments | 8 attachments/minute | 2,900,000 attachments | 8,100 attachments/minute |
| Attachment Data Sent | 100 MB | 10 MB/minute | 100 GB | 300 MB/minute |
Increasing your daily mail quota
When you enable billing, the email quota remains at 100 messages per day. You must explicitly request a higher mail quota. Go to the Quota Details page of the Admin Console and scroll to the Mail section. There you'll find a link to submit a request for additional email quota. After you submit the request you can monitor its status by visiting the same link again. This will display a page that shows the status of the request: whether the request has been granted, is under review, or has been denied. If the request is granted it may be several minutes before the new quota of 20,000 messages per day takes effect. If the request is denied you cannot make another request to increase mail quota until some time has passed.
If your app needs to send more than 20,000 messages per day, you can sign up for a support package which entitles you to ask for a higher quota.
Requests
- Outgoing Bandwidth (billable)
-
The amount of data sent by the application in response to requests.
This includes:
- data served in response to both secure requests and non-secure requests by application servers, static file servers, or the Blobstore
- data sent in email messages
- data sent over XMPP or the Channel API
- data in outgoing HTTP requests sent by the URL fetch service.
- Incoming Bandwidth
-
The amount of data received by the application from requests. Each incoming HTTP request can be no larger than 32MB.
This includes:
- data received by the application in secure requests and non-secure requests
- uploads to the Blobstore
- data received in response to HTTP requests by the URL fetch service
- Secure Outgoing Bandwidth
- The amount of data sent by the application over a secure connection in response to requests. Secure outgoing bandwidth also counts toward the Outgoing Bandwidth quota.
- Secure Incoming Bandwidth
- The amount of data received by the application over a secure connection from requests. Secure incoming bandwidth also counts toward the Incoming Bandwidth quota.
| Resource | Free Default Limit | Billing Enabled Default Limit | ||
|---|---|---|---|---|
| Daily Limit | Maximum Rate | Daily Limit | Maximum Rate | |
| Outgoing Bandwidth (billable, includes HTTPS) | 1 GB | 56 MB/minute | 1 GB free; 14,400 GB maximum | 10 GB/minute |
| Incoming Bandwidth (includes HTTPS) | 1 GB; 14,400 GB maximum | 56 MB/minute | None | None |
Search
Free quotas for Search are listed in the table below. Refer to the Java, Python, and Go documentation for a detailed description of each type of Search call.
Once billing is turned on, Search API resources are charged according to the rates on the pricing schedule.
| Resource or API Call | Free Quota |
|---|---|
| Total Storage (Documents and Indexes) | 0.25 GB |
| Simple Queries | 1000 queries per day |
| Complex Queries | 100 queries per day |
| Adding documents to Indexes | 0.01 GB per day |
| Other API Calls (billed as operations) | 1000 operations per day |
The application console quota section displays a raw count of API requests. Note that when indexing multiple documents in a single call, the call count is increased by the number of documents.
The Search API imposes these limits to ensure the reliability of the service:
- 100 aggregated minutes of query execution time per minute
- 15,000 Documents added/deleted per minute
Note: Although these limits are enforced by the minute, the Admin Console displays the daily totals for each. Customers with Silver, Gold, or Platinum support can request higher throughput limits by contacting their support representative.
Sockets
- Daily Data and Per-Minute (Burst) Data Limits
- Applications using sockets are rate limited on a per minute and a per day basis. Per minute limits are set to handle burst behavior from applications.
| Resource | Per Day Limits | Per Minute (Burst) Limits |
|---|---|---|
| Socket Bind Count | 864,000 | 4,800 |
| Socket Create Count | 864,000 | 4,800 |
| Socket Connect Count | 864,000 | 4,800 |
| Socket Send Count | 663,552,000 | 3,686,400 |
| Socket Receive Count | 663,552,000 | 3,686,400 |
| Socket Bytes Received | 20 GB | 113 MB |
| Socket Bytes Sent | 20 GB | 113 MB |
Task queue
- Task Queue API Calls
- The total number of times the application accessed the task queue service to enqueue a task.
- Task Queue Stored Task Count
- The total number of tasks the application has enqueued that are not yet executed.
- Task Queue Stored Task Bytes
- The bytes consumed by tasks the application has enqueued that are not yet executed. This quota is counted as part of Stored Data (billable).
Tip: You can configure the Stored Task Bytes Limit by adjusting your queue configuration. See the Python, Java, or Go documentation for more details.
These limits apply to all task queues:
| Resource | Free Default Limit | Billing Enabled Default Limit | ||
|---|---|---|---|---|
| Daily Limit | Maximum Rate | Daily Limit | Maximum Rate | |
| Task Queue API Calls | 100,000 | n/a | 1,000,000,000 | n/a |
| Resource | Free Default Limit | Billing Enabled Default Limit |
|---|---|---|
| Task Queue Stored Task Count | 1,000,000 | 10,000,000,000 |
| Task Queue Stored Task Bytes | 500 MB. Configurable up to 1 GB. | None. Configurable up to the Stored Data (billable). |
The following limits apply to task queues according to their type:
| Push Queue Limits | |
|---|---|
| Maximum task size | 100KB |
| Queue execution rate | 500 task invocations per second per queue |
| Maximum countdown/ETA for a task | 30 days from the current date and time |
| Maximum number of tasks that can be added in a batch | 100 tasks |
| Maximum number of tasks that can be added in a transaction | 5 tasks |
| Combined Limits (Push and Pull Queues) | |
|---|---|
| Maximum number of active queues (not including the default queue) | Free apps: 10 queues, Billed apps: 100 queues |
| Pull Queue Limits | |
|---|---|
| Maximum task size | 1MB |
| Maximum countdown/ETA for a task | 30 days from the current date and time |
| Maximum number of tasks that can be added in a batch | 100 tasks |
| Maximum number of tasks that can be added in a transaction | 5 tasks |
| Maximum number of tasks that you can lease in a single operation | 1000 tasks |
| Maximum payload size when leasing a batch of tasks | 32MB (1MB when using the REST API) |
| Combined Limits (Push and Pull Queues) | |
|---|---|
| Maximum number of active queues (not including the default queue) | Free apps: 10 queues, Billed apps: 100 queues |
Note: Pull queues are not available in PHP.
URL fetch
- URL Fetch API Calls
- The total number of times the application accessed the URL fetch service to perform an HTTP or HTTPS request.
- URL Fetch Data Sent
- The amount of data sent to the URL fetch service in requests. This also counts toward the Outgoing Bandwidth quota.
- URL Fetch Data Received
- The amount of data received from the URL fetch service in responses. This also counts toward the Incoming Bandwidth quota.
| Resource | Free Default Limit | Billing Enabled Default Limit | ||
|---|---|---|---|---|
| Daily Limit | Maximum Rate | Daily Limit | Maximum Rate | |
| UrlFetch API Calls | 657,000 calls | 3,000 calls/minute | 172,800,000 calls | 120,000 calls/minute |
| UrlFetch Data Sent | 4 GB | 22 MB/minute | 1 TB | 740 MB/minute |
| UrlFetch Data Received | 4 GB | 22 MB/minute | 1 TB | 740 MB/minute |
XMPP
- XMPP API Calls
- The total number of times the application accessed the XMPP service.
- XMPP Data Sent
- The amount of data sent via the XMPP service. This also counts toward the Outgoing Bandwidth quota.
- Recipients Messaged
- The total number of recipients to whom the application has sent XMPP messages.
- Invitations Sent
- The total number of chat invitations sent by the application.
- Stanzas Sent
- XMPP stanzas sent when the application sends a message, invitation, or presence information.
| Resource | Free Default Limit | Billing Enabled Default Limit | ||
|---|---|---|---|---|
| Daily Limit | Maximum Rate | Daily Limit | Maximum Rate | |
| XMPP API Calls | 46,000,000 calls | 257,280 calls/minute | 46,000,000 calls | 257,280 calls/minute |
| XMPP Data Sent | 1 GB | 5.81 GB/minute | 1,046 GB | 5.81 GB/minute |
| XMPP Recipients Messaged | 46,000,000 recipients | 257,280 recipients/minute | 46,000,000 recipients | 257,280 recipients/minute |
| XMPP Invitations Sent | 100,000 invitations | 2,000 invitations/minute | 100,000 invitations | 2,000 invitations/minute |
| XMPP Stanzas Sent | 10,000 stanzas | n/a | Based on your budget | n/a |