Alessandro71 Well-Known Member Licensed User Longtime User Dec 2, 2020 #1 I'm logging events to a mysql database in my app, using ExecNonQueryBatch to perform INSERTs Since I'm not really interested in the completion of the query, the event sub is just a stub to avoid an undefined sub exception B4X: Copy Public Sub SQL_NonQueryComplete (Success As Boolean) 'nothing to do here, just to avoid exception End Sub Sometimes I see this messages in the system log sending message to waiting queue (sql_nonquerycomplete) Ignoring event (too many queued events: sql_nonquerycomplete) Can this be a problem, or are the the events just discarded? Since the event sub isn't really doing anything, discarding events shouldn't cause any issue.
I'm logging events to a mysql database in my app, using ExecNonQueryBatch to perform INSERTs Since I'm not really interested in the completion of the query, the event sub is just a stub to avoid an undefined sub exception B4X: Copy Public Sub SQL_NonQueryComplete (Success As Boolean) 'nothing to do here, just to avoid exception End Sub Sometimes I see this messages in the system log sending message to waiting queue (sql_nonquerycomplete) Ignoring event (too many queued events: sql_nonquerycomplete) Can this be a problem, or are the the events just discarded? Since the event sub isn't really doing anything, discarding events shouldn't cause any issue.
Erel B4X founder Staff member Licensed User Longtime User Dec 3, 2020 #2 If this is a new project then switch to B4XPages and forget from all such issues. Alessandro71 said: Can this be a problem, or are the the events just discarded? Click to expand... Only the events are discarded. The fact that you are sending remote queries from an activity can be a problem. Upvote 0
If this is a new project then switch to B4XPages and forget from all such issues. Alessandro71 said: Can this be a problem, or are the the events just discarded? Click to expand... Only the events are discarded. The fact that you are sending remote queries from an activity can be a problem.
Alessandro71 Well-Known Member Licensed User Longtime User Dec 3, 2020 #3 Erel said: If this is a new project then switch to B4XPages and forget from all such issues. Click to expand... Sadly not... and this this project has a clear requirement for supporting and switching between landscape and portrait mode, so B4X is out as of today... Erel said: Only the events are discarded. The fact that you are sending remote queries from an activity can be a problem. Click to expand... Actually they are sent from a foreground service rather than an activity. Upvote 0
Erel said: If this is a new project then switch to B4XPages and forget from all such issues. Click to expand... Sadly not... and this this project has a clear requirement for supporting and switching between landscape and portrait mode, so B4X is out as of today... Erel said: Only the events are discarded. The fact that you are sending remote queries from an activity can be a problem. Click to expand... Actually they are sent from a foreground service rather than an activity.
N Num3 Active Member Licensed User Longtime User Dec 3, 2020 #4 Since the log is not critical, my suggestion is to buffer a few of the log events in memory and dump them to the database when they reach a limit. You can do many inserts at once, very very quickly using mysql "Start Transaction / Commit" : B4X: Copy START TRANSACTION; DO X NUMBER OF SQL INSERTS; COMMIT; Upvote 0
Since the log is not critical, my suggestion is to buffer a few of the log events in memory and dump them to the database when they reach a limit. You can do many inserts at once, very very quickly using mysql "Start Transaction / Commit" : B4X: Copy START TRANSACTION; DO X NUMBER OF SQL INSERTS; COMMIT;
Alessandro71 Well-Known Member Licensed User Longtime User Dec 3, 2020 #5 This is what I already do. I suspect the events are missed when the user sends the app in background. but it’s not really an issue, since the data is written to the DB, I was only worried about unforeseen consequences of to many missed events Upvote 0
This is what I already do. I suspect the events are missed when the user sends the app in background. but it’s not really an issue, since the data is written to the DB, I was only worried about unforeseen consequences of to many missed events