zotonic fails after postgresql restart #55

arjan opened this Issue Sep 5, 2011 · 4 comments


None yet

1 participant

Zotonic member

From http://code.google.com/p/zotonic/issues/detail?id=49

To reproduce -- restart PostgreSQL ("/etc/init.d/postgresql-8.4 restart"
should be enough).

When PostgreSQL is back, it is still impossible to get connection to DB pool:




Tested on version 0.3.

Zotonic member

Well, I've made a quick hack, which resolves a problem.

Commented on Google Code by *igor%gor...@gtempaccount.com***

Zotonic member

Hi Igor,

Your patch looks good, and I understand your solution.
One issue though. I think it is good when we crash when wrong credentials are supplied.
We propose to only ignore the error on a {error, timeout} and otherwise crash.

Do you agree?

  • Marc

Commented on Google Code by *profile.url***

Zotonic member

Hi, Marc.

If you replace _Reason to econnrefused, you will get the behaviour described above.

Still there is another issue: zotonic application will not be started if postgresql
server is downed. I'm not sure whether it is correct or not. As for me, I prefer to
make erlang applications fully start even if auxiliary services (DB, AMQP, XMPP) are
not available at start-up.


Commented on Google Code by *igor%gor...@gtempaccount.com***

Zotonic member

Fixed since revision bdc1683a9caf. I implemented this for the 'econnrefused' case
only, on Marc's suggestion.
Thanks Igor!

Commented on Google Code by *scherpenisse***

@arjan arjan closed this Sep 5, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment