New Site/Instance Company Setup that fails

Hi all,

I’ve seen this happening in a few instances, so sharing my experience here.

I’ve seen this happening twice on Digital Ocean droplets 2GB, 50GB SSD version with ERPNext 12 on Python 3 and Ubuntu 18.04.

Easy Install goes through fine and then I login using the administrator password and I have to do the setup for the first company. You key in all data and you click on Complete Setup and the Setup fails after many minutes. Then you redo the setup and things go through this time and you think everything is hunky dory and you start importing masters. Like on one instance, we got the HR Module all ready, did the Salary Structure, attendance, salary structure assignments and then realized that you can’t do a Payroll Entry because the Cost Center is not setup. I’m guessing the Cost Center was not setup correctly because the Setup failed and there are things that are left out when you run setup again). Trying to add a Cost Center through the web interface does not help because it throws an error. (I overcame this problem by running a few database commands and adding the Cost Center for AB Company and Main - ABC, but that’s not the main theme of this post).

My thoughts are the following (EXPERTS : Please validate): You can prevent this disruption by:

Option 1: Before logging in using the administrator ID, increase the http_timeout to a bigger value (I think the default value is 1800, so 5000 or 6000 should work) by running the command bench config http_timeout 6000 from the frappe-bench folder.

Option 2: As you login using the administrator setup, use a Dummy company for the initial setup so that even if it fails, it doesn’t matter. Once the setup goes through, go to Accounts>Company>New and setup the actual company you want to setup and the Setup at this stage goes through without any problems.

Hope this helps.

Thanks

Jay