ERPNext Conference 2019* ERPNext.com Blog

How long should submitting an invoice take?


#1

Hi,

Submitting a draft invoice at the moment take several seconds, almost a minute. Is this normal?


#2

No it’s not


#3

Is there a way to check what is the cause?


#4

Monitor your server resources


#5

Well i can see cpu usage getting to around 80% while it’s submitting but how does that help with finding the cause?


#6

Now look for the services running and see which ones are consuming the CPU.
Filter out all the possibilities of your server being compromised or misconfigured.

Do you have enough ram?


#7

I have 4GB RAM. This is on self hosted debian 9 VPS. Is that enough?


#8

Yes this is enough.


#9

The thing is, i’m submitting some really old invoices. Could that be the reason? I mean, there are a few thousands of invoices that came after those.


#10

Can not say anything without looking at the processes.


#11

Can’t post those atm, i’m doing a data import, so system usage will not be realistic. But theoretically speaking, would submitting old invoices be a lot slower than making and submitting new ones? I’m thinking it could have something to do with db indexes or rather lack thereof


#12

Yes, this could be a possible reason. This is because when you post older invoices/stock entries, it also recalculates entries in the ledger corresponding to the new backdated entry. If the entry is taking a lot of time, it will ultimately result in a time-out.

I would suggest testing this by creating an invoice on the current date with the same data just to crosscheck.

PS, you might be interested in this thread concerning posting/correction of historical data.


#13

That makes sense indeed. Thank you!