setting max connections - for Ubuntu, Apache Server and MSQL

I am needing to plan for system growth so I need to know the limits.


Thank you
LVL 1
HalCHubAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rindiCommented:
I don't understand the Question. Any limits are caused by the hardware, not the OS, at least when you are using Linux.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
arnoldCommented:
Adding to rindi's point, what is being served up processing, resource requirements and complexity  will dictate whether the hardware, resources available are sufficient

What is the base line used as the basis to determine your needs?
0
simon3270Commented:
As the user running the Apache and MySQL processes, run:
    ulimit -a
This will report several limits that Linux imposes, including the maximum number of file handles that the process can have open at one time (as "open files").  On my Ubuntu system, this is set as 1024 per process - since each connection to a process is an "open file", this will limit the number of connections which a single MySQL process, for example, can accept.

You can change the limits by editing /etc/security/limits.conf and adding lines like:
    * soft nofile 2048
    * hard nofile 4096
This will set the default limit for the number of open files for all users to 2048, but allow them to raise their own limit to 4096 by running "ulimit -Sn 4096".  You can replace the "*" with a specific user's name to set their limits separately.  I think people usually have hard and soft limits the same for this sort of change, to avid having to increase them each time you log on - I just showed this because they don't *have* to be the same.

You may also need to add "session required pam_limits.so" to /etc/pam.d/common-session and /etc/pam.d/common-session-interactive, and reboot.

Note that MySQL and Apache may impose their own limits, so you may need to tweak those too.

There are also internal limits in Linux for some of these values, so you can't just put whatever you like in limits.conf, but you should be able to increase nofile to tens of thousands.
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.