ERPNext Conference 2019* ERPNext.com Blog

Restarting with inotify reloader


#1

Hello everyone,

I’m new to frappe and ERPNext. I’m trying to setup ERPNext on Windows Linux Subsystem running Ubuntu.

After some setup issues, I was able to run ERPNext successfully. On the initial setup of company, I get error screen. After trying to submit multiple times, I was able to successfully create the company.

I observed the below logs.

22:07:51 web.1            |  * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/portal/utils.pyc', reloading
22:07:51 web.1            | INFO:werkzeug: * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/portal/utils.pyc', reloading
22:07:51 web.1            |  * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/portal/utils.pyc', reloading
22:07:51 web.1            | INFO:werkzeug: * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/portal/utils.pyc', reloading
22:07:51 web.1            |  * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/data/__init__.pyc', reloading
22:07:51 web.1            | INFO:werkzeug: * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/data/__init__.pyc', reloading
22:07:51 web.1            |  * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/data/__init__.pyc', reloading
22:07:51 web.1            | INFO:werkzeug: * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/data/__init__.pyc', reloading
22:07:51 web.1            |  * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/data/industry_type.pyc', reloading
22:07:51 web.1            | INFO:werkzeug: * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/data/industry_type.pyc', reloading
22:07:51 web.1            |  * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/data/industry_type.pyc', reloading
22:07:51 web.1            | INFO:werkzeug: * Detected change in '/home/swadeesh/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/data/industry_type.pyc', reloading
22:07:53 web.1            |  * Restarting with inotify reloader
22:07:55 web.1            |  * Debugger is active!
22:07:55 web.1            |  * Debugger PIN: 146-017-619

I can see inotify reloads detects changes on setup_wizard.load_messages and tries to restart the server. My browser, expecting a response gets error message when the server is reloaded.

This happens multiple times with different files.

I’m using production configuration. Started using bench start. Since I’m using Windows Linux Subsystem, the services are not started on boot. I have to start mysql and supervisor using sudo service <name> start and ERPNext manually using bench start.

Also, supervisorctl returns nothing.

swadeesh@SWAD-PC:~/frappe-bench$ sudo supervisorctl start all
swadeesh@SWAD-PC:~/frappe-bench$ sudo supervisorctl status
swadeesh@SWAD-PC:~/frappe-bench$

Is there a way to disable ‘inotify reloader’ so the changes are not picked and the server is not reloaded? Also How does it detect change when no change is made to the file.

EDIT: I started nginx using sudo service nginx start and ERPNext was available on localhost. Hope I don’t get reload issues.


#2

Mee too experiencing this issue :frowning: