Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Ok I host a website through a VPS with 1&1 and I'm worried about running out of processes.

From Parallels they have set a hard limit of 128 numprocs I have had some problems with my website just completely stopping and throwing me an error when I hit that limit. Right now I'm at 52 numprocs (not bad).

Does Apache create a new process every time someone views my site?

So if I got 200 people viewing my site I would have 200 processes (causing the site to take a dump)?

If so is there a way around this?

BTW I've tried to get 1&1 to up the value but they insist I need to upgrade packages but this is dumb as can be because I am barely cracking my RAM, CPU and storage space. It is this stupid little parameter that is causing the problem.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Apache creates one child process per request to maintain a certain configurable number of servers. Its not difficult to configure, but it is a little confusing.

Take a look at: http://virtualthreads.blogspot.com/2006/01/tuning-apache-part-1.html

Also, nginx is excellent for a VPS, its very lightweight and powerful. I would recommend it.

share|improve this answer
    
That is a great read! Thanks! –  Andrew Threadgill Mar 30 '12 at 20:39
1  
Keep in mind - this technique will not let you circumvent the 200 process limit. –  EEAA Mar 30 '12 at 20:46
    
I understand, it will at least give me some wiggle room though. –  Andrew Threadgill Mar 30 '12 at 21:16
add comment

First, your technical questions:

So my question is...Does Apache create a new process every time someone views my site?

No, it keeps a set number of servers ready to accept new connections, and typically it has a high bound set on how many of these servers it can spawn at a time. Each of these servers is configured with a max number of requests it can serve before it kills itself.

These items are configured in the MPM configuration section of your apache config.

So if I got 200 people viewing my site I would have 200 processes (causing the site to take a dump)?

200 concurrent requests? Yes, in that situation (and if apache is configured to allow this many connections), apache will try and spin up workers to service each of the 200 requests and you'll run into problems.

If so is there a way around this?

No.

Now, onto the issues you're having with their service:

The reason that your provider is limiting your number of processes is that their "VPS" service doesn't provide a real, actual VPS. The service they provide is more like BSD-style jails. In this situation, all guests on a specific host share a single kernel. It is for this reason that they need to limit the number of processes each guest can spin up - the host's kernel needs to keep track of all of the processes for each guest, and limits are put in place to prevent one guest instance from negatively affecting others' ability to spawn new processes.

I've tried to get 1&1 to up the value but they insist I need to upgrade packages but this is dumb

Their limits are reasonable for the service they're providing. If you don't like it, then move somewhere else, to a real VPS provider - one that gives you your own OS instance. I use Linode and like them very much, but there are a ton of other options as well.

share|improve this answer
    
The way they walked around this issue did give me the feeling that it wasn't a true VPS. I just figured they had some limitation that didn't need to be there. I will be moving hosts, I was just hoping not to have to go through that hassle. It seems really deceptive a VPS with nice specs but you hit a limit and it crashes on you. Thanks for the information extremely helpful! –  Andrew Threadgill Mar 30 '12 at 20:19
    
Yes, I wouldn't call it a true VPS, but unfortunately there is precedent in the market for providers to call these Virtuozzo-based systems VPSes. So users just really need to do their own homework when choosing a vendor. –  EEAA Mar 30 '12 at 20:22
    
Answer edited to include the three technical questions. –  EEAA Mar 30 '12 at 20:24
    
It would seem as if security would be more of an issue on these systems as opposed to a true VPS being the kernel is shared. –  Andrew Threadgill Mar 30 '12 at 20:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.