Batch printing sales invoices fails - batches of 20 works fine

I’m trying to print last month’s sale invoices all at once (about 500). So in list view I apply the appropriate date filter and select Menu > Print, which should produce a pdf file with all the invoices in it.

The issue is that this never completes. It takes forever and then eventually throws out an error “Sorry! We will be back soon. Don’t panic. It’s not you, It’s Us” etc .

The same happens if I do it in batches of a 100. If I use 20 it works fine but that will take forever to do, especially since there is no pagination in list view in ERPNext (or Inverse selection) so selecting the next 20 every time will be a struggle.

Is there another better way to go about this? This is a self hosted solution. Is there some setting I can change to increase the threshold of invoices I can print at once? This is on ERPNext 10 btw, so I’m not sure if the process has been changed/ improved in the newer versions, please do tell if it was.

The answer to your issue is here:

Batch printing takes a lot of resources and it’s possible that your current hardware cannot handle that process. It will also help if you can optimize your mysql database. You can search the forum on how to do this.