Topic: postgresql: Random PG::Error in seed

Hello!
I have a very strange problem, and i don't really know what to do. In my seed phase, i get sometimes this error:

PG::Error: : SELECT  "placeholder_templates".* FROM "placeholder_templates"  WHERE "placeholder_templates"."page_template_id" = 14 AND "placeholder_templates"."name" = 'breadcrumb_long' LIMIT 1

of course, doing it in psql console has success,
and some other times this other error:

rails PG::Error: server closed the connection unexpectedly
This probably means the server terminated abnormally before or while processing the request.: BEGIN

Both errors come from the find_by_name method (where name is an attribute of my table), but every time with differents stacks.
Sometimes i even can finish with success the seed process. Other times i can't
I'm desperate, because all solutions i found on google didn't work for me.
I tried using unix socket, disabling ssl, raise query timeout, allow reconnection. No success
thank you for you help


EDIT: the squeel gem seems to be the responsible of this, it doesn't happen with squeel disabled . But i really need it! I'll ask for some help in squeel, in the meantime

Last edited by vecchiaspugna (2012-09-21 06:33:16)