Out of memory error archiving a log file

后端 未结 1 970
囚心锁ツ
囚心锁ツ 2021-01-29 08:02

I am having a problem with a console job that runs and creates a daily log file that I archive at midnight.

This creates a blank log file for the next day and an archiv

相关标签:
1条回答
  • 2021-01-29 08:31

    try: keep the queue and stream position in class scope, try GC.Collect() when getting out of memory exception and call function again. seek stream to last position and continue. or: use one database like sqlite and keep newest 100000 record in each table.

    0 讨论(0)
提交回复
热议问题