tag:support.flying-sphinx.com,2011-01-05:/discussions/problems/204-sql_connect-could-not-connect-to-server-connection-timed-outFlying Sphinx: Discussion 2018-01-03T15:02:20Ztag:support.flying-sphinx.com,2011-01-05:Comment/147386522012-03-24T01:40:40Z2012-03-24T01:40:42Z sql_connect: could not connect to server: Connection timed out<div><p>Hi,<br>
I set up our app on Heroku, basic shared database, but when
indexing we ran into this problem</p>
<p>Sphinx 1.10-beta (r2420)<br>
Copyright (c) 2001-2010, Andrew Aksyonoff<br>
Copyright (c) 2008-2010, Sphinx Technologies Inc (<a href=
"http://sphinxsearch.com">http://sphinxsearch.com</a>)</p>
<p>using config file
'/mnt/sphinx/flying-sphinx/e1823e2399336dcaf/sphinx.conf'...<br>
indexing index 'listing_core'...<br>
ERROR: index 'listing_core': sql_connect: could not connect to
server: Connection timed out</p>
<pre>
<code>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?</code>
</pre>
<p>
(DSN=<a>pgsql://ecwbvzzkvd:***@ec2-107-20-190-94.compute-1.amazonaws.com:54...</a>).
total 0 docs, 0 bytes<br>
total 193.442 sec, 0 bytes/sec, 0.00 docs/sec<br>
.....</p>
<p>Do you have any idea why this happens?<br>
Thanks a lot<br>
Son Tran</p></div>Son Trantag:support.flying-sphinx.com,2011-01-05:Comment/147386522012-03-24T01:47:10Z2012-03-24T01:47:10Z sql_connect: could not connect to server: Connection timed out<div><p>Hi Son</p>
<p>Are you using the default Heroku shared database, or their
shared database add-on? And when you run <code>heroku config
--long</code>, what are all the variables that start with
FLYING_SPHINX?</p>
<p>Cheers</p>
<p>Pat</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/147386522012-03-24T02:00:22Z2012-03-24T02:00:23Z sql_connect: could not connect to server: Connection timed out<div><p>Hi Pat,<br>
We are using a default Heroku shared database but not sure it come
from add-on or not</p>
<pre>
<code>=> 80965a7398485d93a
=> ec2-23-20-44-208.compute-1.amazonaws.com</code>
</pre>
<p>=> e1823e2399336dcaf</p>
<pre>
<code>=> false
=> 9335</code>
</pre>
<p>At some point, we change FLYING_SPHINX_INGRESS to true, and
tried to reindex, but the errors were the same<br>
Thx<br>
SOn</p></div>Son Trantag:support.flying-sphinx.com,2011-01-05:Comment/147386522012-03-24T02:03:17Z2012-03-24T02:03:17Z sql_connect: could not connect to server: Connection timed out<div><p>If it's the default, it's not an add-on - so, what you really
want is FLYING_SPHINX_INGRESS not set at all:</p>
<pre>
<code>heroku config:remove FLYING_SPHINX_INGRESS</code>
</pre>
<p>Give that a shot, let me know how you go.</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/147386522012-03-24T02:12:24Z2012-03-24T02:12:25Z sql_connect: could not connect to server: Connection timed out<div><p>That works! Thanks a lot</p>
<p>But we run into this problem<br>
using config file
'/mnt/sphinx/flying-sphinx/e1823e2399336dcaf/sphinx.conf'...<br>
indexing index 'listing_core'...<br>
collected 100 docs, 0.0 MB<br>
sorted 0.0 Mhits, 100.0% done<br>
total 100 docs, 23930 bytes<br>
total 0.381 sec, 62734 bytes/sec, 262.16 docs/sec<br>
skipping non-plain index 'listing'...<br>
indexing index 'user_core'...<br>
ERROR: index 'user_core': sql_range_query: ERROR: function
crc32(character varying) does not exist<br>
LINE 1: ..."class_crc",
array_to_string(array_accum(COALESCE(crc32("pos...</p>
<pre>
<code> ^</code>
</pre>
<p>HINT: No function matches the given name and argument types. You
might need to add explicit type casts.<br>
(DSN=<a>pgsql://ecwbvzzkvd:***@127.0.0.1:10335/ecwbvzzkvd</a>).</p>
<p>I understand that there is some problem with crc32 vs Heroku
psql -- Any suggestion to get around this problem would be
appreciated<br>
Thx<br>
Son</p></div>Son Trantag:support.flying-sphinx.com,2011-01-05:Comment/147386522012-03-24T02:19:45Z2012-03-24T02:19:45Z sql_connect: could not connect to server: Connection timed out<div><p>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.</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/147386522012-03-24T02:32:28Z2012-03-24T02:32:29Z sql_connect: could not connect to server: Connection timed out<div><p>Thanks a lot Pat. Really appreciate your help. We'll try to use
Amazon RDS to get round this problem first.</p></div>Son Trantag:support.flying-sphinx.com,2011-01-05:Comment/147386522012-03-24T02:34:13Z2012-03-24T02:34:13Z sql_connect: could not connect to server: Connection timed out<div><p>No worries. The other MySQL add-ons should work fine as well, if
you find them to be more reasonably priced.</p></div>Pat Allan