dbTalk Databases Forums  

problem: read from the bdb replication system

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss problem: read from the bdb replication system in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
wyezl (Offline)
Junior Member
 
Posts: 3
Join Date: Aug 2006

Default problem: read from the bdb replication system - 09-04-2006 , 12:16 AM






There was a master and some slaves based Berkeley db replication.
The replication system was ok. Every second we updated the master's data a few times and then it replicated to the slave.
I write a apache module on each slave machine, read the slave's data and served as a http server.

When the apache module initialized, the module opened the slave’s environment and xx.db. Apache is running and served with the slave's data. Apache was busy and couldn't stop. When the slave was busy replicating data and logs from the master, apache module access the slave's data returned many many errors.
Some times when the slave restarted, apache module access the slave's data return many many errors too, even segment fault. Under this condition the apache master must restart to avoid this.

I want to know:
How to write apache modules with mod_db4?(Where to open environment and open database in apache module. while the module initialized or process initialized? An opened dbenv or dbp can reuse in it?)

How to read the slave's data in another process? (the process(such as apache) running forever can't stop and the slave maybe restart.)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.