Hi,
I have an application that's crashing after some time (a few hours), but it leaves no messages in the log output.
It's a long running application that gathers data from the internet every hour or so. It does this using some goroutines that gather and then store the data to a database and write out to a log file.
I noticed some things were blocking, and an observer pattern I used was just leaking memory like crazy. So I cleaned that all up and found a solution for logging that works better. Even still, I disabled the logging feature and it still crashes. However, the memory usage doesn't just climb immediately. It still slowly climbs, but I've seen it come down a little too. I'm still not 100% confident there isn't a small memory leak of course...But that's just the problem. It's hard for me to track down.
Is there anything I can do to get more details when the application exits?
Maybe something goes wrong with the http.ListenAndServe() ? And it's not crashing, but just exiting?
It's using about 40-50% memory when it crashes. I am also running this app on a VPS with 512MB of RAM. I hope I don't need a more powerful server. I wanted to keep this app fairly lean.
Any ideas for more detailed logging would be much appreciated, thanks!