sql_connect: could not connect to server: Connection timed out
Hi,
I set up our app on Heroku, basic shared database, but when
indexing we ran into this problem
Sphinx 1.10-beta (r2420)
Copyright (c) 2001-2010, Andrew Aksyonoff
Copyright (c) 2008-2010, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file
'/mnt/sphinx/flying-sphinx/e1823e2399336dcaf/sphinx.conf'...
indexing index 'listing_core'...
ERROR: index 'listing_core': sql_connect: could not connect to
server: Connection timed out
Is the server running on host "ec2-107-20-190-94.compute-1.amazonaws.com" (10.96.73.167) and accepting
TCP/IP connections on port 5432?
(DSN=pgsql://ecwbvzzkvd:***@ec2-107-20-190-94.compute-1.amazonaws.com:54...).
total 0 docs, 0 bytes
total 193.442 sec, 0 bytes/sec, 0.00 docs/sec
.....
Do you have any idea why this happens?
Thanks a lot
Son Tran
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Pat Allan on 24 Mar, 2012 01:47 AM
Hi Son
Are you using the default Heroku shared database, or their shared database add-on? And when you run
heroku config --long
, what are all the variables that start with FLYING_SPHINX?Cheers
Pat
2 Posted by Son Tran on 24 Mar, 2012 02:00 AM
Hi Pat,
We are using a default Heroku shared database but not sure it come from add-on or not
=> e1823e2399336dcaf
At some point, we change FLYING_SPHINX_INGRESS to true, and tried to reindex, but the errors were the same
Thx
SOn
Support Staff 3 Posted by Pat Allan on 24 Mar, 2012 02:03 AM
If it's the default, it's not an add-on - so, what you really want is FLYING_SPHINX_INGRESS not set at all:
Give that a shot, let me know how you go.
4 Posted by Son Tran on 24 Mar, 2012 02:12 AM
That works! Thanks a lot
But we run into this problem
using config file '/mnt/sphinx/flying-sphinx/e1823e2399336dcaf/sphinx.conf'...
indexing index 'listing_core'...
collected 100 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 100 docs, 23930 bytes
total 0.381 sec, 62734 bytes/sec, 262.16 docs/sec
skipping non-plain index 'listing'...
indexing index 'user_core'...
ERROR: index 'user_core': sql_range_query: ERROR: function crc32(character varying) does not exist
LINE 1: ..."class_crc", array_to_string(array_accum(COALESCE(crc32("pos...
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
(DSN=pgsql://ecwbvzzkvd:***@127.0.0.1:10335/ecwbvzzkvd).
I understand that there is some problem with crc32 vs Heroku psql -- Any suggestion to get around this problem would be appreciated
Thx
Son
Support Staff 5 Posted by Pat Allan on 24 Mar, 2012 02:19 AM
The issue is that you can't have fields or string attributes being facets - if you can share your define_index block for the model, we can see if there's some options to work around it. Of course, if you don't need those attributes or fields as facets, then just remove the facet setting and it should be fine.
6 Posted by Son Tran on 24 Mar, 2012 02:32 AM
Thanks a lot Pat. Really appreciate your help. We'll try to use Amazon RDS to get round this problem first.
Support Staff 7 Posted by Pat Allan on 24 Mar, 2012 02:34 AM
No worries. The other MySQL add-ons should work fine as well, if you find them to be more reasonably priced.