PhantomSDR Support Forum

General Category => PhantomSDR Bugs => Topic started by: Bas ON5HB on Oct 19, 2024, 04:07 PM

Title: Chat-log-file keepsa growing in memory.
Post by: Bas ON5HB on Oct 19, 2024, 04:07 PM
Hi Steven,

The Log-file keeps growing in memory, because if I delete it, and a user posts sometning, it will wite all chat-posts.
It doesn't seem to limit the number of chat messages and delete old lines say after 50 lines or so.

Also, it doesn't notice when I delete the chat-file, it should and then present an empty chat to users so I can purge stuff via logrotate.

I think this is the problem why it crashed on chat-messages. ;)
Title: Re: Chat-log-file keepsa growing in memory.
Post by: magicint1337 on Oct 20, 2024, 07:12 PM
It should after like 100 messages, ill look into it
Title: Re: Chat-log-file keepsa growing in memory.
Post by: Bas ON5HB on Oct 21, 2024, 05:08 PM
I have checked the code, but I think it doesn't do that.

Your coding is a bit different then mine, as you have IF / THEN statement but I see no ELSE after it.

It does state >= 100, but I'm not sure what it does next.

I would say <= and after ELSE remove messages from memory and writing.

Same thing happens with markers.json, it reloads the markes but doesn't show them in the waterfall after 1 minute (too short in my opinion, 5 minutes would be better, or even 10).

It tells you the new markers are read, but they don't show.
Title: Re: Chat-log-file keepsa growing in memory.
Post by: magicint1337 on Oct 24, 2024, 02:16 PM
When i added the markers reload i tested it and it worked on my site, maybe caching? Ill write it on my todo.
Title: Re: Chat-log-file keepsa growing in memory.
Post by: Bas ON5HB on Oct 24, 2024, 04:06 PM
It is not that important, as with a reload of spectrum they are there.

I run everything with Firefox if that helps ;)
Title: Re: Chat-log-file keepsa growing in memory.
Post by: magicint1337 on Oct 25, 2024, 06:33 PM
Yea, i thought they werent added at all, adding them live will be a bit more complex but doable.