This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Install & configuration » Master/slave configuration : Master...

Master/slave configuration : Master down - Ezpublish down

Master/slave configuration : Master down - Ezpublish down

Friday 09 November 2012 6:19:43 am - 2 replies


We have setup a master/slave configuration.It works fine when the master is up.

A test with the master down and the slave up shows that Ezpublish cannot run with a master down as it always requires the connection to the master to be available.

Is it the way Ezpublish is working ?  If so then the master/slave mecanism is only useful for load balancing (Master and Slave up ) and not for failover ( Master down / Slave up )

Or did I miss something in the master/slave configuration

As anyone tried this test  ?

Thanks for your help


Friday 09 November 2012 10:12:24 am

As it stands, eZ tries to connect both to slave and to master on every single page, and barfs if any of the two is down.

The situation could be improved a lot, eg:

  • allow ez to try a 2nd slave if slave nr. X is down
  • do not connect to master until a write-query is executed
  • do not connect to slave either if no query is executed (current kernel always opens a db connection anyway)

There are already feature requests open in the tracker for that.

This is probably not going to happen anytime soon on the "ezp4" kernel unless someone from the community steps up to implement it, as the eZ Engineering team is focused on the new stack which currently uses ZetaComponents to connect to the db and will probably soon switch to Doctrine.

There are also other possibilities, like using the php native mysql-proxy which can implement failover and loadbalancing in a way which is mostly transparent to the application...

Monday 19 November 2012 4:36:04 pm

Hi Quang,

additional: there was a thread about this 24 January 2011

and a fresh blog post from Mugo

Trading automatic failover for really good manual failover


Greetings ekke


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from