Closed llamafilm closed 1 month ago
I've also noticed the warning but haven't been able to identify the problem yet. Thank you for the logs; they will be very helpful. I will look into this issue soon.
I believe the problem is located here: https://github.com/Kani999/netbox-attachments/blob/main/netbox_attachments/template_content.py#L128 during the initialization of the plugin for models.
@llamafilm could you try to install branch 67-apps_not_ready_warning_msg
. I think it's fixed.
Thanks. I tested that branch and the warning is gone. Looks OK to me.
Since installing this plugin, I am seeing this warning often in the logs.
This is 100% repeatable every time I run
systemctl restart netbox.service
, and it also happens at some other times. If I disable this plugin in configuration.py then the warnings stop.The Django docs suggest this is caused by accessing the database during
AppConfig.ready()
but I can't tell where in the code this is happening. For debugging, I enabled postgreslog_statement
and captured the attached logs during the netbox service restart. Without this plugin, there are 4 queries. With this plugin enabled, there are 704 queries!without attachments.log with attachments.log