Updated, testet and works like a charm.
Appreciate how you also keep documentation up to date.
Now I can push on with my current project
Thx again!
Updated, testet and works like a charm.
Appreciate how you also keep documentation up to date.
Now I can push on with my current project
Thx again!
Hi,
Glad to hear it worked. Let me know if anything else comes up.
-dev
Hi again,
I think I might have found some strange behaviour I cannot explain.
On both PC and Android, this code work fine:
local function coreLogin() local function callback(event) if event.error then report("coreLogin "..event.error) else if #event.result==0 then coreAddUser() else flag.coreLoggedIn=true end end end local data={ db="tr", tbl="users", columns={"hash"}, where="hash='"..par.hash.."'", distinct=true} core.mysql.select(data,callback) end
Yet the following one works on PC but not on Android, that is, it runs but I never get any data returned, the array remain empty. I tried to add a long delay just to check if its a timing issue, but its not.
local function callback(event) if event.error then report("coreGet "..event.error) else artbase=table.copy(event.result) for i=1,#artbase do print(artbase[i].name) end filterArt() end) end end core.mysql.select({ db="tra", tbl="art", columns={"artid","sortid","name","cvr","stat","able"}, where="hash='"..par.hash.."'", orderby={name="ASC"} },callback)
I am not able to see the difference between these two other than the second being supposed to return a table with 24 rows and 6 columns, which is childsplay nada zip to handle.
I’ve never had any such “timing” issues across devices so i suspect coronium, being the new kid on the block, so to speak.
anaqim
EDIT - I know i’m using tablecopy but even referencing event.result directly does not work on android, besides after i copy i dont touch the source data until all is refreshed. And it works well on the PC.
Hi dev,
I found the error, or fault, It was consequencial on android.
I was using hmac md4 for a prerequesite parameter, and it seems android didnt like it (support it).
changing to a different algorithm, fixed the issue.
Cheers!
Hi,
Sorry about the delay, but I’m glad to hear it got worked out.
-dev
Hi dev,
When doing some larger SQL operations, the api is returning an error “Timed out” message.
There is nothing wrong happing on the server, it completes the operation.
I didnt time it but it feels like 10-15 seconds before it happens.
Is there a parameter I can set to give the server more time before triggering this?
Anaqim
EDIT - Perhaps its closer to 30 seconds before timeout happens.
Hi again,
I’m using the SQL on digitalocean and am experiencing network transfer speeds that vary quite a lot and far from max my 20mbit connection. A simple select all from an indexed table with 45000 rows and only requesting a column with a 22 digit id, take around 45 seconds to transfer.
I’ve tried upscaling the server as well as rebooting but the results are inconclusive, yet remain low.
My question is, is it possible that some process in your API could affect speed of lrage transfers?
Anaqim
Hi Dev,
Where are you at?
Hi,
Are the requests being initiated from a mobile client? Coronium is built with mobile in mind, so pulling 45000 rows is not a standard use case.
There are a number of possibilities as to why, one my be the rate limiting. Do you see any errors in the log about that?
-dev
I don’t know offhand, but I can take a look as soon as I get a chance. As long as they support Ubuntu 16 than most likely yes, but there are a few specific install commands that are custom to both DigitialOcean and Amazon in the installers.
-dev
Hi mate,
Regarding the 45000 rows pull, it was done on a win32 build.
I’ve been in contact with digitalocean who suggested that it might be related to my sql query.
I tried upgrading the server with more RAM but it didnt make a difference.
I’ve come to the conclusion that whatever the reason, the amount of data is simply too much, so i’ve adapted my code to pull much smaller amounts on demand, with basically instant delivery, so the practical issue is solved.
My question was if you believe it could be that something in your API could slow this down, not saying it is.
Trying to bridge my lack of knowledge and skill with some logical thinking
Regarding provider, no rush, I managed to do some speedtests and DO delivery so satisfied so far.
Anaqim
Hi dev,
Missing a reply to my post regarding getting “timed out” messages after approx 30 sec.
MySQL shouldnt do that so can I hope its in your API, and that it is configurable?
I regularly pull 500 top N results from a table with 3 mil+ rows in well under 1 sec using MySQL and a simple network.request(). This basic stuff for a MySQL instance
Yes i know, thats peanuts for any sql.
The thing that happens is I send a rather large payload to the sql server in the cloud (digitalocean droplet), and sometimes i get a timeout return from the server via the coronium API.
I wonder how this is timed by the API, from the time the call is made and the payload upload start, or from the time payload has been delivered? I’m on a very low internet connection so my upload takes some time.
Once the payload has been delivered, doing serverside logic with the SQL and returning the result, doesnt take long.
I’ve since programmed around this issue (i hope) but there is still the thought at the back of my head, could this happen on a very congested connection?
Hi,
Sorry for the delay, I have been down sick. The API is simply using the Corona network.request method to push the payload, so there is nothing special going on in that regard.
Does the entire payload actually reach the server even though you get a timeout message? There is nothing off the top of my head that would cause a timeout in the Coronium API, but I can take a look again.
-dev
Hi dev,
No worries, hope you feel better.
“Does the entire payload actually reach the server” is the question i’ve not been able to answer.
I think for now, as this is nothing about your API we should let it rest and in case it shows up again, maybe dig some more.
Re-wrote my code to handle this so its working now without timeouts.
Get well!
Btw, noticed you updated your docs page, better to navigate now
Just FYR,
This is a dangerous design as if not handled well could cause your app to hang forever - waiting for a response that will never arrive.
Thanks for the input SGS.
I didnt void timeouts by extending anything, i just pull less data so it is much less likely to happen.
There is still code in place to deal with timeout replies.