Forum OpenACS Q&A: AOLServer restarts by itself

Collapse
Posted by Gilbert Wong on

I am running AOLServer on an HPUX box at work and it consistently restarts itself when I download large image files. I'm running aolserver 3.2+ad12. Here is the snipped of the log file just before it restarts itself.

[16/May/2001:21:03:56][7483.6][-conn1-] Notice: dbinit: sql
(localhost::isv): 'select page_id from static_pages where url_stub 
= '/webshops/files/2001-05-
18_19/pc_hp_netseminar_051801_files/slide0208.htm''
[16/May/2001:21:03:56][7483.9][-conn4-] Notice: dbinit: sql
(localhost::isv): 'select nextval('sec_id_seq') from dual'
nsthread(7483) error: ns_realloc: could not allocate 1504 bytes
[16/May/2001:21:03:57][7491.1][-main-] Notice: nsmain: 
AOLserver/3.2+ad12 starting
.
.
.

What is the ns_thread error telling me? Do you guys have any suggestions as to how I can fix this error?

Thanks!

Collapse
Posted by Don Baccus on
Well ... the thread can't grab more memory for some reason or another.  As to why, not sure.  Is this the 4.0 downloader?  How big are the images?  How big's your machine and are you sure Linux is seeing all your RAM?

One of the [ex | present] aD'ers may have a better idea, I've never had this particular error on one of my servers.

Collapse
Posted by Gilbert Wong on
It's an HP N-Class server.  I'm just trying to view powerpoint images in the web tree.  I'll post a message on the AD board.  Thanks.
Collapse
Posted by David Eison on
It's been a while since someone has asked about that error. See http://www.arsdigita.com/bboard/q-and-a-fetch-msg?msg_id=000GtU&topic_id=21&topic=web%2fdb

In other threads people have suggested insufficient swap and insufficient shared memory space.

Collapse
Posted by Gilbert Wong on
Thanks David!
Collapse
Posted by Gilbert Wong on

I tried the suggestions on the aD thread.

I am running AOLServer 3.2+ad12 on HPUX 11 with PostgreSQL 7.0.3 and pgdriver 1.1 (from openacs.org). I've tried the pgdriver 2.0 with the same results. I started aolserver under gdb:

****************************
$ gdb bin/nsd
GNU gdb 4.18-hppa-991112
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.  This version of GDB is supported
for customers of Cygnus Solutions.  Type "show warranty" for details.
This GDB was configured as "hppa1.1-hp-hpux11.00"...
(gdb) set args -ft test.tcl
(gdb) run

...

[05/Jun/2001:16:23:29][13224.8][-conn1-] Notice: Opening test on localhost
[05/Jun/2001:16:23:29][13224.8][-conn1-] Notice: Ns_PgOpenDb(postgres):
Openned connection to localhost::test.
[05/Jun/2001:16:23:29][13224.10][-conn3-] Notice: dbdrv: opening
database 'postgres:localhost::test'
[05/Jun/2001:16:23:29][13224.10][-conn3-] Notice: Opening test on localhost
[05/Jun/2001:16:23:29][13224.10][-conn3-] Notice: Ns_PgOpenDb(postgres):
Openned connection to localhost::test.
[New thread 11 (system thread 21242)]
[New thread 12 (system thread 21243)]
[New thread 13 (system thread 21244)]
[New thread 14 (system thread 21245)]
[New thread 15 (system thread 21246)]
nsthread(13224) error: ns_realloc: could not allocate 861 bytes
[Switching to process 21246]

Program received signal SIGABRT, Aborted.
[Switched to thread 15 (system thread 21246)]
0x7f7b9b88 in kill () from /usr/lib/libc.2
****************************

And the server crashes. Sometimes I can click away for minutes and sometimes the server will crash after a few clicks.

I've tried looking at the swapfile size, vmstat, and ulimit. It doesn't look like I am running out of memory. My data ulimit is at 64Megs.

Any ideas?