Forums

/var/log/[app].server.log.2.gz is now missing

first of all i want to say pythonAnywhere is awesome so thank you.

Observation

  • for the last 3.5 years i have had a dashboard app fetching 3 server log files, via sftp, once per day:

1) /var/log/[app].server.log

2) /var/log/[app].server.log.1

3) /var/log/[app].server.log.2.gz

  • today /var/log/[app].server.log.2.gz is missing
  • over the last couple of months i have noticed that 1 or more of the above log files go missing periodically

Questions

  • why are these log files disappearing occasionally?
  • is it possible for you guys to update the logging code so these files do not going missing periodically?

Thanks,

Louie

-

p.s. if you are a spotify user and you want a tool to help curate your playlists head over to spotifyfinder.com (it is free, open source, tracker free, ad free) - this web app is hosted on pythonAnywhere. the log files mentioned above are from this web app.

Are you sure those files are missing? I can see them in our admin interface, and you should be able to see them at this link (that link will only work if you're logged in as slipstreamcode, no-one else will be able to access it).

hi Giles,

  • right now when i look at var/log www.spotifyfinder.com.server.log.2.gz is missing, it has been missing for days.

  • one of these log files (server.log, server.log.1, server.log2.gz) is going missing periodically and right now server.log.2.gz is missing.

  • something is causing the server.log files to disappear periodically. is this something you could fix?

Louie

We rotate the logs periodically and when they reach a specific size. They are not constant.

  • absolutely the log files are rotated.
  • for years the server.log.x.x files were rotated and but they did not randomly disappear
  • why would server.log.2.gz be deleted instead of rotated?
  • so are you saying server.log.x.x files can be deleted randomly?
    if yes i can update my dashboard to expect this.

Hi Louie -- in general I would not rely on log files for anything mission-critical. They're there to help you debug issues with your site rather than as longer-term storage of anything important. What are you logging to them? Perhaps it would be better to log to a specific file in your home directory.