Sales invoice upload error

{‘event’: u’data_import’, ‘retry’: 0, ‘log’: <function log at 0x7f0986af7050>, ‘site’: u’myacc7.local’, ‘job_name’: u’Import on 17-04-2019 21:03:28’, ‘method_name’: u’upload’, ‘method’: <function upload at 0x7f098766c230>, ‘user’: u’Administrator’, ‘kwargs’: {‘from_data_import’: u’Yes’, ‘data_import_doc’: u’Import on 17-04-2019 21:03:28’, ‘user’: u’Administrator’}, ‘is_async’: True}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 103, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py”, line 439, in upload
error_log_doc = frappe.log_error(error_trace)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1482, in log_error
method=title)).insert(ignore_permissions=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 234, in insert
self.db_insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 312, in db_insert
), list(d.values()))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 168, in sql
self.check_transaction_status(query)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 295, in check_transaction_status
frappe.throw(_(“Too many writes in one request. Please send smaller requests”), frappe.ValidationError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 353, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 339, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 312, in _raise_exception
raise raise_exception(msg)
ValidationError: Too many writes in one request. Please send smaller requests

May be we need to change the fiscal year?

I think it’s because to many records, how many records you’re trying to upload?

Around 500, I have succeed in 2 attempts with similar no of records,
All records are before new fiscal year, like before 3-31, but I am getting error for the records are in new year starting from 4-1, I have created the new year also.

What’s the max sales invoice records can import at once?