dstudio
(Nedim T)
June 25, 2016, 4:16pm
1
Hi there,
I need to deploy my app on Heroku. However, everything looks perfect except one thing: I cannot set debug to true in frontend/web/index.php – it’s because of Heroku. If you don’t understand me you can check it here: http://stackoverflow.com/questions/28259504/setup-yii2-advanced-on-heroku
site/error returns me:
Error (#-1 )
An internal server error occurred.
The above error occurred while the Web server was processing your request.
Please contact us if you think this is a server error. Thank you.
and I cannot understand why this is happening because I cannot set debug to true. How do you handle these unknown exceptions in the production environment?
Also, I cannot go to logs because the app is on Heroku and I don’t have SSH or FTP access. I deploy the app by Git.
Thanks.
Hi
Always check runtime folder for error. i hope there you can check log trace out failure.
phtamas
(Phtamas)
June 27, 2016, 7:24pm
3
You need a custom log target that is compatible with Heroku’s logging system. Like this one.
samdark
(Alexander Makarov)
June 27, 2016, 10:53pm
4
In general, it’s a bad idea to enable debug toolbar at production.
aminkt
(Amin Keshavarz)
December 23, 2019, 9:19am
5
Sure. But some times need to log user request to fix unexpected bugs and exceptions.
how yii-debug module works and why in production that stop log data?
samdark
(Alexander Makarov)
December 23, 2019, 4:25pm
6
But some times need to log user request to fix unexpected bugs and exceptions.
Write these into log.
how yii-debug module works and why in production that stop log data?
In order to collect useful data it is meant to be run in YII_DEBUG
mode. That has very significant performance implications.
Also, if exposed, debug toolbar is a certain way to make your server very insecure.