Project

General

Profile

Bug #4527

Memory leak after commit f9df9b7 (http server: implement websockets for instant messages)

Added by Jeroen Hendriks over 7 years ago. Updated over 7 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
General
Target version:
-
Start date:
2017-08-06
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Found in version:
4.3.f9df9b7
Affected Versions:

Description

Hello,

After Commit f9df9b7 the http server is leaking memory.
Occurs whenever the web interface is open.

For example while logged in as admin user with the status tab open while a couple of recordings are running in the background about 1Mb memory is lost every minute. (Using Firefox).

After installing one revision older (063765e) everything is just fine again.
I am running TVHeadend on a x86_64 Slackware 14.2 host.


Subtasks

Bug #4521: Memory leak?Rejected

Actions

History

#1

Updated by Jaroslav Kysela over 7 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|302169813ebfc6860fcc7824e2463dede10c12eb.

#2

Updated by Petar Ivanov over 7 years ago

Jaroslav Kysela wrote:

Applied in changeset commit:tvheadend|302169813ebfc6860fcc7824e2463dede10c12eb.

Memory leak continue, after 1 day work get 1 gb memory, before don't use too much memory.

#3

Updated by saen acro over 7 years ago

Is anything goes by websockets currently?
check box enabled/disabled will be good solution.

#4

Updated by Jeroen Hendriks over 7 years ago

Petar Ivanov wrote:

Memory leak continue, after 1 day work get 1 gb memory, before don't use too much memory.

Just checked, I am also still leaking memory (but at a lot slower rate then before the websocket fix). 2Gb mem in use after 24 hours uptime on my setup.
I have no leakage on my dvb-c SAT/IP tvheadend server (also running rev 30216981). But I never use the webinterface of that machine.

Just restarted the frontend tvheadend server and will let it run for another 24hours without using the webinterface and report back here if it still is eating memory.
Then we know for sure if it's leaking in the new websocket code or not.

#5

Updated by Petar Ivanov over 7 years ago

saen acro wrote:

Is anything goes by websockets currently?
check box enabled/disabled will be good solution.

Open web interface by Chrome browser.
Where is this box enable/disable ?

#6

Updated by Petar Ivanov over 7 years ago

Jeroen Hendriks wrote:

Petar Ivanov wrote:

Memory leak continue, after 1 day work get 1 gb memory, before don't use too much memory.

Just checked, I am also still leaking memory (but at a lot slower rate then before the websocket fix). 2Gb mem in use after 24 hours uptime on my setup.
I have no leakage on my dvb-c SAT/IP tvheadend server (also running rev 30216981). But I never use the webinterface of that machine.

Just restarted the frontend tvheadend server and will let it run for another 24hours without using the webinterface and report back here if it still is eating memory.
Then we know for sure if it's leaking in the new websocket code or not.

Year, not too fast, but 1gb for 24 hours, before i have 2 months uptime and not too much memory used.

#7

Updated by saen acro over 7 years ago

Petar Ivanov wrote:

Where is this box enable/disable ?

That's what we need.
When something is not used why to work?

#8

Updated by Jeroen Hendriks over 7 years ago

Jaroslav Kysela wrote:

Applied in changeset commit:tvheadend|302169813ebfc6860fcc7824e2463dede10c12eb.

Jaroslav can you set the issue back to OPEN? It's not fixed 100%

Did a 24 hour test run (no usage of the webinterface) and it went from 350Mb to 417Mb memory usage. I think that ok since a lot is running within tvheadend(recordings, ota egp, live tv to kodi etc etc.

But when the webinterface is used (status screen, epg, managing recordings etc) it goes from 350Mb usage to 2Gb and more after 24 hours of uptime.
Something is still not ok in the new web code.

#9

Updated by Jaroslav Kysela over 7 years ago

  • Status changed from Fixed to Accepted

Do you see a big difference for some items in debugging / memory information entries when the memory consumption is increased ?

#10

Updated by Mark Clarkstone over 7 years ago

Jaroslav Kysela wrote:

Do you see a big difference for some items in debugging / memory information entries when the memory consumption is increased ?

I'm seeing this on my Banana Pi running Armbian, I opened #4521 so you may want to close mine :) Will setup a script to pull in debugging json data every hour & report back.

#11

Updated by Jaroslav Kysela over 7 years ago

  • Status changed from Accepted to Fixed

Applied in changeset commit:tvheadend|e489a4adb4beef0c574a2198d0faf052193e1258.

#12

Updated by Jaroslav Kysela over 7 years ago

I found another problem in the websocket code, pls test v4.3-331-ge489a4adb .

#13

Updated by Jeroen Hendriks over 7 years ago

Jaroslav Kysela wrote:

Do you see a big difference for some items in debugging / memory information entries when the memory consumption is increased ?

No there is everything normal. Going to test v4.3-331-ge489a4adb now :)

#14

Updated by Jeroen Hendriks over 7 years ago

Jeroen Hendriks wrote:

Jaroslav Kysela wrote:

Do you see a big difference for some items in debugging / memory information entries when the memory consumption is increased ?

No there is everything normal. Going to test v4.3-331-ge489a4adb now :)

Thanks, it looks ok again. Usage stays around 400Mb with the webinterface open in IE and firefox.

#15

Updated by Petar Ivanov over 7 years ago

Confirms. No anymore memory leaks, running more than 24 hours with open webinterface in 2 Chrome and from Smart TV and used 300 mb.

Also available in: Atom PDF