Patient Report download pdf over SSL - slow

Situation
When trying to download the pdf on SSL (port 443) from patient report it takes up to 2 minutes or more for OpenEMR to respond. Whereas if you try from normal 80 there is no problems. For security SSL is required so using the normal port 80 is not an option. We have a domain and a certificate for it, from lets encrypt. It’s a local server.

I set it up using GitHub - lukas2511/dehydrated: letsencrypt/acme client implemented as a shell-script – just add water which a script. I cant see how this could be the problem but I put it out there just in case.

I saw an older issue saying html2pdf server configuration might be the problem but from what I read OpenEMR has now moved away from that to mPDF is that right?

I can’t seem to figure out what the problem is – any ideas?

OpenEMR Version
I’m using OpenEMR version 5.02

Browser:
I’m using: Firefox

Operating System
I’m using:
Linux Ubuntu Server running docker OpenEMR

Logs did you check the logs?
There doesn’t seem to be anything in the logs pertaining to this.