Coder Social home page Coder Social logo

Comments (4)

mjaric avatar mjaric commented on August 16, 2024

Hi @santoshturamari,

This library uses TCP to connect to SQL server. If you have trouble to connection, please verify on what TCP port remote SQL server listens for connection. If that port is not 1433, you have to set it in this library in mix config like below

import Mix.Config

config :your_app_name, :tds_conn,
  hostname: "some-remote-hostname", # <--- change to IP address or hostname that SQL server is running on
  port: 1433, # <---- Change to port SQL server listens
  username: "...",
  password: "...",
  database: "database-name"

from tds.

santoshturamari avatar santoshturamari commented on August 16, 2024

Hi @mjaric
Thanks for the reply.
I have already tried this, also I have tried {:ok, pid} = Tds.start_link([hostname: ********, instance: ******, username: ********, password: *********, database: ********, port: 1433])

Always I got this error.
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 10044ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

  1. Ensuring your database is available and that you can connect to it
  2. Tracking down slow queries and making sure they are running fast enough
  3. Increasing the pool_size (although this increases resource consumption)
  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information

But when I tried to connect via Python, pymssql or execute python script in Elixir using erlport, it got connected seamlessly.

Thanks,
Santosh T

from tds.

mjaric avatar mjaric commented on August 16, 2024

Is your remote SQL server server in Azure?

from tds.

santoshturamari avatar santoshturamari commented on August 16, 2024

No, but after the trigger, when we checked the firewall logs, the requests always originated from 1434 port which is UDP port, even though I have mentioned 1433. Hence requests were always failing. But when I used pymssql from Python, the communication was proper.

from tds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.