Hallo developers!
I’m regularly using the cloud environment.
From last two months there is a weird behavior.
I’m getting 10-20 email daily and the database gets each day min. 2mb/day increase.
I try to clear cache, + Dev tool DB analysis and Optimize but nothing changes.
It means soon I have to pay more to get more database MB.
Could you please tell me What changed?
The pattern you describe often points to recurring background jobs that run on a schedule (every few minutes or hourly) and repeatedly write to log tables.
Each scheduler run can create entries in:
- Scheduled Job Log: one row per job execution
- Error Log: when a job fails (often the same error over and over)
- Email Queue: when failures or alerts trigger notification emails
So I would start looking there.
@marc_centura
Thank you to taking care of this issue.
I have no new schedule log.
I have frappe.log error
frappe New Exception collected in error log
Site: ???.frappe.cloud
Form Dict: {}
Nothing else serious.
On Database.log
Warning a lot of these:
| database DDL Query made to DB:
ALTER TABLE `tabInventory Dimension` ADD COLUMN `mandatory_depends_on_backend` text
| | |
|----|----|----|
| Warning | 2026-07-01 19:05:02 | database DDL Query made to DB: ALTER TABLE `tabCustom Field` ADD COLUMN `mask` tinyint(4) NOT NULL DEFAULT 0, ADD COLUMN `set_only_once` tinyint(4) NOT NULL DEFAULT 0 |
| database DDL Query made to DB:
ALTER TABLE `tabCustom Field` ADD COLUMN `mask` tinyint(4) NOT NULL DEFAULT 0, ADD COLUMN `set_only_once` tinyint(4) NOT NULL DEFAULT 0 | | |
| Warning | 2026-07-01 19:05:02 | database DDL Query made to DB: ALTER TABLE `tabCustomize Form Field` ADD COLUMN `set_only_once` tinyint(4) NOT NULL DEFAULT 0 |
| database DDL Query made to DB:
ALTER TABLE `tabCustomize Form Field` ADD COLUMN `set_only_once` tinyint(4) NOT NULL DEFAULT 0 | | |
| Warning | 2026-06-25 19:01:41 | database DDL Query made to DB: ALTER TABLE `tabSerial and Batch Entry` DROP INDEX `type_of_transaction_index`, DROP INDEX `warehouse`, DROP INDEX `serial_no` |
| database DDL Query made to DB:
ALTER TABLE `tabSerial and Batch Entry` DROP INDEX `type_of_transaction_index`, DROP INDEX `warehouse`, DROP INDEX `serial_no` | | |
| Warning | 2026-06-25 19:01:41 | database DDL Query made to DB: ALTER TABLE `tabSerial and Batch Entry` ADD INDEX IF NOT EXISTS `warehouse_serial_no_posting_datetime_index`(warehouse, serial_no, posting_datetime) |
| database DDL Query made to DB:
ALTER TABLE `tabSerial and Batch Entry`
ADD INDEX IF NOT EXISTS `warehouse_serial_no_posting_datetime_index`(warehouse, serial_no, posting_datetime) | | |
| Warning | 2026-06-25 19:01:41 | database DDL Query made to DB: ALTER TABLE `tabBatch` ADD COLUMN `allow_negative_stock_for_batch` tinyint(4) NOT NULL DEFAULT 0 |
| database DDL Query made to DB:
ALTER TABLE `tabBatch` ADD COLUMN `allow_negative_stock_for_batch` tinyint(4) NOT NULL DEFAULT 0 | | |
Any clue?
Hi @krnkris,
One important thing first: the frappe.log and database.log you pasted are text files on the server filesystem, not database tables- they don’t count toward your database size at all. They’re just telling us what’s going on. To find what’s actually eating MB, you need to look at the doctypes (tables) on the site itself, not the log files.
And the DDL warnings (ALTER TABLE ... ADD COLUMN mask / set_only_once / ...) are harmless - those are standard schema changes that ran once when ERPNext/Frappe was updated. Adding empty columns adds virtually no data, so they’re not your growth.
The real growth is almost always Frappe’s own log/tracking doctypes.
How many new entries do you have each day in the following doctypes?
???.frappe.cloud/desk/scheduled-job-log
???.frappe.cloud/desk/error-log
???.frappe.cloud/desk/email-queue
google_calendar.sync runs on a fixed schedule in Frappe by default even if you never set up a calendar; with no calendar configured it just does nothing, but it still logs each run.
To disable the jobs you don’t need:
- Go to the Scheduled Job Type list (search “Scheduled Job Type” in the awesomebar, or
/app/scheduled-job-type).
- Open the ones you don’t use e.g.
google_calendar.sync and either tick Stopped and save, or select them in the list view and use the Stop action from the menu. Do the same for email_account.pull / notify_unreplied if you’re not pulling email into ERPNext, and reminder.send_reminders if unused.
- Stopped jobs stop running and stop logging immediately.
To stop the log table from ever getting this big again:
Open Log Settings (/app/log-settings) and set a short retention for Scheduled Job Log (e.g. 7–14 days) so old rows auto-clear. Frappe purges them on a daily job, but the default retention is long.
To reclaim the space you already lost, delete the old rows once retention is set (or bulk-delete from the Scheduled Job Log list). Note that “DB Analysis → Optimize” only defragments, it won’t remove rows.
IMPORTANT: Leave the core jobs you actually rely on enabled; just stop Google Calendar and anything else you don’t use, and cap the log retention.
@marc_centura
It is interesting,
I was done your suggestion to reduce the short retention for Scheduled Job Log 7 days.
The tabVersion still increases nothing changed.
How to shorten the tabVersion yesterday was 87MB now in the morning 92,77MB ??!!
I cleared a lot of emails + cleared the deleted files nothing changes.
Any ideas?