• High memory usage with ecweb v4

    From Nightfox@1:103/705 to echicken on Wed Dec 21 16:42:34 2016
    Hi echicken - I've noticed that while using ecweb v4, Synchronet's memory usage seems to go up, as if there's a memory leak somewhere. I'm not sure JavaScript itself would have a memory leak, so I'm wondering if something in the JS may be generating a memory leak within Synchronet itself. I noticed that after using ecweb for a while, my BBS's web site will start reporting "Internal server error", and the Synchronet control panel will also start reporting other strange errors such as being unable to read files, etc. I noticed the memory usage on my BBS machine in such cases is very high, almost 100%, and when I close and re-start Synchronet, memory usage drops dramatically, and things are back to working normally again

    Also, I noticed that when I load or reload one of the ecweb pages, memory usage on my BBS machine goes up (by maybe 2MB, 10MB, etc.).

    I'm running Synchronet on Windows - Not sure if that makes a difference.

    Nightfox

    ---
    * Synchronet * Digital Distortion: digitaldistortionbbs.com
    * Origin: Vertrauen - vert.synchro.net (1:103/705)
  • From echicken@1:103/705 to Nightfox on Thu Dec 22 00:26:06 2016
    Re: High memory usage with ecweb v4
    By: Nightfox to echicken on Wed Dec 21 2016 16:42:34

    Hi echicken - I've noticed that while using ecweb v4, Synchronet's memory usage seems to go up, as if there's a memory leak somewhere. I'm not sure JavaScript itself would have a memory leak, so I'm wondering if something in the JS may be generating a memory leak within Synchronet itself. I

    I've seen a bit of this and have suspected the same thing, but it's never been clear to me whether it's coming from the webserver or elsewhere on the BBS (I run a lot of stuff under Synchronet). Knowing that it's cropped up for you since setting up the new web UI narrows things down ... a bit.

    Each time you load a new page, the webserver loads and executes a script. I wouldn't expect those scripts' memory usage to persist after the page is sent. But I don't know a lot of what's going on behind the scenes, when an HTTP session really ends, when that memory is really freed up, etc.

    Also, I noticed that when I load or reload one of the ecweb pages, memory usage on my BBS machine goes up (by maybe 2MB, 10MB, etc.).

    Does it go up and then down? Is this happening more on the forum page, or elsewhere? If reloading anything other than the forum a bunch of times can trigger this, then it may be a more general webserver bug. If it happens specifically in the forum, the problem may be tied to a message base function. I suppose I can do some testing to try to narrow it down.

    I'm contemplating some changes to the forum which may help with this a bit, but might not help entirely depending on where the problem lies.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    * Synchronet * electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - vert.synchro.net (1:103/705)
  • From Nightfox@1:103/705 to echicken on Fri Dec 23 18:40:34 2016
    Re: High memory usage with ecweb v4
    By: echicken to Nightfox on Thu Dec 22 2016 00:26:07

    Also, I noticed that when I load or reload one of the ecweb pages,
    memory usage on my BBS machine goes up (by maybe 2MB, 10MB, etc.).

    Does it go up and then down? Is this happening more on the forum page, or elsewhere? If reloading anything other than the forum a bunch of times can trigger this, then it may be a more general webserver bug. If it happens specifically in the forum, the problem may be tied to a message base function. I suppose I can do some testing to try to narrow it down.

    I've done a few quick tests just now. Memory usage seems to stay up after loading a page. And it happens with any page on the server, not just the ecweb pages. So it seems it's not specific to ecweb. I did see one instance where memory usage went up and then back down after the page was loaded, but generally memory use seems to stay up.

    Nightfox

    ---
    * Synchronet * Digital Distortion: digitaldistortionbbs.com
    * Origin: Vertrauen - vert.synchro.net (1:103/705)
  • From echicken@1:103/705 to Nightfox on Sat Dec 24 00:07:08 2016
    Re: High memory usage with ecweb v4
    By: Nightfox to echicken on Fri Dec 23 2016 18:40:34

    I've done a few quick tests just now. Memory usage seems to stay up after loading a page. And it happens with any page on the server, not just the ecweb pages. So it seems it's not specific to ecweb. I did see one

    Interesting. Thanks for doing those tests.

    If this is bloat that grows when serving *any* page, it would make some sense that my web UI would exacerbate it / reveal it more quickly. (There are a bunch of periodic asynchronous requests from the browser, especially in the forum.)

    I'd be curious to know if it's worse when serving SSJS (or XJS) files, or if the same behaviour occurs when serving static content (like an HTML file). I may do some tests here to see if I can narrow it down. I wouldn't be shocked if it's worse when JS is involved; I have my JS memory limits set to ridiculous levels here, so that may be why this isn't as much of a problem for me.

    instance where memory usage went up and then back down after the page was loaded, but generally memory use seems to stay up.

    I'm making a different version of the forum script in an attempt to make it faster / more efficient, but I'm not sure how much of an impact this will have on memory use. We'll see how it goes.

    Next time I'm chatting with Deuce, I'll see if he can think of a likely place where this (possible) memory leak would be happening.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    * Synchronet * electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - vert.synchro.net (1:103/705)