Apache/Django/cx_oracle raises 500 error when we switch one of the DB node from oracle RAC server

121 views Asked by At

I deployed a Django/Python application at Apache server. Application is connected with Oracle RAC (Real Application Cluster) 19C DB server, having 2 nodes. I am using cx-Oracle==8.2.1. So the issue is, when we switch one of the node e.g make the one node up and other down the application starts giving 500 errors without any description.

Here is my DB settings

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.oracle',
        'NAME': 'myrac.xxxxx.com/dbname:1111',
        'USER': 'usr',
        'PASSWORD': 'xxxxxxxx',
        'TIME_ZONE': 'Asia/Karachi',
    }
}
1

There are 1 answers

0
suraj On

If you are using RAC with 2 nodes then unless both the nodes are not down your requests will be served. If you are switching from one node to other and if during the process of switching if no nodes are up you will most probably get ORA-01034: The Oracle instance is not available for use. Start the instance or ORA-12537: TNS:connection closed or ORA-01109: database not open.If you are getting error 500 there may be some issue with your apache deployment and for exact issue you check your apache error logs.