We have an application Ruby on rails, which fires a number of queries to the database. I Suspect it is connection timeout error or something When we run the application in development mode, it works as expected. However when we switch to Production mode, we get the following error in Postgre console: -------------------------- LOG: could not receive data from client: No connection could be made because th e target machine actively refused it. LOG: unexpected EOF on client connection ------------------------ Entries in database.yml file are as follows: development: adapter: jdbcpostgresql database: microblogging username: databaseusername password: databasepassword pool: 15 timeout: 15000 production: adapter: jdbcpostgresql database: microblogging username: databaseusername password: databasepassword pool: 15 timeout: 15000 Environment: Jruby version 1.5.0 Rails version 2.3.5 Postgre SQL database Internal WEBrick server -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Forgot to mention: There are 4 asynchronous queries being fired. Out of these 3 get fired and result is achieved as expected, however the 4th query doesnt produce any result There are no exceptions thrown neither any log created. However in Postgre Sql console the stack trace is as previously mentioned. Yani Yen wrote:> We have an application Ruby on rails, which fires a number of queries to > the database. I Suspect it is connection timeout error or something > > When we run the application in development mode, it works as expected. > However when we switch to Production mode, we get the following error in > Postgre console: > -------------------------- > LOG: could not receive data from client: No connection could be made > because th > e target machine actively refused it. > > LOG: unexpected EOF on client connection > ------------------------ > > Entries in database.yml file are as follows: > > development: > adapter: jdbcpostgresql > database: microblogging > username: databaseusername > password: databasepassword > pool: 15 > timeout: 15000 > > production: > adapter: jdbcpostgresql > database: microblogging > username: databaseusername > password: databasepassword > pool: 15 > timeout: 15000 > > > Environment: > Jruby version 1.5.0 > Rails version 2.3.5 > Postgre SQL database > Internal WEBrick server-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Jun-09 14:44 UTC
Re: db connection issues in production but not in dev mode
Yani Yen wrote:> We have an application Ruby on rails, which fires a number of queries to > the database. I Suspect it is connection timeout error or something > > When we run the application in development mode, it works as expected. > However when we switch to Production mode, we get the following error in > Postgre console: > -------------------------- > LOG: could not receive data from client: No connection could be made > because th > e target machine actively refused it. > > LOG: unexpected EOF on client connection > ------------------------ > > Entries in database.yml file are as follows: > > development: > adapter: jdbcpostgresql > database: microblogging > username: databaseusername > password: databasepassword > pool: 15 > timeout: 15000 > > production: > adapter: jdbcpostgresql > database: microblogging > username: databaseusername > password: databasepassword > pool: 15 > timeout: 15000 > > > Environment: > Jruby version 1.5.0 > Rails version 2.3.5 > Postgre SQL database > Internal WEBrick serverThis won''t solve your problem, but it''s a VERY BAD practice to have development and production point to the same DB. You really should be able to play around in your dev sandbox without jeopardizing production data. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you, that was a mistake made by me while writing here my production database is microblogging_production. The postgreSQL database version 8.3.7 Gem list : *** LOCAL GEMS *** actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activerecord-jdbc-adapter (0.9.7, 0.9.2) activerecord-jdbcmysql-adapter (0.9.2) activerecord-jdbcpostgresql-adapter (0.9.7) activeresource (2.3.5) activesupport (2.3.5) columnize (0.3.1) jdbc-mysql (5.0.4) jdbc-postgres (8.4.701) jruby-jars (1.5.0) jruby-openssl (0.7) jruby-rack (1.0.0) mysql (2.8.1) rack (1.0.1) rails (2.3.5) rake (0.8.7) rspec (1.3.0, 1.2.9) ruby-debug (0.10.3) ruby-debug-base (0.10.3.2) rubyzip (0.9.4) sources (0.0.1) warbler (1.0.3) Thank you. Marnen Laibow-Koser wrote:> Yani Yen wrote: >> We have an application Ruby on rails, which fires a number of queries to >> the database. I Suspect it is connection timeout error or something >> >> When we run the application in development mode, it works as expected. >> However when we switch to Production mode, we get the following error in >> Postgre console: >> -------------------------- >> LOG: could not receive data from client: No connection could be made >> because th >> e target machine actively refused it. >> >> LOG: unexpected EOF on client connection >> ------------------------ >> >> Entries in database.yml file are as follows: >> >> development: >> adapter: jdbcpostgresql >> database: microblogging >> username: databaseusername >> password: databasepassword >> pool: 15 >> timeout: 15000 >> >> production: >> adapter: jdbcpostgresql >> database: microblogging >> username: databaseusername >> password: databasepassword >> pool: 15 >> timeout: 15000 >> >> >> Environment: >> Jruby version 1.5.0 >> Rails version 2.3.5 >> Postgre SQL database >> Internal WEBrick server > > This won''t solve your problem, but it''s a VERY BAD practice to have > development and production point to the same DB. You really should be > able to play around in your dev sandbox without jeopardizing production > data. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, my postgreSQl error went by changing the postgres adapter to 8.3.604.. Thanks... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.