RohitDhankar / DigitalCognition_OldRepo_ARCHIVED

DC is being developed to be a generic BI tool. Product preview here :- https://www.youtube.com/channel/UC9J9N9CNv15s9U9Aejpza6g/videos
2 stars 1 forks source link

PSQL – How many connections live / created at any given time ? Ar thse getting Closed ? If Not how long do they persist #5

Open RohitDhankar opened 5 years ago

RohitDhankar commented 5 years ago

Within the Python code there is very bad code - many functions are creating connections to PSQL . Find out for the PSQL – How many CONNs created at anytime ? Are they getting Closed ? If Not how long do they need to persist ?

RohitDhankar commented 5 years ago

Solved - created a python method psql_liveConn_Status() , that monitors PSQL and shows the live connections status , the PSQL query, etc . Done primarily basis inputs from PSQL Documentation and the SO Questions here :-

https://stackoverflow.com/questions/41444890/how-to-use-server-side-cursors-with-psycopg2

https://stackoverflow.com/questions/49926044/django-connection-pooling-to-postgresql

RohitDhankar commented 5 years ago

The PSQL Live connection status function , psql_liveConn_Status() , provides useful information that needs to be persisted . As on date , just dumped a CSV from the DF . Also showing the DF in a Modal . Further need to get this DF , into a SQLite or PSQL table and persist .

Screenshot from 2019-06-04 19-12-56