Frappe.limits.update_site_usage

hello friends I have a big problem

{‘event’: u’hourly’, ‘retry’: 0, ‘log’: <function log at 0x7f451a256758>, ‘site’: u’erpnext’, ‘job_name’: u’frappe.limits.update_site_usage’, ‘method_name’: u’frappe.limits.update_site_usage’, ‘method’: <function update_site_usage at 0x7f451a66a848>, ‘user’: u’Administrator’, ‘kwargs’: {}, ‘is_async’: True}
Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 103, in execute_job
method(**kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/limits.py”, line 243, in update_site_usage
with open(os.path.join(frappe.get_site_path(), ‘site_data.json’), ‘w’) as outfile:
IOError: [Errno 13] Permission denied: u’./erpnext/site_data.json’

What are the file permissions of site_data.json?

You can check it with (assuming that the name of your site is erpnext)

ls -al sites/erpnext
1 Like

Hi, thank you for taking the time for my problem.

sftp://erpnext@XXX.XXX.XXX.XXX/opt/bitnami/apps/erpnext/htdocs/frappe-bench/sites/erpnext/site_config.json

Yes directory name erpnext. Screenshot_1

When you execute the command you suggested to me, it gives the following error.

seneraydin@erpnext-1-vm:~$ ls -al sites/erpnext
ls: cannot access ‘sites/erpnext’: No such file or directory

Thanks Again

Few notes here.

You should be executing the command from bench directory and not your home directory.

Why are you looking at file permissions of site_config.json when the clearly states the issue is with site_data.json?

And please post text instead of images whenever possible.

3 Likes

Thanks. I’ve solved this problem. I no longer receive the error message. Now there are other problems. :frowning:

I am also facing the same issue of Frappe.limits.update_site_usage how to fix??

I am using bitnami ERPNext stack on Google cloud what are the permissions or limits to be changed and in which file please help

google cloud services do not recommend very high billing comes

I’ve tried too many times. I don’t remember how. I don’t use Google cloud or bitname. The private server does not have such problems.

Billing is not a issue at all for me it is paid by the organisation please suggest me solution of this error Sir

I solved that problem a long time ago. Believe me, I don’t remember how. I installed my own server now and I do not receive those errors anymore.