# Ruby processes consuming 1,000 megs of swap space

**URL:** <https://www.ruby-forum.com/t/ruby-processes-consuming-1-000-megs-of-swap-space/52952>\
**Category:** Rails\
**Created:** [January 21, 2006, 2:36am UTC](https://www.ruby-forum.com/t/ruby-processes-consuming-1-000-megs-of-swap-space/52952 "2006-01-21T02:36:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dewie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@dewie](https://www.ruby-forum.com/u/dewie)\
**Post date:** [January 21, 2006, 2:36am UTC](https://www.ruby-forum.com/t/ruby-processes-consuming-1-000-megs-of-swap-space/52952/1 "2006-01-21T02:36:17Z")

</div>

Hi all. The subject pretty much says it.

I’m running on a VPS-style shared server at [pipespring.com](http://pipespring.com). I’ve got  
Typo  
setup, and have been running it fine for about a month.

However, today I got an e-mail from my host saying they disabled Ruby  
(chmod  
000) because it was using waaay too much swap space.

I haven’t changed anything with my server at all (Rails or otherwise) in  
at  
least a week.

I looked through the server, development and fastcgicrash logs but found  
nothing that screamed “I’m messing this up!”

The server is up and running right now, seems to be fine. Running a ps  
-ax  
yields about 8 or 9 Ruby processes - earlier in the day (after I turned  
enabled Ruby) it was spitting out like 30-40 processes after a single  
request to my site.

Any ideas? Anything else I should look at?

- Rabbit

---

<div class="post-metadata">

**Author:** ![dewie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@dewie](https://www.ruby-forum.com/u/dewie)\
**Post date:** [January 21, 2006, 11:43pm UTC](https://www.ruby-forum.com/t/ruby-processes-consuming-1-000-megs-of-swap-space/52952/2 "2006-01-21T23:43:32Z")

</div>

This sounds like you are running typo in development mode and in CGI  
mode.

If you would be running in production mode using fastcgi with working  
static caching you should not need more then a single typo process.

On 1/20/06, Rabbit [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> - Rabbit
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Tobi  
[http://jadedpixel.com](http://jadedpixel.com) - modern e-commerce software  
[http://typo.leetsoft.com](http://typo.leetsoft.com) - Open source weblog engine  
[http://blog.leetsoft.com](http://blog.leetsoft.com) - Technical weblog

---

<div class="post-metadata">

**Author:** ![dewie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@dewie](https://www.ruby-forum.com/u/dewie)\
**Post date:** [January 22, 2006, 4:31am UTC](https://www.ruby-forum.com/t/ruby-processes-consuming-1-000-megs-of-swap-space/52952/3 "2006-01-22T04:31:05Z")

</div>

My RoR processes (both SCGI and Webrick) eventually use up a lot of  
memory too. I periodically restart them. I don’t know if there’s a max  
memory setting, or option to automatically restart after so many  
connections (like Apache can do with its child processes).

csn

---

<div class="post-metadata">

**Author:** ![dewie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@dewie](https://www.ruby-forum.com/u/dewie)\
**Post date:** [January 22, 2006, 6:41am UTC](https://www.ruby-forum.com/t/ruby-processes-consuming-1-000-megs-of-swap-space/52952/4 "2006-01-22T06:41:22Z")

</div>

It’s running in development mode with FCGI. If I change my httpd.conf to  
run  
Typo in production mode it fails to start. Dunno why.

How can I get Typo to run in production mode?

- Rabbit

* * *

---

<div class="post-metadata">

**Author:** ![dewie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@dewie](https://www.ruby-forum.com/u/dewie)\
**Post date:** [January 22, 2006, 7:26am UTC](https://www.ruby-forum.com/t/ruby-processes-consuming-1-000-megs-of-swap-space/52952/5 "2006-01-22T07:26:34Z")

</div>

Make sure your production database is configured correctly in  
database.yml

You should never run development on a shared host, your admin will hate  
you  
(as you’ve found out)

* * *

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Rabbit  
Sent: Saturday, January 21, 2006 9:39 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Rails] Re: Ruby processes consuming 1,000 megs of swap  
space

It’s running in development mode with FCGI. If I change my httpd.conf to  
run  
Typo in production mode it fails to start. Dunno why.

How can I get Typo to run in production mode?

- Rabbit

* * *

On 1/21/06, csn [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

My RoR processes (both SCGI and Webrick) eventually use up a lot of  
memory too. I periodically restart them. I don’t know if there’s a max  
memory setting, or option to automatically restart after so many  
connections (like Apache can do with its child processes).

csn

–  
Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
