How to prevent random 302 canonical-ish redirect on custom template

How to prevent random 302 canonical-ish redirect on custom template

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)