Sub topic 9
Limits and keeping the org active
This chapter assumes you already have a Developer Edition org and can log in through your My Domain URL and open Setup. It also assumes you have authorized the Salesforce CLI as alias my-dev-org. The goal is to learn what the org cannot do, how to see how close you are to each limit, and how to keep Salesforce from deleting the org.
Why limits matter in a free org
A Developer Edition org is free, so Salesforce caps it. The caps are small compared with a production org, and some of them surprise people mid-project. A data import fails because storage is full, or a script of API calls stops after a few thousand requests. Weeks after you stop using the org, it is gone. Each of these is predictable once you know where to look.
There are two kinds of limits:
- Org allocations are set by the edition, such as storage and the number of users. You can see them in Setup.
- Platform limits apply to every org on the multitenant platform, such as Apex governor limits. They exist so one customer's code cannot starve others of shared resources.
Main allocations of a Developer Edition org
The table lists the figures that matter most. Salesforce adjusts these values over time, so treat them as typical and confirm them in your own org.
| Resource | Typical Developer Edition value | What happens at the limit |
|---|---|---|
| Data storage | 5 MB | Inserts and updates fail with a storage limit error |
| File storage | 20 MB | File uploads fail |
| Full Salesforce user licenses | 2 | You cannot create more standard users |
| API requests | 15,000 per rolling 24 hours | Calls return `REQUEST_LIMIT_EXCEEDED` until usage drops |
| Sandboxes | None | Use scratch orgs instead |
| Production use | Not permitted | The org is for development and learning only |
Data storage in practice
Most records count as roughly 2 KB toward data storage, no matter how many fields they use. So 5 MB holds about 2,500 records. That is enough for learning and for small test data sets. It is not enough for a realistic load test. If you import a sample CSV of 10,000 rows, expect the import to fail partway through.
Some things do not follow the 2 KB rule. Large text and some other record types are counted differently, and a few standard objects cost nothing. If a number in your org looks wrong, the Storage Usage page shows storage per object.
API request limits
Every call to the REST, SOAP, or Bulk APIs counts against the 24-hour allocation. This includes calls made by the CLI, such as sf data query. The window is rolling, not reset at midnight. Calls made 23 hours ago still count.
A loop that runs a query for each record can burn through 15,000 calls quickly. Prefer one query that returns many rows, or the Bulk API for large loads.
Checking your usage
Check usage before you hit a limit. There are three places to look.
- Company Information. In Setup, search for Company Information. It shows the org edition, the user license counts, and the data and file storage used.
- Storage Usage. Search for Storage Usage in Setup. It breaks storage down by object, so you can find which object is using the space.
- System Overview. Search for System Overview in Setup. It shows the API requests used in the last 24 hours, along with counts of custom objects, Apex code size, and other limits.
From the terminal, the CLI can report the same API figures. This command lists every limit the org exposes, with its maximum and remaining values.
sf limits api display --target-org my-dev-orgLook for DailyApiRequests and DataStorageMB in the output. The numbers are a snapshot, so run the command again after a batch of work to see the change.
Apex governor limits
Apex has per-transaction limits that apply in every edition, including production. The Developer Edition does not make them lower, but it is where you first meet them. Some common ones are 100 SOQL queries and 150 DML statements per synchronous transaction. These are separate from the storage and API figures above.
You can read the live values from inside Apex with the Limits class. Run this as anonymous Apex, then read the debug log.
List<Account> accounts = [SELECT Id FROM Account LIMIT 10];
System.debug('Queries used: ' + Limits.getQueries() + ' of ' + Limits.getLimitQueries());
System.debug('DML statements used: ' + Limits.getDmlStatements() + ' of ' + Limits.getLimitDmlStatements());
System.debug('CPU time used (ms): ' + Limits.getCpuTime() + ' of ' + Limits.getLimitCpuTime());The first line runs one query, so the log should show 1 query used. The limit values depend on whether the code runs synchronously or asynchronously.
Inactivity and deletion
Salesforce can delete a Developer Edition org that nobody uses. The commonly published rule is that an org with no logins for about six months may be removed. Salesforce usually sends a warning email to the org's admin address before it deletes the org. Confirm the current rule in the Salesforce Developer Edition documentation, because the period has changed in the past.
Deletion is permanent. Salesforce does not restore a deleted Developer Edition org, and the username becomes free again. Anything you built is lost unless it is in version control.
Keeping the org active
The reliable approach is to log in through the browser on a schedule. Once a month is a safe habit. A login through the My Domain URL as a real user counts as activity.
Some details are worth knowing:
- Logging in through the browser is the safest signal. Activity that happens only through API integrations or scheduled jobs may not count as a login. Salesforce does not publish the exact rule.
- The warning email goes to the address on the admin user. If that address is an inbox you no longer read, you will not see the warning. Update it in your user settings.
sf org open --target-org my-dev-orgopens the browser already logged in, and it is a quick way to make a login happen. Add it to a monthly reminder.
Protecting yourself from limit problems
A few habits avoid most trouble:
- Keep test data small. Create a few dozen records per object. Delete test data you no longer need, then empty the Recycle Bin. Deleted records stay in the Recycle Bin and keep counting toward storage until you empty it or they expire.
- Do not store large files. With 20 MB of file storage, a few PDFs will fill it. Use small samples.
- Batch your API work. Use queries with
INclauses or relationship queries instead of one request per record. - Use scratch orgs for experiments. If you enabled Dev Hub, scratch orgs give you a fresh, disposable environment, and their data does not count against the Developer Edition's storage. The next chapter sections on Dev Hub cover their own daily and active limits.
- Check storage after imports. Open Storage Usage right after a large load, not when the next insert fails.
Common errors
| Error | Likely cause | Fix |
|---|---|---|
| `STORAGE_LIMIT_EXCEEDED` | Data storage is full | Delete records, empty the Recycle Bin, then retry |
| `REQUEST_LIMIT_EXCEEDED` | More than the 24-hour API allocation was used | Wait for the rolling window to drop, and batch requests |
| `LICENSE_LIMIT_EXCEEDED` | You tried to create a third full user | Deactivate a user, or use a different license type |
| Org not found at login | The org was deleted for inactivity | Sign up again and redeploy from source control |
Exercise
You imported 3,000 Contact records into your Developer Edition org and the import stopped halfway with a storage error. Name two places in Setup where you could confirm the cause, and two actions that would free space.
Show answer
Company Information shows the total data storage used against the 5 MB allocation, and Storage Usage shows which object is using it. To free space, delete records you do not need (for example the failed or test imports) and then empty the Recycle Bin, because deleted records still count until the bin is emptied.
Exercise
A colleague says a nightly script that calls the REST API will keep their Developer Edition org active, so they never log in by browser. Why is this risky, and what should they do?
Show answer
Salesforce does not publish whether API-only activity counts as a login, so the org could still be treated as inactive and deleted. The warning email also goes to the admin address, which they may not read. They should log in through the browser at least monthly, confirm the admin email is current, and keep their metadata in source control as a backup.