Welcome Guest | Login

Rails app won't start, error log shows "exceeded dynamicMaxProcs (50)", and other questions...

Hi,

I'm getting some strange behavior of my Rails app sometimes. For no particular reason, it would generate an error like "NoMethodError" or like and if I reload the page a couple of times or restart the Rails app, it would fix it. This happens only on the production server (raptor I think) and not on my development environment. I did not really investigate deeper, and setup a crontab script to restart my Rails app everyday (basically killing the dispatch.cfgi and ruby processes, cleaning temp files).

This leads me to several questions.

* Sometimes when I restart the rails app, it takes a lot of times before the server is accessible. I guess Rails might be preloading stuff but I get strange log messages in the error log (repeated maybe 50 times or more):

[Wed Jan 10 11:23:13 2007] [warn] FastCGI: can't schedule the start of another (dynamic) server "/home/XXXXXX/public_html/dispatch.fcgi" process: exceeded dynamicMaxProcs (50)

A quick google pointed me to a similar problem http://forums.site5.com/showthread.php?t=7726 with possible solutions. Would this apply to hostingrails?

* I'm using the free hosting right now, so I fully understand I can't expect 24/7 uptime. But if I'm going to pay (and I plan too), I'd like to make sure I won't get any problem. Today around 3pm/4pm (GMT+1), my web site was no longer reachable or returning random 500 error (like the NoMethodError). I logged on raptor (was very slow), restarted the app, it did not really help. After few minutes I saw that the server was restarted. Is there some kind of load problem on this server? (I guess your free rebate is having a lot of success :), maybe too much?)

* When I will sign up for a "real" plan, will my account be moved to another server? If so will it require changes from me?

thanks for reading me :)
-fred

2007-01-10 12:57 PM

Hi Fred - these are completely valid concerns.  The answer lies with the fact that fastcgi and apache1 don't play well together - specifically mod_fastcgi which is not being actively developed....mod_fcgid is much better. Your server is running a 'stable' cPanel which needs apache1, and mod_fcgid requires apache2.  

On newer servers are running an edge version of cPanel which allows us to proxy and load balance to mongrel servers on dedicated ports and all the other fancy stuff.  They of course run mod_fcgid and have been performing well.  As soon as cPanel releases a 'stable' way to upgrade from apache1 to apache2, raptor will get upgraded and these unfortunate "exceeded dynamicMaxProcs" will go away permanently (and they've unfortunately popped up recently because too many users are breaking our terms and conditions...they have been and will continue to be suspended in order to help everyone else out)  

And yes, all upgrades from raptor are being moved to our apache2 servers.

Sorry for the trouble,

~William

2007-01-10 02:32 PM

thanks for the update. Do you have a timeline for the cPanel upgrade on raptor? (I guess the delay is more on the cPanel side than on yours...).

btw do you guys have a mailing list (or forum but I like mailing list better) to inform us about suc technical difficulties the sites may be encountering, about upcoming updates, ...

-fred

2007-01-10 03:54 PM

Yeah we currently handle this over email to specific clients when expected maintenance / updates are happening.  There is also a 'status' page coming soon - where we'll try to setup an easy feed and method for clients to opt-in to be emailed when new content arrives.  

I'm not sure when cPanel will get this stable release done - but we will certainly email everyone on raptor when this change will occur.  

2007-01-10 04:28 PM

Great.

One last question, when you talked about "too many users are breaking our terms and conditions", is there some wrong behavior we should all be aware and avoid? I mean as the free rebate offer is mainly targeted to experimentation, I would not be surprised if some websites make mistakes in their code (me first, as example I've not look into optimizing database queries yet)...

2007-01-10 04:34 PM

The wrong behavior includes everything that's written in the terms, but its mostly running in development mode - esp with fastcgi.  This causes memory leaks and is just an unfortunate aspect of how fastcgi works.  Also, if sometime is using up an exorbitant amount of memory or CPU we try to see if we can help them optimize their code...but sometimes account suspension is all we can do to save server stability.

2007-01-11 04:53 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.