Python Forum
HTTP 404 error with Session Pool - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: HTTP 404 error with Session Pool (/thread-34007.html)



HTTP 404 error with Session Pool - Clives - Jun-17-2021

Greetings,

The connection works with just a single user connection, but I get a HTTP 404 error, when creating a Session Pool connection??

I used this cx_Oracle example:
https://cx-oracle.readthedocs.io/en/latest/user_guide/connection_handling.html#session-callbacks-for-setting-pooled-connection-state

Any suggestions or pointers, would be appreciated.


The code is:

def service_response(): responsepool = cx_Oracle.SessionPool(user="user", password="password", dsn="server/dbt", min=2, max=5, increment=1, encoding="UTF-8") connection = responsepool.acquire() cursor = connection.cursor() for responsesql in cursor.execute("SELECT * FROM table"): responsedata = list(cursor.execute(text(responsesql))) print(responsedata) responsepool.release(connection) responsepool.close() return render_template('/index.html', service_response= responsedata)



This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.