Hi all!
I'm having an issue with the following error.
"!JavaScript /lokisden/mods/../web/lib/msgslib.ssjs line 61: out of memory"
I just finished updating from CVS 3.17. I've tried enabling debugging in the webserver to figure out what's going on, but no dice. I'm running on CentOS 7 and it was working fine before updating.
Any help with this would be greatly appreciated!
-Draco
To make it a little clearer, this only seems to happen when loading
email and after clicking on another page of it.
Hello Draco,
On Fri Oct 20 2017 22:24:56, Draco wrote to Draco:
To make it a little clearer, this only seems to happen when loading email and after clicking on another page of it.
What hardware are you running on?
I only ask, because I recently ran into out of memory errors as well, while running Synchronet's webserver (with everything else) on a Raspberry Pi 3. Once
the webserver ran for a few days or more, things would stop working until I rebooted.
I disabled the webserver and haven't had the problem since. I know it doesn't help the devs much because I wasn't able to watch it like a hawk, but .. that was the one thing (webserver) I most recently added, and stopping it did the trick. Granted, a Rpi3 is not a mega processor or anything, and I've never seen
that issue on any other hardware, so.. Maybe the whole "quad core, 1gb ram" of a Rpi3 isn't really what it's cracked up to be.
Regards,
Nick
I'm running on a VPS with 1GB RAM, 2GB swap. I've watched in top with
no real change in memory and the error comes up. Maybe an array is
killing the allocated memory for javascript run through the web
server?
Hello Draco,
On Sat Oct 21 2017 12:08:52, Draco wrote to Nicholas Boel:
I'm running on a VPS with 1GB RAM, 2GB swap. I've watched in top with no real change in memory and the error comes up. Maybe an array is killing the allocated memory for javascript run through the web
server?
I can't say for sure what's happening there. My _only_ occurrance of that happening was on a Raspberry Pi 3, in which I had many other things going on at the same time.
Has your swap been filled when this happens? If so, there's got to be something that's causing a huge memory leap to get to that point. Unless there's
some other underlying issue that's causing it, since for me it also happened somewhat recently (last couple months). When I noticed it (maybe two weeks ago or something) I shut down the webserver and haven't seen it happen again since.
Did you by chance have FTelnet running on your main page? That seems to get a huge amount of traffic where bots sit there and try entering the telnet session, even though they have no clue how to handle something like a login matrix. If so, maybe make your FTelnet page separate from your "index.html/index.xml" or whatever, ie: make it a link off your main page.. and see if that helps.
Obviously the route I took isn't a proper fix, but I didn't want my system missing events and messing other things up while I tried to figure it out. At the same time I picked up an HP Proliant ml310e that I'm in the process of moving everything to. So a lot more processor, a lot more ram, etc.. and am just assuming it will fix itself once it's running on there instead of the Pi - before I go bugging any devs about it.
Regards,
Nick
Hi all!
I'm having an issue with the following error.
"!JavaScript /lokisden/mods/../web/lib/msgslib.ssjs line 61: out of memory"
I just finished updating from CVS 3.17. I've tried enabling debugging in the webserver to figure out what's going on, but no dice. I'm running on CentOS 7 and it was working fine before updating.
Any help with this would be greatly appreciated!
I only ask, because I recently ran into out of memory errors as well, while running Synchronet's webserver (with everything else) on a Raspberry Pi 3. Once the webserver ran for a few days or more, things would stop working until I rebooted.
Swap is barely even touched, with about a quarter of real memory used.
Yes, I have ftelnet on my front page, but I didn't have this issue
before I updated. It had been a long while since I updated, and it's
not the first time an update has messed up my setup.
I had it showing 50 messages at a time. I thought maybe this was an
issue overloading the array, but setting it to 25 did fix the issue.
I suppose I could switch to echicken's web interface. I did try it
once and didn't really like the way messages were displayed. :/
Any help with this would be greatly appreciated!
What are the "JavaScript" related settings in your ctrl/sbbs.ini file
set to?
I only ask, because I recently ran into out of memory errors as
well, while running Synchronet's webserver (with everything else)
on a Raspberry Pi 3. Once the webserver ran for a few days or
more, things would stop working until I rebooted.
Rebooting to fix issues? I thought that was mainly a Windows thing..
:)
Hello Digital,
On Sun Oct 22 2017 22:57:18, Digital Man wrote to Draco:
Any help with this would be greatly appreciated!
What are the "JavaScript" related settings in your ctrl/sbbs.ini file set to?
Mine are (and I don't believe I've ever touched them, so default?):
JavaScriptMaxBytes = 8M
JavaScriptContextStack = 16K
JavaScriptTimeLimit = 864000
JavaScriptGcInterval = 100
JavaScriptYieldInterval = 10000
JavaScriptLoadPath = load
JavaScriptExtension = .ssjs
And as I mentioned, after disabling the web server it hasn't happened again.
Mine are (and I don't believe I've ever touched them, so default?):
JavaScriptMaxBytes = 8M
JavaScriptContextStack = 16K
JavaScriptTimeLimit = 864000
JavaScriptGcInterval = 100
JavaScriptYieldInterval = 10000
JavaScriptLoadPath = load
JavaScriptExtension = .ssjs
And as I mentioned, after disabling the web server it hasn't
happened again.
Well if you wanted to, you could increase the JavaScriptMaxBytes value (e.g. double it to 16M) and re-enable the web server and try again.
This same thing happened to me while using ecweb. So I don't think the interface is the issue at all.
This same thing happened to me while using ecweb. So I don't
think the interface is the issue at all.
It is ultimately a problem with interfaces not coping with subs that
have lots of messages in them.
In msgslib.ssjs there's an array to which the index number of every applicable message is added, depending on a scan mode setting. The
error in this case indicates the script ran out of memory while trying
to add to this array.
If that was happening on the 'mail' sub, then it may be that the user
has an insane amount of unread/undeleted messages sitting there. Or
it may mean that some other part of the script is gobbling up memory.
On ecweb there's a 'max messages' setting of some kind that's meant to mitigate this problem, so that only the latest n messages are loaded.
I can't remember if that's applied to the 'mail' sub or not. I'd
rather have done it differently, but sorting messages into neat
threads requires methods that are often inefficient or convoluted or
both.
With that said, with the advice of DM I've upped that javascript setting in sbbs.ini to 16M instead of 8M, and restarted the web server 2-3 days ago. At the moment I'm sitting at 7% CPU and 49.7% memory for the "sbbs" application. I
don't use DOSEMU anymore, so emulation isn't a reason for high memory usage - however, I only have 1GB ram (I think) on a quad core Raspberry Pi 3.
Almost seems like some kind of memory leak here, as when I start sbbs and for the first 12-24 hours memory usage is fairly low. Then after a day it steadily goes up (or so it seemed) until it's about maxed out. And when I disabled the web server for a couple weeks, I don't believe I ever saw my memory usage above
20%.
While this message is open and I'm describing things.. I just restarted sbbs for the hell of it, and it's running at 3.2% memory usage and about 6.5% CPU. It seems to go up steadily over time with constant web connections (probably probing bots, which is fairly non-stop).
Are the hack threshold and temp ban settings DM added utilized in the web server as well?
Mail sub? If you're referring to local email, I probably have less than 10 messages in there (I don't use pop/smtp here).
Almost seems like some kind of memory leak here, as when I start sbbs and for the first 12-24 hours memory usage is fairly low. Then after a day it steadily goes up (or so it seemed) until it's about maxed out. And when I disabled the web server for a couple weeks, I don't believe I ever saw my memory usage above 20%.
Are the hack threshold and temp ban settings DM added utilized in the web server as well?
I tend to keep about 5000 messages per sub-board maximum. However, there's only a handful of sub-boards between 3000-3600. Otherwise most of them are 1000 or less.
I don't remember whether or not my "out of memory" error had anything to do with a specific sub-board or not. I just remember events not running and things locking up, so I disabled the web server and restarted.
Sounds like there could be a memory leak (or two).
Almost seems like some kind of memory leak here, as when I start
sbbs and for the first 12-24 hours memory usage is fairly low.
Then after a day it steadily goes up (or so it seemed) until it's
about maxed out. And when I disabled the web server for a couple
weeks, I don't believe I ever saw my memory usage above 20%.
I concur (though percentages are not really meaningful to me).
Are the hack threshold and temp ban settings DM added utilized in
the web server as well?
Yes. But the "bots" would have to be attempting an HTTP login, which
is not common among bots. Do you see them attempting to login via
HTTP?
Mail sub? If you're referring to local email, I probably have
less than 10 messages in there (I don't use pop/smtp here).
The person you were replying to was talking about private email, IIRC.
I realize you weren't.
Almost seems like some kind of memory leak here, as when I start
sbbs and for the first 12-24 hours memory usage is fairly low.
Then after a day it steadily goes up (or so it seemed) until it's
about maxed out. And when I disabled the web server for a couple
weeks, I don't believe I ever saw my memory usage above 20%.
Possibly a bug in the web server. I have always assumed that the lifecycle of a script executed by that server (including any memory
that script uses) begins when a request is received from a client, and ends when the response has been sent. (That's at a high level, I know there are many more steps involved.) I may be wrong in that
assumption, but if there's anything I can do about it at the JS level,
I'm unaware of it.
I've had similar problems with a couple of Synchronet instances and haven't been able to pin it down to one service (web, services thread, etc.) or another. My board just craps out sometimes, IIRC for the
same reason, but I have a thing that monitors and restarts it as
needed. My system is a bit atypical though, and a bit of a mess right now.
Well, it could be caused by lots of things. My more recent web UI is certainly less prone to this than my earlier efforts, but still there
are times when a lot of stuff could be loaded up for sorting, etc.,
and a sub with lots of messages could be a problem there. 5000 or
less shouldn't really be a problem, or hasn't been for me.
I'll continue keeping an eye on it and give any information I can find, but so far it just seems like bots are viewing the forums (and multiple times within a short period of time).
I'll continue keeping an eye on it and give any information I can
find, but so far it just seems like bots are viewing the forums
(and multiple times within a short period of time).
Please do, but so far I am with you in the suspicion of a memory leak.
My assumption is that any memory used by the scripts involved in my
(or any) web UI here should be freed up after the page is served.
Sysop: | Ragnarok |
---|---|
Location: | Dock Sud, Bs As, Argentina |
Users: | 136 |
Nodes: | 10 (0 / 10) |
Uptime: | 06:26:11 |
Calls: | 15,171 |
Calls today: | 4 |
Files: | 19,857 |
D/L today: |
7 files (164K bytes) |
Messages: | 1,691,377 |