504 Gateway Timeout when using Sales by Date Report

Today I tried to use Sales by Date report on InvoicePlane 1.4.6. No matter what parameters I set for the date range I am getting a 504 Gateway Timeout error with the report failing to load.

All other reports and pages load as expected on this installation.

On my other installation (hosted on a different account entirely) I can use Sales by Date report without problems.

Version for that installation is reported as 1.4.4.

Is this possibly a bug in 1.4.6?
Can anyone else check if they have v1.4.6?

504 Gateway Timeout usually happen if the server takes too long to generate the report and the browser then closes the connection.

Also follow the FAQ for problems and share your log here.

I have since updated to 1.4.8 Invoiceplane but seems to be giving the same result. Will check out log files and see if it gives any hints.

This is all the log files will give me: http://pastebin.com/NJTyAmT1

Also checked the file size of /application/modules/reports/models/mdl_reports.php against the working installation and have the same file size so guessing there is no problem with the php file itself.

Browser console giving me no clues.