ERPNext stops working out of nowhere

Hi,

I’ve been working on ERPNext and making some code changes. The developer mode is set to 1, and I’m working on a VM with 2GB RAM allocated.

However, it’s happening a lot lately that after making some changes in .py when I fire bench restart, or even when opening a new DocType, say Sales Invoice, ERPNext hangs and stops loading. Since I’m using a reverse proxy, it shows me 502 Proxy Error after a few minutes.

Now, I got to restart the server to fix it. And it happens every time I make some changes in the code and it’s getting really annoying

Help would be appreciated

Thanks!

Hi,

After you make changes to the .py files, try running the following 2 commands in the order;

sudo bench restart
sudo bench migrate

The migrate command will push the code changes and reload the file correctly
You might encounter a 502 error for a brief time of like 3-4 seconds but it will work fine after that

Thanks for your help!

The issue was finally fixed by removing –quiet from all three workers in Procfile.