Forum .LRN Q&A: forums administration portlet title i18n done, but doesn't work

Hi,

I have just committed to head a replacement of a literal string with the "forums-portlet.admin_pretty_name" catalog key to display the "Forums Administration" title properly.

But, it seems not to be working well. I mean, no errors, but after reloading the dotlrn-forums procs, and also after rebooting AOLServer, the forums admin portlet still looks only in english.

Maybe I'm missing something, but I'm lost with that. Any idea? Thanks

The change will be applied to classes and communities you'll create from now on, not existing ones. May I suggest that you test before committing, although in this case the fix is OK.
Changing the get_prety_name function is not enough in this cases; the right procedure should be:

1. Change all the tcl procs which return the portlet title to use the right message key; and dont try to do the internationalization when this procs are called, because users with customized language settings might get the titles in the wrong language. So what you did here : http://fisheye.openacs.org/browse/OpenACS/openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-admin-portlet-procs.tcl?r1=1.3&r2=1.4 is the way to go.

2. One should provide upgrade script for changing all the entries in portal_element_map table for the element in question; in this case dotlrn_forums_admin_portlet. Your changes in the tcl procs will work for new portlets created but not for the ones already created, until you update this entries.

I tested at least twice, before committing, with a forums clone, and the original one, and I saw no errors. Then, I realized that old groups didn't change the title.
I've made the so simple sql script to update those fields, but I'm guessing where I'm supposed to add it. There is no upgrade folder on dotlrn-forums package. Should I create one? Then, should I upgrade the package version number?

If so, what is the next version number to upgrade to? Now, the dotlrn-forums info says version 2.4.0d1, so next could be 2.4.0d2. Meanwhile .LRN 2.4.1 has been just released. Maybe it'd better to use 2.4.1.d0 or .d1

Thanks in advance.

After the meeting, it's clear that I must wait for the cvs merge, in order to get the new version numbering of the forums-portlet package. It should be 2.5.0d1, so I should do the upgrade-2.5.0d1-2.5.0d2.sql file. The content of that file could be as simple as...
update portal_element_map set pretty_name = '#!-- --forums.pretty_name#''
where name = 'dotlrn_forums_admin_portlet' and pretty_name != '#!-- -- forums.pretty_name#';

I was trying to simulate the upgrade on a test server, but I got that ugly error...

Failed to install Forums Portlet, version 2.5.0d2. The following error was generated:

couldn't fork child process: not enough memory

---
I have read another forum posts about this kind of message, but I have no idea how to solve it.

You can try restarting AOLserver is the process has grown to use a large amount of memory.

To avoid this you most likely need to restart aolserver nightly. Any Tcl code that calls "exec" will fail once you reach the threshhold wehre it cannot allocate any more memory.

I think this is a bug in either Linux or Tcl, I forget which. It doesn't happen on Solaris though.

The error message simply says that the machine is running out of memory while it was trying to start an external program. As a first measure, you should probably provide more swap space. What is the normal memory footprint of your aolserver? how much physical memory does the machine have? what else runs on this machine?

Certainly, you should try to reduce the memory footprint of your installation by
- not installing packages, which are not use
- not installing too many scheduled repeating procs in own threads
- rebooting the server from time to time
- checking the parameters of you config.tcl script (e.g. high number of minthreads)

-gustaf neumann

The problem was the swap memory: 0KB free. Thanks!

The machine has 5 aolserver v 4.0.10. This services are the official tests servers. They are supposed to be used for launching automated tests, but we usually used them also for testing scripts, or tcl's, manually. Anyway, the installed packages are available for testing, and the server is not supposed to have very heavy traffic.

The current machine only has 1264MB of RAM, and 611MB of swap. Our sysadmin has increased the swap 1GB more right now. He also has set a daily reboot.

About config.tcl, I think it's the default one... it says...

   ns_param   maxthreads         10
   ns_param   minthreads         5

Thanks a lot.

PS: I've seen that as aolserver is restarted, after loading all the oacs + .lrn stuff, it's about 150MB of virtual memory, and just going to APM and running the upgrade script it grows up to 300 MB.
After a few more clics, virtual memory used by nsd grows up to 611MB, what I think it's a big growth for a few clics in a short period of time.

1 GB of swap is not really much, but at least the machine will become slower (i.e. swapping) before it crashes :). Extending swap should help in the short range. Is the machine running as well the database? anyhow, 1 GB of real memory is not much for running 5 fully configured openas/dotlrn instances.

Concerning the parameters: i would recommend to comment out the minthreads line, and reduce maxthreads to 5. Note, that every thread gets a full copy of the blueprint (containing a tcl code from all -proc.tcl files). Every thread has its own tcl interpreter; once you are loading dotlrn, the threads are far from being lightweight.

Concerning the memory growth: when the server starts, only the bare minimum of threads is created. After some time the first scheduled procs are run (note that every repeating scheduled proc running in its own thread will use its own thread containing the full blueprint). Reducing the number of such scheduled procedures will help to reduce the memory consumption as well.

So when the server starts, you might have only a few threads running (e.g. 4 with main, driver, sched, 1 conn thread); when the first requests come in (for e.g. a page with some images) you are likely to have with your configuration 10 connection threads running (we are now at 13), if you run the full set of scheduled procs from all dotlrn packages, you might have 10 or even more scheduled threads) (we are now at 23 thread). So, it is not unlikely to use after some time 6 times the memory, even if one takes into account that zippy and tcl tend to over-allocate memory for speed reasons.

Hope, this explain a little the underlying mechanisms
-gustaf neumann