Greetings,
I am currently experiencing an issue with connecting to a Pervasive database,
For context, we have an ERP system which uses Pervasive as its database of choice. I've developed a web app (for internal use only - not internet facing - traffic is quite small) which connects to Pervasive to query/update the data from the ERP.
The web app doesn't make any connections itself to the database, instead it sends requests to a flask API which uses unixODBC and the Pervasive drivers to make the connection to the server hosting Pervasive. This works really well for the most part, however every so often the connection between Pervasive and the API breaks down and the following error message is logged.
Once the connection breaks down, all further requests will continue to present this error and fail. I would imagine from the error that this would imply that there is something wrong with network connection or the SQL Connection Manager. However ping and telnet both suggest that Pervasive remain reachable at all times, I wish I had tested the connection with isql.
I currently have a "rescue" script that is set as an error handler from within the flask API, such that when this error occurs during the day, the script readds the DSN and restarts the service. This works and means I don't have to babysit it but it does present an error message to the user temporarily whilst it sorts itself out.
The firewall on both the Pervasive server and the linux machine are either disabled/set to allow traffic, DNS resolves the name correctly and I can always ping it correctly (I did add it to the hosts file as it is a fixed IP address - just in case) and there's never anything in the Pervasive logs of note and all other connections continue to be serviced.
I have tried being more conscious about managing my connections each request opens one connection and closes the connection when the resources are cleared up.
Are there any other steps I can take to try and figure out this issue? I have seen some posts on here which don't have much in the way of definite conclusions.
I am aware Pervasive 13 is out of support now, and we have a quote to update however it's a big chunk of change and I haven't got management approval yet (and may not do)
I can add any code as requested.
Many Thanks,
Ian
I am currently experiencing an issue with connecting to a Pervasive database,
For context, we have an ERP system which uses Pervasive as its database of choice. I've developed a web app (for internal use only - not internet facing - traffic is quite small) which connects to Pervasive to query/update the data from the ERP.
The web app doesn't make any connections itself to the database, instead it sends requests to a flask API which uses unixODBC and the Pervasive drivers to make the connection to the server hosting Pervasive. This works really well for the most part, however every so often the connection between Pervasive and the API breaks down and the following error message is logged.
Code:
2024-07-24 11:54:13.332949 - ('08S01', '[08S01] [PSQL][ODBC Client Interface][Client LNA]The ODBC Client Interface cannot access the data source because SQL Connection Manager is not running at the specified port number. Contact your system administrator for assistance. (10065) (SQLDriverConnect)')
Once the connection breaks down, all further requests will continue to present this error and fail. I would imagine from the error that this would imply that there is something wrong with network connection or the SQL Connection Manager. However ping and telnet both suggest that Pervasive remain reachable at all times, I wish I had tested the connection with isql.
I currently have a "rescue" script that is set as an error handler from within the flask API, such that when this error occurs during the day, the script readds the DSN and restarts the service. This works and means I don't have to babysit it but it does present an error message to the user temporarily whilst it sorts itself out.
The firewall on both the Pervasive server and the linux machine are either disabled/set to allow traffic, DNS resolves the name correctly and I can always ping it correctly (I did add it to the hosts file as it is a fixed IP address - just in case) and there's never anything in the Pervasive logs of note and all other connections continue to be serviced.
I have tried being more conscious about managing my connections each request opens one connection and closes the connection when the resources are cleared up.
Are there any other steps I can take to try and figure out this issue? I have seen some posts on here which don't have much in the way of definite conclusions.
I am aware Pervasive 13 is out of support now, and we have a quote to update however it's a big chunk of change and I haven't got management approval yet (and may not do)
I can add any code as requested.
Many Thanks,
Ian