Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed connections infinitely create file descriptors #1017

Open
joaquinrponce opened this issue Jul 19, 2022 · 0 comments
Open

Failed connections infinitely create file descriptors #1017

joaquinrponce opened this issue Jul 19, 2022 · 0 comments

Comments

@joaquinrponce
Copy link

Issue

Whenever a connection is attempted, or a connection is lost, several file descriptors are opened and are never removed.
This is a problem as our Puma server eventually hits the open file limit and crashes, as well as our delayed_job jobs eventually also hitting the file limit and manifesting different errors.

Expected behavior

Should not create infinite file descriptors.

Actual behavior

Creates file descriptors infinitely, removed only when the process for the application is killed.

How to reproduce

Use ActiveRecord and establish a connection to a database that is not available.
Infinitely loop an attempt to run a query on that connection.
Check the amount of file descriptors going up with each attempt, infinitely.

Details

  • Rails version: 5.2.8

  • SQL Server adapter version: 5.2.1

  • TinyTDS version: 2.1.2

  • FreeTDS details:

    Compile-time settings (established with the "configure" script)
                              Version: freetds v1.2.18
               freetds.conf directory: /usr/local/etc
       MS db-lib source compatibility: no
          Sybase binary compatibility: no
                        Thread safety: yes
                        iconv library: yes
                          TDS version: 7.3
                                iODBC: no
                             unixodbc: no
                SSPI "trusted" logins: no
                             Kerberos: no
                              OpenSSL: yes
                               GnuTLS: no
                                 MARS: yes
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants