Looking at old logs on Heroku - heroku

I have a Ruby heroku app. It crashed. I rebooted it, it works. Fine. Such is the life of a computer program.
Now, I want to look at the error logs to see WHY it crashed. However, when I go to view logs, they start at the reboot. How do I find the logs from 30 minutes ago when the app crashed?

It appears that restarting an instance clears all logs so it's best to do this with care.
If you'd like to store logs long-term, look at implementing Log Drains

Related

Heroku app displays Application error after using it once or twice

I am going to provide an image of my log. Apparently, there is something in my code that is causing my application to crash on the website. I am using the MERN stack to create the website. After initial deployment, all was fine, however, after asking others to use the website, they would see, as would I, that the app would crash, and the only way to temporaily fix this, is my using heroku restart. Here is one screenshot of my log, and here is another. How do I fix this if I do not know what is breaking the website?

Heroku appears to be leaking memory after api-maintenance deploy - Enable allow-multiple-sni-endpoints feature

My Heroku App seems to be consuming more and more memory, so I think I may have a memory leak. It started happening at midnight, but I haven't made any changes in several days.
The latest change was a change by heroku maintenance, so I'm wondering if that might be the cause?
I plan to restart soon to prevent going over my limit.
It seems that Heroku had several platform issues yesterday. There were several "platform initiated" dyno restarts and it seems like things are back to normal now.

Heroku: Free dyno file system limitations

So I have a Heroku free account. Trying to run my portfolio from it. It uses a json file to contain my blog posts and portfolio information. I can update it through a basic CMS I created for it.
I wrote an article, and saved it, but I woke up the next day and checked, and the article was gone. I tested this theory by trying again with a test article. Again, the next day the article had gone. I was left with just the initial article I pushed to Heroku when I published the project.
Does this mean the Heroku free dyno does not retain the file system, and in-fact re-builds the entire project every time it spins down, then gets spun up again? It certainly appears this way.
Can somebody confirm this for me?
Thanks.
Did a little more research. I missed the daily cycling.
This is what Heroku has to say about its file system:
https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted
The Heroku filesystem is ephemeral - that means that any changes to the
filesystem whilst the dyno is running only last until that dyno is
shut down or restarted. Each dyno boots with a clean copy of the
filesystem from the most recent deploy. This is similar to how many
container based systems, such as Docker, operate.
In addition, under normal operations dynos will restart every day in a
process known as "Cycling".
This bottom quote answers my question. I did not realise the Dyno's were cycled daily, I assumed it was just based on server restart.

Windows App Certification Kit error

The kit started hanging for twenty minutes while testing an app, and I clicked cancel but it continued to hang. So I fired up task manager and killed it. Now it won't start at all due to error cleaning .etl file from the last session - no permission. It's in AppData/Local/Microsoft/AppCert/ftlog. Any suggestions?
No luck on Google search, and I've tried just deleting that file/folder. It's read only, and won't even show who owns it. The kit runs fine on the other accounts on my pc which have no ftlog folder since I haven't ran any sessions on those accounts. So I think getting rid of it would fix the problem. That's easier said than done however...
Also tried uninstalling/reinstalling Windows 10 sdk, but that didn't delete the AppData evidently.
Rebooted this morning and problem solved! Hopefully this post can save someone an hour or two of your life.

How do I know why my Azure instance doesn't start?

I deployed my service package into Windows Azure. Management Portal has been showing "waiting for the role instance to start" for 30 minutes already so I assume something is wrong.
I know that there's Azure Diagnostics, but is there some easier way to find what's going on in my instance - like some console displaying some detailed output or something?
In these cases, it is probably the most expedient to simply RDP into the box and see what is going on. Event logs, hitting the site, etc., from inside the machine usually gives you a pretty good idea. If you have Intellitrace (Visual Studio Ultimate), you can also enable that and suck down the logs to see what is happening. That works very well also.
#dunnry The problem is that you can't open a RDP session to the server if your Azure Role is not running, so you don't know anything what is going on.
Most of the times there is something wrong in your Azure Configuration files. Try removing parts and redeploy afterwards. Pay triple attention to your ConnectionStrings. Make sure that the ServiceDefinition ConfigurationSettings are all defined in the ServiceConfiguration ConfigurationSettings File.
What we basically do is to deploy on a nightly build basis. We can check our ChangeSets of the day before after an instance is not reaching the running state.
If the Azure Diagnostics doesn't tell you anything then I don't think so - no. Somewhat annoyingly, one thing that frequently causes problems is Azure Diagnostics initialization - e.g. if the diagnostics connection string is wrong.
If the role instances start but the app has problems then the remote desktop might help.
If all else fails, try Azure support - it's still free right now.

Resources