Forum Academy Marketplace Showcase Pricing Features

SQL Database Connector Timeout

I have tried hosting both a Microsoft SQL and mySQL, and neither will connect using the SQL Database Connector. I am sure my string is correct, I have tried using both the hostname and the actual IP address. I would really appreciate some assistance in trouble shooting this. Some sort of actual support line or chat support would be a great idea.

String I’m using for mySQL:
mysql://username:[email protected]:port/database name

I getting varying error messaging but it typically just times out every time I test the connection.

I have read through all current topics on message board, no solution has helped.

EDIT 4/9/18 - I have found the problem, at least on the Amazon side. You must, as another forum post explained, add all IP ranges to inbound connections within your security group. This is for a test database with no info so it’s not security issue, but this is something Bubble should really look into. I get that dedicated IP ranges are only applied to high end paid subscriptions, but this is a massive hole in your free / lower tier offerings.

1 Like

Either the connection from Bubble doesn’t reach your DB server (firewalls) or there is something wrong with your servers - in that case you can use tools like SQL Server Profiler. I suggest you try to reach your server with some other tool, firstly from inside your network, and then from the outside (it can be a client from your network, but routed out and then in, or you can find some free cloud tool/platform like Bubble. But it’s usually the firewalls.

And, I suggest that you use a simplistic query string at first - this can also be a problem.

Alternative method, I even launched an Amazon RDS instance, to avoid the firewall issue completely, and THAT won’t connect either. What I’m thinking is Bubble doesn’t provide fixed ports for accounts, so there is so reliable way to keep a connection open. I can connect to the server with workbench, so I know it’s available, but Bubble always times out.

I don’t know which fixed ports are you relating to on the Bubble side: Your server should listen on a resolvable DNS name or IP address and the listening port should be accessible to Bubble on your server end, that’s all. Where is your database server located? On your private network, somewhere in the cloud, or else?

You need “fixed ports” (usually IP address) on Bubble side only if you want to permit the traffic from Bubble to your database server, when creating firewall filters at your end, and drop everything else (that is traffic from other sources).

The database is NOW being hosted through Amazon RDS. I’m unsure of what DNS name or IP address for Amazon to be listening to in regards to Bubble. the “fixed ports” you are referring to is what I am attempting to find. Does Bubble provide a fixed set of ports? Do I have to pay for it? The only solution I saw was to open your database to accept connections from everything 0.0.0.00 which is very poor, security wise.

You can find parts of the connection string (server’s DNS name, port number - usually 1433 for SQL Server) for Amazon RDS if you follow these instructions https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToMicrosoftSQLServerInstance.html

To get fixed Bubble IP address you can contact the Bubble team.

However, a direct open link to a database server in that fashion is relatively insecure; developers usually wrap data exchange into REST (Web API) calls. Of course, that means that you have to provide these services.

I am experiencing the same thing!.. and did the same as you. Created instances in RDS of both MySQL and MSSQL, can connect from home using Mgmt consoles for both using the endpoint connection strings from each RDS instance, but Bubble Times out every time. I’m using Hobby version of Bubble. Could it be that they throttle it so much that it always times out?

Just tested a new connection from fresh empty app on a free plan, to my own MS SQL server - it takes a couple of seconds to connect (to Europe).

Sure: mssql://username:[email protected]:1433/MyDBName

so what am I doing wrong? I know my my.domain.com etc is right because it works instantly with Management Console.

Just got this…Connection issue Connection attempt failed: Current fiber timed out after 65000 ms. Are you using a “Hobby” account?

Doug, I solved this issue. It has nothing to do with your connection string, it’s an IP issue. Bubble doesn’t provide apps dedicated ip ranged, so your server is blocking the connection. You need to open your server to all inbound up ranges, 0.0.0.0. It’s not secure, but unless you pay for a fixed ip range with bubble, it’s your only option. I am on the free option, only trouble I am having now, is display the SQL query results in the app.

Thank you! I’ll give that a try.

I’m having the same issue as a lot of people in this thread.

My connection keeps timing out: “Connection issue: SQL Database Connector issue: Connection attempt failed: Current fiber timed out after 65000 ms”.

Some details:

  • using a Postgresql database
  • firewall is already set to accept incoming connections on 0.0.0.0
  • can connect to the database using juypter notebook & SQL workbench
  • database is hosted on Google Cloud Platform

Can we only use the plugin on a paid account?

Is there an alternative plugin or way to get data from an external database into Bubble?