Connection Pool Memory Leak

It’s a technique in ColdFusion script and it loosely equates with a globally defined variable in Java (think old school java where you put variable declarations at the top of your Main.java file instead of within a class). ColdFusion script is a lot like writing Java code that runs from the command line and has no DI, so if you ripped out all the Sprint features and did all your class instantiation and linkage the old way instead of via dependency injection, it ends up looking the same algorithmically (just different syntax).

I say cached because application variable usage acts like a user-defined cahce, letting you store commonly used objects and data at this high-level where it’s accessible for the life-cycle of the web application. It also solved the problem that while using an established Flowable connection is fast (usually under 2 seconds for me), creating a new one is not (usually around 20 seconds to establish connection, depending on network latency). So I create the process engine configuration with the connection pool once at start up, then store it into the variable so that I can reference the connection as needed.

There are multiple engines running in our development environment, because each developer has their own application server instance and therefore would established a distinct connection pool with a different process engine instance.

Where the real fun comes into play, though, is that this happens in my TEST environment, where I’m not expecting multiple application instances and therefore wouldn’t anticipate seeing multiple connection spawns like this. Though your comment about the multiple engines has me thinking that maybe I should be looking for a fingerprint that this is happening. Is there an easier way to spot multiple engines running? Right now the only way(s) I can think of to detect such a fingerprint are:

1). I have an unexplained alteration to the process/task IDs, caused by the different engine instances reserving non-overlapping blocks of primary keys (to avoid collisions). By this I mean one process starts up with, say, ID 10001 and another starts up with 5002. That indicates I have 2 engines running, because the second engine reserved blocks 5001 to 9999.

2). I go hunting in netstat and server logs and look for threads/PIDs/ports that seem to all be coming from the same application server (there’s only one application server running on my TEST environment). I shudder at the thought of doing this because it seems like a huge time sink that is unlikely to yield answers.