Page 1 of 1

mysql connection taking too long

Posted: Wed Aug 31, 2016 4:37 pm
by Pistris
hi there.
Am posting here cause my problem is only on iOS devices
When only wireless carrier data is available the process of opening a mysql connection takes very long , some times up to 15 seconds
(when i say opening a mysql connection am referring to revOpenDatabase command only)
If am using wifi then the connection is almost instantaneous .

While using the wireless carrier connection (in my case att LTE) after the connection is made then al the operations go smoothly
all queries are very fast (reading, writing queries)
i tested getting large tables 5 megabytes in size and they load on the data grids very very fast so the connection speed is not a problem

what could be the problem?
i tested on my wife's phone and am getting the same result.

Edd

Re: mysql connection taking too long

Posted: Wed Aug 31, 2016 5:35 pm
by FourthWorld
Is your database exposed to the Internet directly, or are your using an HTTP API via PHP or LiveCode Server?

Re: mysql connection taking too long

Posted: Wed Aug 31, 2016 6:25 pm
by Pistris
Am connecting directly

If I use the wifi then everything is good
If I use the carrier data then the opening connection part takes a long time

After it connects then everything works very fast too like if I where using the wifi connection

Thanks for your prompt response Richard

And thank you for your help on my last post
Am finishing a middleware suite of tools for MySQL so everyone can use it
I will post it here in the forums for free once is finished.

Re: mysql connection taking too long [Solved]

Posted: Wed Aug 31, 2016 6:48 pm
by FourthWorld
Happy to help. Glad that worked out.

I've taken the liberty of marking this thread "Solved" so those looking for solutions may be able to find them more easily.

Re: mysql connection taking too long [Solved]

Posted: Wed Aug 31, 2016 7:06 pm
by Pistris
It's is NOT solved

It takes a long time to connect
It is not practical , some times takes up to 15 seconds

Those times are not practical in real life situations

Re: mysql connection taking too long

Posted: Wed Aug 31, 2016 8:13 pm
by FourthWorld
My apologies - thread title corrected to reflect current status.

If LiveCode is working well when the phone has good connectivity over wifi, but other connections are slow, I'm not sure there's anything any client-side software can do to correct for that. LiveCode just uses whatever connection is available, and when the connection is good it seems to be performing well, yes?

It may be that your carrier has restrictions on certain types of data and/or ports. Hard to say.

I had though you said you were moving access over the port 80 using an HTTP API. If that's the case it would be good to know if the throughput improves over the more common port.

Re: mysql connection taking too long

Posted: Wed Aug 31, 2016 9:31 pm
by Pistris
Richard this problem is completely unrelated with my problem the other day

This is another problem when trying to connect to a database
I don't think is a speed or connection problem since after the connection is stablished
I can query the database and download big amounts of data and I can make hundreds of query very very fast
The problems is just at the first step when executing revOpenDatabase
And by the way I just tested it on an android phone and it works perfectly
So is just iOS