🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by Vince Vielhaber Fri, 13 Sep 1996 00:00
ME cant remalloc...
#10846
Author: Vince Vielhaber
Date: Fri, 13 Sep 1996 00:00
34 lines
1526 bytes

In the last couple of days INND has been dying because of:

ME cant remalloc xx bytes Cannot allocate memory

The system's been running fine for months.  Inn1.4unoff4 on FreeBSD 2.1
and nothing's changed.

So I look at the FAQ and it says to add:

unlimit datasize

to the beginning of the rc.news file.  But rc.news runs in /bin/sh and
(at least on this OS) unlimit cannot be found by the shell:

$ unlimit datasize
unlimit: not found
$

Besides the kernal change (that I haven't even looked at yet) is there
an easy solution?  semi-easy solution?  

Thanks in advance,
Vince.
-- 
-----------------------------------------------------------------------------
Vince Vielhaber -- KA8CSH     Email: vev@michvhf.com    Flame mail: /dev/null
             Database Manager Michigan Area Repeater Council
# include <std/disclaimer.h>                              TEAM OS/2
-----------------------------------------------------------------------------


Re: ME cant remalloc...
#10838
Author: Andrew A. Vasilyev
Date: Fri, 13 Sep 1996 00:00
36 lines
1812 bytes
nils mccarthy (nils@primenet.com) wrote:
> This won't work.  Resource limits are per-process (and inherited by
> their children), so the limit increases would only take effect
> for the csh process, which doesn't actually execute anything.

  You are right! The previous author forgot to add "Start the show":

> >         /bin/csh -f <<EOF
> >         # Let us use more open files
> >         limit descriptors 1024
> >         # Stop malloc errors - unlimit my max datasize
> >         unlimit datasize

      ${WHAT} ${RFLAG} ${FLAGS}

> >         EOF
> >         [ back to sh code here ]

> Just use:
>         [ sh code here ]
>         # Let us use more open files
>         ulimit -n 1024

   Not every shell can understand all ulimits you want to change.
   E.g., many years ago (:-)) I failed to do this using FreeBSD
   /bin/sh, so I ought to use "csh -c 'limit xxx; limit yyy; INNDSTART'"
   in rc.news. And Rich Salz was very engry amazing why one use csh
   in shell script :))
________
	ANDY

P.S. Nowdays /bin/sh works fine in FreeBSD (except the call to external
     /bin/test, I mean "if [ ] ; then ..." is not builtin, but real /bin/[).

Re: ME cant remalloc...
#10842
Author: Lyndon Levesley
Date: Fri, 13 Sep 1996 00:00
58 lines
2536 bytes
In article <51c1t8$fud@news.demos.su>,
Andrew A. Vasilyev <andy@snm.demos.su> wrote:
>nils mccarthy (nils@primenet.com) wrote:
>> This won't work.  Resource limits are per-process (and inherited by
>> their children), so the limit increases would only take effect
>> for the csh process, which doesn't actually execute anything.
>
>  You are right! The previous author forgot to add "Start the show":

Yep. Sorry - you need to actually start innd inside the csh. This is
what the rc.news had in it, I just left it out of the post. Duh.

 The reason I used csh the first time I did this was that I couldn't seem
to make the ulimits work under BSDi. Now we use ulimit under sol2.(4|5) and
it works fine and dandy :)

 A la FreeBSD, I imagine this was fixed up in BSDi 2 or so.

Cheers,

