I have a configured Django application with two configured database first_DB and second_DB
The configuration looks like the following
statistics = {'default': {'engine': 'django.db.backends.mysql', # add 'postgresql_psycopg2', 'postgresql ',' Mysql ',' sqlite3 'or' oracle '. 'NAME': Path to 'ammonitor', # or database file if using sqlite3 'USER': 'password' not used with 'ammonitor', # sqlite3: 'ammonitor', with # sqlite3 Not used 'HOST': '', set to empty string for # local host 'port' not used with Sqlite3: '', set to empty on default string not used with Sqlite3 Went}, 'nagvios': {' engine ':' digengo db. Backend MSNL, 'NAME': 'Citizen', 'USER': 'ammonitor', 'password': 'ammonitor', 'host': 'Nagios.edc', 'PORT': '',},}
Nogis database is read-only and it is configured in the router module.
The nagios database is on a remote machine
My application gets data from Nagobo DB and incorporates it into my local DB
If Nagious Machine If it is shut down or on Magnol machine, then the Django server starts with the following error
Enter the code here_mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host 'nagios.edc' ( 1) ")
and the application does not work
I understand that the Django server has all configured data And tries to connect
But I have not reached my application I want to work even if the second
I can do this?
If you do not know where the 500 error is coming from, then DEBUG = True Set in settings, and see Debug Stack Trace page which is produced. It will show you where the exception is being raised.
Comments
Post a Comment