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.