Lyndon.
>
>> >         /bin/csh -f <<EOF
>> >         # Let us use more open files
>> >         limit descriptors 1024
>> >         # Stop malloc errors - unlimit my max datasize
>> >         unlimit datasize
>
>      ${WHAT} ${RFLAG} ${FLAGS}
>
>> >         EOF
>> >         [ back to sh code here ]
>
>> Just use:
>>         [ sh code here ]
>>         # Let us use more open files
>>         ulimit -n 1024
>
>   Not every shell can understand all ulimits you want to change.
>   E.g., many years ago (:-)) I failed to do this using FreeBSD
>   /bin/sh, so I ought to use "csh -c 'limit xxx; limit yyy; INNDSTART'"
>   in rc.news. And Rich Salz was very engry amazing why one use csh
>   in shell script :))
>________
>	ANDY
>
>P.S. Nowdays /bin/sh works fine in FreeBSD (except the call to external
>     /bin/test, I mean "if [ ] ; then ..." is not builtin, but real /bin/[).


-- 

If you give up smoking, drinking and sex you may not actually live longer...
...It may just feel that way.
                                  Clement Freud

Re: ME cant remalloc...
#10850
Author: nils mccarthy
Date: Fri, 13 Sep 1996 00:00
40 lines
1907 bytes
Lyndon Levesley <lyndon@xara.net> wrote:
> in sh, you can use the ulimit command to perform your limitting, or
> (if for some reason this won't work) you can try the following dirty
> hack :

>         [ sh code here ]
>         /bin/csh -f <<EOF
>         # Let us use more open files
>         limit descriptors 1024
>         # Stop malloc errors - unlimit my max datasize
>         unlimit datasize
>         EOF
>         [ back to sh code here ]

This won't work.  Resource limits are per-process (and inherited by
their children), so the limit increases would only take effect
for the csh process, which doesn't actually execute anything.

Just use:

        [ sh code here ]
        # Let us use more open files
        ulimit -n 1024
        # Stop malloc errors - unlimit my max datasize
        ulimit -d unlimited
        [ back to sh code here ]

I've found bash's "help ulimit" to be very helpfully descriptive
regarding ulimit usage.

We limit our file descriptors to 512, and limit the number of incoming
connections to 4 per host.  (It gets kind of annoying when we take the
machine down for a short period of time and everyone's innfeed starts
up 10 connections so we can catch up.  Memory usage for buffers shoot
through the roof.)

-nils

Re: ME cant remalloc...
#10853
Author: Lyndon Levesley
Date: Fri, 13 Sep 1996 00:00
62 lines
2243 bytes
In article <51bfbj$23l@marge.eaglequest.com>,
Vince Vielhaber <vev@michvhf.com> wrote:
>
>In the last couple of days INND has been dying because of:
>
>ME cant remalloc xx bytes Cannot allocate memory
>
>The system's been running fine for months.  Inn1.4unoff4 on FreeBSD 2.1
>and nothing's changed.
>
>So I look at the FAQ and it says to add:
>
>unlimit datasize
>
>to the beginning of the rc.news file.  But rc.news runs in /bin/sh and
>(at least on this OS) unlimit cannot be found by the shell:
>
>$ unlimit datasize
>unlimit: not found
>$
>
>Besides the kernal change (that I haven't even looked at yet) is there
>an easy solution?  semi-easy solution?  

in sh, you can use the ulimit command to perform your limitting, or
(if for some reason this won't work) you can try the following dirty
hack :

        [ sh code here ]
        /bin/csh -f <<EOF
        # Let us use more open files
        limit descriptors 1024
        # Stop malloc errors - unlimit my max datasize
        unlimit datasize
        EOF
        [ back to sh code here ]

 For ulimit, look at man ulimit and the commands "ulimit -n" and "ulimit -d"
etc.

 Be a bit wary of the max open files limit (limit descriptors xxxx) as it
may adversely affect the performance of your system - it may be better to
tweak the number of max open files that INN uses, rather than the number
that your system can handle.

>
>Thanks in advance,
>Vince.

Hope this helps,

Lyndon Levesley
Xara Networks

-- 

If you give up smoking, drinking and sex you may not actually live longer...
...It may just feel that way.
                                  Clement Freud

Re: ME cant remalloc...
#10864
Author: Vince Vielhaber
Date: Fri, 13 Sep 1996 00:00
58 lines
2572 bytes
In article <51bkhe$8vs@nnrp1.news.primenet.com>, nils@primenet.com says...
>
>Lyndon Levesley <lyndon@xara.net> wrote:
>> in sh, you can use the ulimit command to perform your limitting, or
>> (if for some reason this won't work) you can try the following dirty
>> hack :
>
>>         [ sh code here ]
>>         /bin/csh -f <<EOF
>>         # Let us use more open files
>>         limit descriptors 1024
>>         # Stop malloc errors - unlimit my max datasize
>>         unlimit datasize
>>         EOF
>>         [ back to sh code here ]
>
>This won't work.  Resource limits are per-process (and inherited by
>their children), so the limit increases would only take effect
>for the csh process, which doesn't actually execute anything.
>
>Just use:
>
>        [ sh code here ]
>        # Let us use more open files
>        ulimit -n 1024
>        # Stop malloc errors - unlimit my max datasize
>        ulimit -d unlimited
>        [ back to sh code here ]
>

And unfortunately this won't either.  Not because it's incorrect, but
because ulimit doesn't exist on this system!

Using Lyndon's method (kinda) I came up with this small wrapper to 
handle it.  I called this script startnews:

#! /bin/csh
limit openfiles 1024
unlimit datasize
rc.news


The number of openfiles maxes out at 360 and datasize at ~131 MB, but
that's ALOT better than where it was!

Thanks to you both!
Vince.
-- 
========================================================================== 
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null 
             Database Manager Michigan Area Repeater Council               
       # include <std/disclaimers.h>                   TEAM-OS2            
========================================================================== 
                                                                           


Re: ME cant remalloc...
#10869
Author: John Henders
Date: Sat, 14 Sep 1996 00:00
26 lines
1460 bytes
In <51bkhe$8vs@nnrp1.news.primenet.com> nils mccarthy <nils@primenet.com> writes:

>Lyndon Levesley <lyndon@xara.net> wrote:

>Just use:

>        [ sh code here ]
>        # Let us use more open files
>        ulimit -n 1024

Except /bin/sh supplied with BSDI doesn't understand ulimit, or it
didn't. What I did, with no ill effects, was change the /bin/sh line in
rc.news to /bin/bash. However, this also means you would need a
/bin/bash, which isn't where BSDI put's it, so you could use
/usr/contrib/bin/bash. I suppose you could also use a csh wrapper that
set the limits then exec's rc.news into it's own space. (does csh
support that?)

-- 
      Artificial Intelligence stands no chance against Natural Stupidity.
                GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
                     b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*


Re: ME cant remalloc...
#10909
Author: The Caretaker
Date: Mon, 16 Sep 1996 00:00
22 lines
1442 bytes
John Henders (jhenders@bogon.com) wrote:

: Except /bin/sh supplied with BSDI doesn't understand ulimit, or it
: didn't. What I did, with no ill effects, was change the /bin/sh line in
: rc.news to /bin/bash. However, this also means you would need a
: /bin/bash, which isn't where BSDI put's it, so you could use
: /usr/contrib/bin/bash. I suppose you could also use a csh wrapper that
: set the limits then exec's rc.news into it's own space. (does csh
: support that?)

Hmm, what is wrong the way it is? I also use BSD/OS. In startup, I put in:

limit -h

//del//

=============================================================================
 Flex Information Network 808.539.3790 HAWAII    Email: postmaster@aloha.com 
  >>> Hawaii's Very First Public Access Internet Provider, July 19, 1994 <<<

Re: ME cant remalloc...
#10939
Author: Lyndon.Levesley
Date: Tue, 17 Sep 1996 00:00
62 lines
2522 bytes
In article <51fk33$1kd@stdismas.bogon.com>,
John Henders <jhenders@bogon.com> wrote:
>In <51bkhe$8vs@nnrp1.news.primenet.com> nils mccarthy <nils@primenet.com> writes:
>
>>Lyndon Levesley <lyndon@xara.net> wrote:
>
>>Just use:
>
>>        [ sh code here ]
>>        # Let us use more open files
>>        ulimit -n 1024
>
>Except /bin/sh supplied with BSDI doesn't understand ulimit, or it
>didn't. What I did, with no ill effects, was change the /bin/sh line in
>rc.news to /bin/bash. However, this also means you would need a
>/bin/bash, which isn't where BSDI put's it, so you could use
>/usr/contrib/bin/bash. I suppose you could also use a csh wrapper that
>set the limits then exec's rc.news into it's own space. (does csh
>support that?)
>

 (see my other post)

 I had the same aggro w/ BSDi , so used the "/bin/csh -f <<EOF"
hack to workaround it. In my first post I left out the line
that actually starts news up. You could, however, use a csh
wrapper for the whole of rc.news

	#!/bin/csh
	# Set some limits and then start up rc.news
	# which will inherit them
	# This is 'limit openfiles 1024' under some OS types
	limit descriptors 1024
	# And stop mem probs
	unlimit datasize
	# Now start rc.news, leaving the csh as we do so.
	exec /my/path/to/news/etc/rc.news

which would work, it depends which hack you like better - I prefer
the inline csh inside rc.news, but that's mainly personal preference :)

>-- 
>      Artificial Intelligence stands no chance against Natural Stupidity.
>                GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
>                     b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*
>
Indeed. :)


Cheers,

Lyndon Levesley
Xara Networks

-- 

If you give up smoking, drinking and sex you may not actually live longer...
...It may just feel that way.
                                  Clement Freud

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads