Problem 504 on Data Import

I tried to import a .csv file with the name of some companies, but when I do this, it takes a long time, displaying a 504 error. Because of this I changed the http_timeout to 300, but for big instances it was not sufficient. Then, I changed for 600 the value of the http_timeout, consequently my server get down (started on 55 degrees and went around 100 degrees).

I would like to know why is taking so much time to import the data and what I could do to resolve it

Thanks in advance

You can import data in batches

Thanks for the help, but I never used .bat
Should I translate from .csv to .bat then submit it?
What would be the format of the data?

Also, where would I upload it? As on the import page only have for .csv files

I meant that you can try uploading in small batches, say 500 at a time.

Haha
Now I got it
Well, the data which I am trying to import is less than 250 new instances :confused:
Do you have some idea how I am taking so much time to import it? (As I believe this would not happen)

:slight_smile: Which doctype is this?

Is Company
And on the .csv I just filled the three necessary fields

That really should not heat up your server and bring it down! Will
investigate.

Thanks!
I’ll be waiting =)

What is weird is that I tested with the doctype Customer and worked with higher instance
For example, on the Company the maximum that I’m being able to import is 13 instances, while on the Customer is around 300…
No idea the reason for this

This is because Company is expensive to make (erpnext/company.py at develop · frappe/erpnext · GitHub). Are you trying to add companies as a customer or setting up n number of companies (for using ERPNext) in a single instance?

I’m trying to add Company as Company. On my .csv file each line is a new company (starting on line 22)
Do you think this can be caused by the server capactiy?

Are you trying to add 250 companies to the same database? That would be too much.

Do you mean you own 200+ companies? :open_mouth:

Anyway, Inserting a company record is very expensive, for every company system creates it’s chart of accounts, chart of cost centers, default warehouses etc. Hence, one company record insertion is equivalent to 100-1000 other records insertion (depending on select COA).

Try to upload in very small batches like 5-10 at a time.

1 Like

The company asked on the customer form is not the Company that he works but mine? If yes, now its make sense haha

The company asked on the customer form is not the Company that he works but mine? If yes, now its make sense haha

And how could I select the company that my customer works for?

Yes, Company in Customer form is your company. It is needed to create account ledger for the customer (deprecated company in version 5).

Ok
Thanks for the help guys!