Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many open files error when using postgresql_makara with incorrect connection details #258

Open
wjessop opened this issue Jul 2, 2020 · 0 comments

Comments

@wjessop
Copy link

wjessop commented Jul 2, 2020

Using makara 0.4.1 and the (distribute_reads gem), I've had an issue where an incorrect connection spec causes a "Too many open files" error. The config in question is this:

development: &default
  adapter: postgresql_makara
  database: connector_development
  encoding: utf8
  min_messages: warning
  pool: <%= Integer(ENV["DB_POOL"] || 5) %>
  reaping_frequency: <%= Integer(ENV["DB_REAPING_FREQUENCY"] || 10) %>
  timeout: 5000
  variables:
    statement_timeout: 5000
  connect_timeout: 1
  checkout_timeout: 1
  prepared_statements: false
  makara:
    id: postgres
    disable_blacklist: true
    master_ttl: 5
    master_strategy: failover
    slave_strategy: round_robin
    sticky: false

    connections:
      - role: master
        name: primary
        host: 127.0.0.1
        port: 5432
      - name: replica
        host: 127.0.0.1
        port: 5433

Notice the last port spec, 5433. This is wrong, it should be 5432 as there is no server listening on 5433 on most people's developent machines here. With this incorrect port spec, two developers individually reported a "too many open files" error while running the puma webserver. Fixing the port spec fixes the too many open files error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant