The issue you are facing has to deal with the formatting of your DATABASE_URL value in your .env file. What you need to do is add a ? and a timeout command after your url
update the value in your .env file like this
DATABASE_URL = 'url + ?sslaccept=strict&connect_timeout=500'