We have a problem with hanging odbcserver processes after SQL queries timed out. It seems that even though the client erlang process terminates due to the timeout, causing the odbc process (i.e. the gen_server implemented by odbc.erl) to close the port to the odbcserver port program, the port program itself does not terminate.
It does not seem to matter if the DB query actually completes after this, the odbcserver lives forever and the database session is never closed causing multiple database sessions just lingering.
We started detecting this after upgrading from rhel6 to rhel7, but have currently no way to test it on rhel6 so can’t rule out that it even happened there without us detecting it.
We can easily reproduce the problem by spawning off a process which does odbc:connect/2, and then odbc:sql_query/3 with a short timeout ensuring that the query times out.
Notice that it does not happen if we just crash the client process in any other way than by triggering this timeout.