Too many connections?

Matt Zikherman's Avatar

Matt Zikherman

26 Jul, 2012 06:51 PM

Hi- I started seeing this error message today (seems to be generated through the delta index)

Sphinx 1.10-beta (r2420)
Copyright (c) 2001-2010, Andrew Aksyonoff
Copyright (c) 2008-2010, Sphinx Technologies Inc (

using config file '/mnt/local/flying-sphinx/0b6aa9e26e4765270/sphinx.conf'...
indexing index 'product_search_delta'...
ERROR: index 'product_search_delta': sql_connect: FATAL: too many connections for role "u6csnjjiujeaas"
(DSN=pgsql://u6csnjjiujeaas:***@ ). total 0 docs, 0 bytes
total 0.114 sec, 0 bytes/sec, 0.00 docs/sec
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

Any ideas what this might be? We have the ceramic plan running, and a manual rake fs:index seems to work fine (no error messages). The delta indexing had also been working fine for a while, until today when we started receiving these messages. Is this related to the number of connections to our Postgres DB on Heroku, or a sphinx-related error? I could not see anything weird in our logs and a rake fs:index seems to be fine.

  1. Support Staff 1 Posted by Pat Allan on 26 Jul, 2012 08:11 PM

    Pat Allan's Avatar

    Hi Matt

    My understanding of the error is that it's related to PostgreSQL - there's too many connections to your database. Perhaps it could be related to the number of workers you're running, both web and job processes? Each delta index job will require a connection, and if there's more of them running at any one time, plus each web worker, plus other tools, I guess that could add up…

    So, how many workers are you running, and how often are you seeing delta jobs occur (and how often do they fail, too)?

    Odd that it only crops up with the delta indexing… I'd expect to see it with the full index task occasionally as well.



Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac