Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8227359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:06:16+00:00 2026-06-07T16:06:16+00:00

I get the following errors in airbrake if my staging (2 servers) or production

  • 0

I get the following errors in airbrake if my staging (2 servers) or production (4 servers) servers have no activity for about 15 minutes. Here are the error messages:

ActiveRecord::StatementInvalid: PG::Error: could not receive data from
server: Connection timed out

OR

PG::Error: could not connect to server: Connection timed out Is the
server running on host “tci-db4.dev.prod” and accepting TCP/IP
connections on port 5432?

I’m using PostgreSQL as my database. One of the servers also acts as the db server.

Environment:

Ruby 1.9.3 (This also happened under Ruby 1.8.7, but it is worse since upgrading since the ruby process on the server will go to 100% and stay at 100% until is killed when the server loses the db connection.

Rails 3.1.6

PG GEM 0.13.2

Postgres 9.1

Phusion Passenger

This problem has been happening for over a year, so I’m hoping someone has some insight on how to fix it. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T16:06:18+00:00Added an answer on June 7, 2026 at 4:06 pm

    Check your TCP/IP socket timeout settings on all routers/switches between the application servers and the database servers. Also turn on logging on the database side and watch the full life cycle of the connection and compare the timing to the errors in your application. I suggest turning on the following settings in postgresql.conf until you get an idea of what to look for:

    log_connections = on
    log_disconnections = on
    log_statement = all
    

    These can be activated with a SIGHUP of the postgres process (or run “SELECT pg_reload_conf();” as a database superuser.

    I’ll be that you have a “connection closed by remote host” or something similar as the last message before the actual disconnect is logged.

    I’ve seen this before and it was the timeout settings on an intermediate switch causing it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get the following errors: error: missing terminating character and error: stray `\' in
I get the following errors when I try to build this project: error C2182:
when I use extends OrmLiteBaseActivity<Database> instead of extends Activity I get following errors in
when I try to compile my code below I get the following errors: error
while i want to compile my opengl code i get the following errors: Error
I'm reworking my code here and I get the following errors: Exception in thread
I get the following errors Error 2 error C2248: 'std::thread::thread' : cannot access private
I get the following errors in DDMS . But how can I trace this
When I try to serialize class with protected members, I get the following errors:
While i am trying to get value from arraylist,i got the following errors.My sample

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.