mysql connection taking too long

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

mysql connection taking too long

Post by Pistris » Wed Aug 31, 2016 4:37 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: mysql connection taking too long

Post by FourthWorld » Wed Aug 31, 2016 5:35 pm

Is your database exposed to the Internet directly, or are your using an HTTP API via PHP or LiveCode Server?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: mysql connection taking too long

Post by Pistris » Wed Aug 31, 2016 6:25 pm

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.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: mysql connection taking too long [Solved]

Post by FourthWorld » Wed Aug 31, 2016 6:48 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: mysql connection taking too long [Solved]

Post by Pistris » Wed Aug 31, 2016 7:06 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: mysql connection taking too long

Post by FourthWorld » Wed Aug 31, 2016 8:13 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: mysql connection taking too long

Post by Pistris » Wed Aug 31, 2016 9:31 pm

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

Post Reply