Forum OpenACS Q&A: Re: ad_schedule_proc seems to be failing

Collapse
Posted by Geert De Witte on
I am also using AOLserver/3.3.1+ad13 with Jerry Asher's nsvhr and nsunix.

All seemed to be working well, until yesterday. After restarting a server instance today (18 May 2006) the nsd server starts listening on the appropriate socket but then shuts down with:

nsthread(19614) error: pthread_create failed in NsThreadCreate: Cannot allocate memory

I have seen the same error on more than one system. No changes have been made at the OS or database levels prior to these errors cropping up.

Does anybody have an idea how to fix or work around this error? Does it mean upgrading to AOLServer 4? I am experiencing these errors on production sites, so would like to get them back up and running ASAP. I'm not having any problems with AOLServer 4.0.10.

Last few lines of error log:
-----------------------------
[18/May/2006:12:19:56][19614.1076616112][-sched-] Notice: sched: starting
[18/May/2006:12:19:57][19614.1074158336][-main-] Notice: serv: warmed up
[18/May/2006:12:19:57][19614.1074158336][-main-] Notice: socks: idle
[18/May/2006:12:19:57][19614.1074158336][-main-] Notice: sched: idle
[18/May/2006:12:19:57][19614.1074158336][-main-] Notice: nsunix: DrvStart starting: listenSocket = 9, modules/nsunix/jdio.nsunix
[18/May/2006:12:19:57][19614.1074158336][-main-] Notice: nssock: listening on 0.0.0.0:8010
[18/May/2006:12:19:57][19614.1138777008][-nssock-] Notice: nssock: starting
[18/May/2006:12:19:57][19614.1136671664][-thread1136671664-] Notice: nsunix: accepting
[18/May/2006:12:19:57][19614.1138777008][-nssock-] Notice: nssock: accepting connections
nsthread(19614) error: pthread_create failed in NsThreadCreate: Cannot allocate memory

Collapse
Posted by Stan Kaufman on
Geert, what version of tcl are you using on the affected boxes? Discussion on the AOLServer list (http://news.gmane.org/gmane.comp.web.aolserver) suggests that this may be a problem with tcl 8.3.x. Or maybe with glibc. Dossy wants people to post this info about their systems:

1) ns_info version
2) uname -a
3) glibc version
4) info patchlevel

If you're going to move your sites to AOLServer 4, what are you going to do to replace Jerry's nsvhr/nsunix? Use pound? The default config file in OpenACS 5.2 appears to work fine for 3.2.5 sites with only minor modifications (including sourcing your specific instance's config file), so for a single site there is little reason not to move directly to AOLServer 4. But what is the best way to handle virtual hosting for multiple sites on the same server box?

Collapse
Posted by Geert De Witte on
Apologies for the delay - just been busy upgrading to AOLServer 4.

I have been "lucky", in that my front end server has not had the same problem as I mentioned previously (pthread_create failed), even though it is running with the aolserver-3.3.1+ad13 version.

I also have a static website (does not use OpenACS software and does not connect to database) which runs with aolserver-3.3.1+ad13 and which was also giving me the pthread_create error. After commenting out the Database pool sections in the config.tcl file, I could start the static website without any errors.

I will probably use pound to replace the nsvhr/nsunix functionality. Judging from the other comments in this thread, this seems to be the best approach for http as well as https connections.