I'm still having periodic errors with sending queries to Postgres...First
thing I did was turn off SSL for Posgres, that simply changed the error
from previously reported to this:
ERROR - 01/Nov/2013 15:53:02 PG::UnableToSend: : SELECT * FROM "domains"
WHERE ("uri" = 'sampledomain.com') LIMIT 1
ERROR - 01/Nov/2013 15:53:02 PG::UnableToSend:
I then activated the connection_validator extensions and have been watching
the server for about 2 days now and still experiencing the problem where
the query can't be sent to the server. Granted this is my first extensive
production experience with PG 9.2 having last used PG extensively at 8.1 a
few years back -- is there some fundamental changes to the 9.x series I
should be aware of that may be affecting my app's ability to communicate
with the server as I pretty much installed and configured a stock 9.2
install through debian packages.
Here's the database connection code:
####
Sequel::Model.plugin(:schema)
Sequel::Model.raise_on_save_failure = false # Do not throw exceptions on
failure
DB = Sequel::Model.db = case Padrino.env
when :development then
Sequel.connect("postgres://localhost/cf_development", :loggers => [logger])
when :production then
Sequel.connect("postgres://localhost/cf_development", :loggers => [logger])
when :test then
Sequel.connect("postgres://localhost/cf_development", :loggers => [logger])
end
DB.extension(:connection_validator)
####
Configuration is same as previously reported, but now running Padrino 0.11.3
Michael
On Tue, Oct 22, 2013 at 3:06 PM, Jeremy Evans <[email protected]>wrote:
> On Tuesday, October 22, 2013 11:15:50 AM UTC-7, Michael Lang wrote:
>>
>> Hmmm...Sequel most likely is removing the connection from the pool and
>> thus re-establishing with a new connection, because its only one connection
>> and the app works if I resubmit the page that failed. Any suggestions for
>> mitigating this so that it happens within same request and application flow
>> is not interrupted? I could turn off SSL as I don't need encryption on
>> localhost <=> localhost.
>>
>
> Turning off SSL if you are connecting to localhost should be fine. If you
> leave the host completely empty, it should try to connect using the unix
> socket.
>
> If that doesn't solve the issue, look into the connection_validator
> extension, but if you are connecting to localhost you shouldn't need it.
>
> Thanks,
> Jeremy
>
> --
> You received this message because you are subscribed to the Google Groups
> "sequel-talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sequel-talk.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
http://cybrains.net
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.