Here’s my issue, the database server starts after the application server (the DB resides in a Virtual Machine running on the application server) and the Servoy Application Server is configured to start automatically as a service. So, this makes the database connections on the Application Server appear offline until they’re manually refreshed (open the connections one by one and click on save settings without making changes). The same thing happens if the DB Server gets restarted.
You might ask: “Is it too hard to just refresh the connections?!”. Well, for one, we have serveral connections but the main concern is that we have various customers in rural areas and they only speak spanish. So, yeah, we do our best to keep it as simple and painless as possible.
I have a physical server (lets call it serverA) that has the Servoy Application Server installed. Inside this server is a Virtual Machine (serverV) that runs an Oracle Database. When serverA starts, the servoy application server is configured to automatically start. Afterwards, the serverV is started and with it the Oracle Database. So, naturally, when serverA starts the database is not online.
Is there a way to have the application server automatically refresh the status of the connections? Or somehow create a service that does this?
Apart from any error logging, does it really interfere with your functionality ?
Usually database connections will work correctly when they can have a correct connection.
For instance MySQL (yes, an Oracle product) is infamous for dropping connections, but after the initial error logging it just works again.
Weird setup… I guess you have your reasons for that though.
Can’t you install the servoy application server inside the Oracle virtual machine? Or maybe inside another VM that starts up AFTER the db one?
I would say put the application server and the db server in same VM because they are bound together anyway.
Especially when they are on the same bare metal anyway.
Robert, if I remember correctly if at startup a db connection can’t be established it gets disabled and won’t be used/brought up by a client. Not sure 100% though.
A fast (but inelegant) solution would be to edit the servoy application startup script and check the db availability before starting the application server.
For instance by adding ‘?autoReconnect=true’ to the connection string in MySQL it will error (a lot) but will keep working.
I haven’t seen any other database connections (Oracle, MSSQL, PostgreSQL) yet drop while actually active (unlike MySQL) so I can’t really tell.
Then again I have seen outside forces at work (VPN in this case) where Oracle connections simply dropped and won’t even reconnect. I guess your milage may vary.
Ok, I hear you guys, I will install servoy in the same machine as the DB. I’ll guess I’ll have a dependency to the servoy service so that it doens’t start until Oracle finishes starting up.