SanaMobile / sana.mds

BSD 3-Clause "New" or "Revised" License
2 stars 16 forks source link

Retry on fail not halting on server side error #5

Open pvenka opened 8 years ago

pvenka commented 8 years ago

Hi,

We have sana mds openmrs installed on google compute engine. It works with the following caveats.

1) The table core_event in the db mds balloons to 2 GB in a day. 2) All the data gets uploaded to mds and openmrs db. The encounters show up on mds server but not on openmrs server.

Venkat

ewinkler commented 8 years ago

Regarding the issues you mentioned

  1. The event table does need some optimization but I am surprised that the table size had increased that dramatically. I will create an issue specifically for optimizing how the events are stored but I am curious to know what the approximate volume of requests you were sending was.
  2. Could you provide additional information regarding the statement "all the data gets uploaded to mds and openmrs db"? Specifically
    • Are patients being created in the OpenMRS db?
    • Are encounters and associated observations being created in the OpenMRS db?
    • If either, or both above, are being created, are they visible in the OpenMRS web interface?
pvenka commented 8 years ago

Dear Eric,

Thanks for the reply. I will explain both the issues in detail. 2) Patient data , observation and encounter data is getting created in openmrs db. I can search for the patient in the openmrs interface. I see the encounter in mds/admin interface also. I do not see the encounter queue in openmrs. I was able to see it earlier. I do see error in the mds log when an out of range value is entered for any of the observation.

1) We have modified the sana mobil app to get data from some medical devices via bluetooth. the same can be entered via form as well. What happens is when all data is in range defined while setting up concepts, the data gets uploaded. When it is not it keeps trying to upload and I guess that fills up the log.

sincerely,

Venkat

On Wed, Mar 23, 2016 at 7:36 PM, Eric Winkler notifications@github.com wrote:

Regarding the issues you mentioned

  1. The event table does need some optimization but I am surprised that the table size had increased that dramatically. I will create an issue specifically for optimizing how the events are stored but I am curious to know what the approximate volume of requests you were sending was. 2.

    Could you provide additional information regarding the statement "all the data gets uploaded to mds and openmrs db"? Specifically

    • Are patients being created in the OpenMRS db?
    • Are encounters and associated observations being created in the OpenMRS db?
    • If either, or both above, are being created, are they visible in the OpenMRS web interface?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/SanaMobile/sana.mds/issues/5#issuecomment-200358440

ewinkler commented 8 years ago

The client is designed to retry on fail but should halt when an upload fails due for any reason other than a timeout. This may be a combination of both mds not reporting correctly and/or the client not interpreting the result from mds as an indication to halt the resend.

I am going to relabel this issue and file it as a bug here and for the mobile client as well. We will try to fix it as soon as we can.

pvenka commented 8 years ago

Dear Eric,

I am trying to delete data from the mds db table core_event. After removing the data mysql does not release the freed up space. I tried 'Optimize table mds.core_event' but get the following info: mysql> optimize table mds.core_event; +----------------+----------+----------+-------------------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +----------------+----------+----------+-------------------------------------------------------------------+ | mds.core_event | optimize | note | Table does not support optimize, doing recreate + analyze instead | | mds.core_event | optimize | status | OK | +----------------+----------+----------+-------------------------------------------------------------------+ 2 rows in set (0.05 sec)

Any suggestions?

Venkat

On Sat, Mar 26, 2016 at 12:53 AM, Eric Winkler notifications@github.com wrote:

The client is designed to retry on fail but should halt when an upload fails due for any reason other than a timeout. This may be a combination of both mds not reporting correctly and/or the client not interpreting the result from mds as an indication to halt the resend.

I am going to relabel this issue and file it as a bug here and for the mobile client as well. We will try to fix it as soon as we can.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/SanaMobile/sana.mds/issues/5#issuecomment-201441079