Forum OpenACS Q&A: Server crashes

Collapse
Posted by Nima Mazloumi on
Hi all,

lately I have had some server crashes on a regulary basis with a line like this at the end of the error log:

"unable to alloc 3136642 bytes"

Any idea why this happens and how to deal with it?

Greetings,
Nima

Collapse
2: Re: Server crashes (response to 1)
Posted by Torben Brosten on
I understand this error occurs when aolserver is unable to grab more memory, for example if it is approaching maxthreads but needs more RAM for processing.
Collapse
3: Re: Server crashes (response to 1)
Posted by Hamilton Chua on
What is your stack size ?
Is your installation dotlrn ?
Collapse
4: Re: Server crashes (response to 1)
Posted by Patrick Giagnocavo on
I have seen that before, it usually indicates you are out of RAM or swap space, if I remember correctly. You may want to be sure that your stacksize param is at least 1MB as well.
Collapse
5: Re: Server crashes (response to 1)
Posted by Gustaf Neumann on
This happens, when the aolserver reaches the 2GB frontier. Daily reboots are still a good advice. needed memory relates directly to the number of connection threads, since every connection thread has its own tcl interpreter and own copy of the procs of the blueprint). memory consumption goes down, when e.g. not used packages are not installed, or when the number of connection threads is reduced. another option to reduce the memory needed is to you ttrace (distributed with libthread), which creates tcl procs on demand via Tcl's unknown handler.
Collapse
6: Re: Server crashes (response to 1)
Posted by Ryan Gallimore on
This is happening to me with:

unable to alloc 2463132 bytes

after restarting aolserver and opening a connection.

The SIZE value in top seems to rise past 2 GB within a few minutes and then crash the server.

I recently installed xotcl and have disabled it, along with other unused packages, to no effect. I disabled them by renaming the directory in packages.

I've tried restarting the machine. It has 1 GB RAM and 2 GB of swap. The server was running for almost 200 days without incident.

Any help would be appreciated!

Collapse
7: Re: Server crashes (response to 1)
Posted by Ryan Gallimore on
My config.tcl:

ns_section ns/threads
ns_param mutexmeter true
ns_param stacksize [expr 128 * 8192]

ns_section ns/server/${server}
ns_param maxconnections 100
ns_param maxdropped 0
ns_param maxthreads 10
ns_param minthreads 5
ns_param threadtimeout 120

Collapse
8: Re: Server crashes (response to 1)
Posted by Ryan Gallimore on
I've fixed this- a file storage Microsoft Publisher file was caught in search_observer_queue. Removing the publisher file row resolved the problem.

AOLserver seemed to be interpreting a 9 MB publisher file as plain text, and so ran it through cat, which probably choked.

Would an upgrade to tsearch2 (I'm using OpenFTS) resolve this problem permanently?

Collapse
9: Re: Server crashes (response to 1)
Posted by Dave Bauer on
The search code should use the mime_type make sure its correct on that file.

If its running through cat, it hasn't hit the indexer yet. The indexer only accepts text so it should be converted first.

Big files will be an issue. I think looking into indexing the first signifigant part of the content makes sense, ie: first 100k or whatever.

Collapse
10: Re: Server crashes (response to 1)
Posted by Frank Bergmann on
Hi,

We just had a similar issue at ]project-open[ with one server. A "delete from notifications" fixed the issue. I believe that there was one very long "notification" coming from an automatic security check or something similar.

Cheers!
Frank