mortenbra / thoth-gateway

Thoth Gateway: PL/SQL Gateway Module for Microsoft IIS, similar to mod_plsql and ORDS (APEX Listener).
BSD 3-Clause "New" or "Revised" License
16 stars 8 forks source link

Oracle connections are not closing when a bad request(404) is returned #6

Closed mjf200 closed 3 years ago

mjf200 commented 3 years ago

When a request results in a 404 error, the Oracle database connection is left open. If too many requests are made then Thoth can no longer service valid requests because it fails to get a connection from the pool(after the default of 100 connections are made).

2021-03-24 10:49:11,913 [64] ERROR PLSQLGatewayModule.PLSQLHttpModule Failed to connect to database: Pooled connection request timed out

We see this in the code : // TODO: does this get called if HttpException is thrown above... don't think so! ora.CloseConnection();

This became a problem for us when a vulnerability scan was done on one of our sites using Thoth. The tool made many requests which required an application pool restart.

mortenbra commented 3 years ago

About time to fix that TODO :-)

mortenbra commented 3 years ago

Fixed in upcoming v1.4.5 release.

UncleJohnWellit commented 3 months ago

Hello! Any plans to release the upcoming v1.4.5 release?

mortenbra commented 1 month ago

@UncleJohnWellit Waiting to see if a new gateway release is required to work with Database 23ai (Free/Enterprise), in which case the improvement mentioned here will be rolled into that release.