Hi,

yes, thats where i added the line.
i used "ulimit -u". ulimit is a build-in bash
command. "man bash" says:

-u     The maximum number of processes available to a single user

My section looks like this:

if test -n "$open_files"
  then
    ulimit -n $open_files
    ulimit -u 1505    # <- That limits to 1505 processes.
  fi
  if test -n "$core_file_size"
  then
    ulimit -c $core_file_size
  fi
fi

If you want a connection limit of 500 set it to something more
than 500, because the main process, which will not handle a connection,
has to be counted.
You can also add something like this before and after the above section to
verify:

ulimit -a >> /tmp/mysql-ulimit.txt

That will print all ulimit restrictions to /tmp/mysql-ulimit.txt.


Regards,
Philipp





----- Original Message -----
From: "my5ql _" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 6:05 PM
Subject: Re: 3.23 thread error - help/advice please


> What kind of limit did you set?
> I think I've found the area in safe_mysqld you referred to. Is this
correct?
> ------------------
>    # If we are root, change the err log to the right user.
>   touch $err_log; chown $user $err_log
>   if test -n "$open_files"
>   then
>     ulimit -n $open_files
>   fi
>   if test -n "$core_file_size"
>   then
>     ulimit -c $core_file_size
>   fi
> fi
> -----------------
>
>
>
>
>
>
>
> >From: "Philipp" <[EMAIL PROTECTED]>
> >To: "my5ql _" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
> >Subject: Re: 3.23 thread error - help/advice please
> >Date: Tue, 28 Jan 2003 17:15:06 +0100
> >
> >Hi,
> >
> >i had a problem like this, too. in my case it
> >wasnt mysql restricting the number of threads
> >but my OS (Linux/Debian). Usually mysql does
> >not run as root, but as user "mysql" or something
> >else. Debian restricts normal users to a number
> >of running processes to prevent an overloaded.
> >
> >i solved my problem by raising this value, in my
> >case with the tool "ulimit". i call it with the appopriate
> >paramter in safe_mysqld. there is already a ulimit call
> >in safe_mysqld to raise thie number of allowed open
> >files. i added my ulimit right after that line...
> >
> >hope that helps...
> >
> >
> >regards,
> >philipp
> >
> >
> >
> >----- Original Message -----
> >From: "my5ql _" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, January 28, 2003 3:04 PM
> >Subject: 3.23 thread error - help/advice please
> >
> >
> > > I tweaked my.cnf on a server.
> > > Changed wait_timeout from 80 to 75
> > > and increased key_buffer to 1280M from 1024M
> > >
> > > max_connections is set to 500
> > > Max_used_connections was reported at 370 (from 'mysqladmin variables')
> > > thread_cache is set to 48
> > >
> > > I ran 'mysqladmin flush-hosts' as the mysql root user and got the
> >following
> > > output:
> > >
> > > /usr/local/mysql/bin/mysqladmin: connect to server at 'localhost'
failed
> > > error: 'Can't create a new thread (errno 11). If you are not out of
> > > available memory, you can consult the manual for a possible
OS-dependent
> > > bug'
> > >
> > > Problem seems to have disappeared once I reverted back to my old
> >settings
> > > (and I don't get the regular [every 10min] php pconnect errors).
> > > Max_used_connections is now at 439.
> > >
> > > System is MySQL 3.23.51 built from source, Rh 7.3, custom 2.4.19
kernel.
> > >
> > > What I'm unsure about is the errors from php pconnect and the
inability
> >to
> > > flush hosts when I hadn't hit any connection limits. I have over 2GB
RAM
> > > free (as reported by 'top')
> > >
> > > Any ideas/suggestions?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > _________________________________________________________________
> > > Chat online in real time with MSN Messenger http://messenger.msn.co.uk
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Before posting, please check:
> > >    http://www.mysql.com/manual.php   (the manual)
> > >    http://lists.mysql.com/           (the list archive)
> > >
> > > To request this thread, e-mail <[EMAIL PROTECTED]>
> > > To unsubscribe, e-mail
> ><[EMAIL PROTECTED]>
> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> > >
> > >
>
>
> _________________________________________________________________
> Use MSN Messenger to send music and pics to your friends
> http://messenger.msn.co.uk
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to