0

I have 2 applications hosted on Cloudfoundry. when i created the first application. i used vmc rails-console app1 to manage it and it worked perfectly. then i added the second application and try to connect to rails-console by vmc rails-console app2 and this time it shows Error: Login attempt timed out. or Error: Console port not provided for [app2]. Try restarting the app. but i can still connect to rails-console of my first application

following is the result from vmc apps

| caldecott | 1 | RUNNING | caldecott-57ecb.cloudfoundry.com | mysql-616d4 |

| app1 | 2 | RUNNING | app1.cloudfoundry.com | mysql-616d4 |

| app2 | 1 | RUNNING | app2.cloudfoundry.com | mysql-616d4 |

is there any limitations on Cloudfoundry side or what i have missed to solve this issue?

thanks.

plus Gemfile of the second application

source 'https://rubygems.org'

gem 'rails', '3.2.6'

gem 'bootstrap-sass', "~> 2.0.4.0"

gem 'thin'

gem 'mysql2'

group :development do

gem 'sqlite3'

gem 'rspec-rails'

gem 'annotate', '~> 2.4.1.beta'

end

group :assets do

gem 'sass-rails', '~> 3.2.3'

gem 'coffee-rails', '~> 3.2.1'

gem 'uglifier', '>= 1.0.3'

end

gem 'jquery-rails'

gem 'high_voltage'

sufish
  • 3
  • 2
  • Hi, I notice both apps are bound to the same database, are both instances running from the same codebase? It would also be useful if you could post up the contents of your Gemfile. – Dan Higham Aug 22 '12 at 07:26
  • @DanHigham No, they are from different codebase. – sufish Aug 22 '12 at 13:22
  • I think something specific to the second app maybe holding the connection up. What does the application do? Is it deployed as a Rails app or are you using it Standalone to run a Rake task? – Dan Higham Aug 22 '12 at 13:25
  • @DanHigham, the second app is deployed as a Rails app and it just simply show data from the database, should i bind different mysql services to different applications? – sufish Aug 22 '12 at 13:29
  • There shouldn't be any issue in binding two different applications to one data source. In fact I did it myself to test the scenario and both consoles came up fine. I can take a look at the source if you are happy for me to take a look? – Dan Higham Aug 22 '12 at 14:00
  • @DanHigham , i found the reason, since the app2 is just for demo and i dont want it to consume too much resources so i set its memory limit to 128M which is too low in such case and after i set the limit to 512M then the problem is resolved.. thanks for your help – sufish Aug 22 '12 at 14:25

1 Answers1

0

it turns out the memory limit for app2 is too low(128M), increasing the memory limit solves the issue

sufish
  • 3
  • 2