6 Replies Latest reply: May 13, 2011 10:31 AM by 637288 RSS

    best environment configuration practice

    445076
      we are deploying three different web applications which use bdbxml. they do not share data at all. we currently have it configured for all three apps to use the same environment but with different containers. we are running into problems where if one app goes down, it could take the entire environment down.

      is a 1:1 application to environment configuration a best practice? or is sharing one environment the best practice?

      thanks.
        • 1. Re: best environment configuration practice
          637288
          Hi,

          you should have 1 env per application. Within 1 app you can use multiple containers in order to separate conceptually different data

          Vyacheslav
          • 2. Re: best environment configuration practice
            655560
            Hi,

            This is the normal recovery process. If process 2 was in the middle of something, there is potential corruption on the db. So when process 2 rejoins the env with DB_RECOVERY, it will set the panic bit and start recovery. Process 1 is detecting that and getting out of the environment. After process 2 finishes up with recovery, process 1 can rejoin. This is the normal recovery process. Since we are a library, we have to be cautious about what we are doing and assume when some process terminates abnormally that something could be wrong.

            You can put different Container into different environments. OR adding that the DB_REGISTER and DB_FAILCHK flags can help reduce the number of occurrences when such panic events happen. It's worth following the reference guide documentation starting here:
            http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/transapp_fail.html

            Thanks,
            Rucong Zhao
            Oracle Berkeley DB XML
            • 3. Re: best environment configuration practice
              637288
              Hi Rucong,

              I think here we should distinguish two concepts: 1 multi-process (3-process) application and 3 different applications. In the former case you are right. However, I think the user meant the latter.

              Vyacheslav
              • 4. Re: best environment configuration practice
                655560
                Hi Vyacheslav,

                In DB layer they (3 applications and 3 multi-process) are the same at this point, since each one (no matter it's a process or a application) has its own DB_ENV handlers, which point to the same environment. So they face to the same recovery issue.

                I totally agree with you that the best solution here is to have 1 env per application, since those 3 applications are independent so there is no reason to share the environment at all,

                Thanks and Best regards,
                Rucong
                • 5. Re: best environment configuration practice
                  445076
                  thanks for the pointers! we are going to go 1 environment per application. we are going to configure several smaller (cache, locks, etc) environments instead of one large environment.

                  is there any not-obvious downside to this, from a system resource perspective?
                  • 6. Re: best environment configuration practice
                    637288
                    Hi,

                    I think this is the right thing to do. If you encounter some performance problems, most likely you will have to tune the problematic environment. Theoretically speaking, the set up should depend on your application(s)

                    Vyacheslav